Skip to content

Commit

Permalink
Tweak additional links in classification list view (#656)
Browse files Browse the repository at this point in the history
- Display button as link
- Don't include number of links
- Show icons for DNB and Wikidata
  • Loading branch information
fsteeg committed Jan 6, 2025
1 parent c099d7e commit 8cd6349
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/views/tags/browse_list.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
}}">@hits</a>)
}
@if(!matches.isEmpty()) {
<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>
<button type="button" class="btn btn-link btn-xs" data-toggle="modal" data-target="#@matches.hashCode"><span class="octicon octicon-link"></span></button>
<div id="@matches.hashCode" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="[email protected]">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
Expand All @@ -100,7 +100,14 @@
<h4 class="modal-title" id="[email protected]">Links für @Html(entryLabel)</h4>
</div>
<div class="modal-body">
@for(link <- matches) { <p><a href="@link" target="_blank"><span class="octicon octicon-link"></span> @link</a></p> }
@for(link <- matches) { <p><a href="@link" target="_blank">
@link match {
case x if x.contains("d-nb.info") => { <img src='@controllers.routes.Assets.at("images/dnb.png")' style="height:1em" alt="Deutsche Nationalbibliothek (DNB)"> }
case x if x.contains("wikidata.org") => { <img src='@controllers.routes.Assets.at("images/wikidata.png")' style="height:1em" alt="Wikidata"> }
case _ => { <span class="octicon octicon-link"></span> }
}
@link</a></p>
}
</div>
</div>
</div>
Expand Down
Binary file added public/images/dnb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/wikidata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8cd6349

Please sign in to comment.