Skip to content

Commit 8cd6349

Browse files
committed
Tweak additional links in classification list view (#656)
- Display button as link - Don't include number of links - Show icons for DNB and Wikidata
1 parent c099d7e commit 8cd6349

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

app/views/tags/browse_list.scala.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
}}">@hits</a>)
9292
}
9393
@if(!matches.isEmpty()) {
94-
<button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#@matches.hashCode"><span class="octicon octicon-link"></span> @matches.size</button>
94+
<button type="button" class="btn btn-link btn-xs" data-toggle="modal" data-target="#@matches.hashCode"><span class="octicon octicon-link"></span></button>
9595
<div id="@matches.hashCode" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="[email protected]">
9696
<div class="modal-dialog modal-lg" role="document">
9797
<div class="modal-content">
@@ -100,7 +100,14 @@
100100
<h4 class="modal-title" id="[email protected]">Links für @Html(entryLabel)</h4>
101101
</div>
102102
<div class="modal-body">
103-
@for(link <- matches) { <p><a href="@link" target="_blank"><span class="octicon octicon-link"></span> @link</a></p> }
103+
@for(link <- matches) { <p><a href="@link" target="_blank">
104+
@link match {
105+
case x if x.contains("d-nb.info") => { <img src='@controllers.routes.Assets.at("images/dnb.png")' style="height:1em" alt="Deutsche Nationalbibliothek (DNB)"> }
106+
case x if x.contains("wikidata.org") => { <img src='@controllers.routes.Assets.at("images/wikidata.png")' style="height:1em" alt="Wikidata"> }
107+
case _ => { <span class="octicon octicon-link"></span> }
108+
}
109+
@link</a></p>
110+
}
104111
</div>
105112
</div>
106113
</div>

public/images/dnb.png

1.12 KB
Loading

public/images/wikidata.png

908 Bytes
Loading

0 commit comments

Comments
 (0)