-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '656-addSkosData' of https://github.com/hbz/nwbib
Resolves #656 See https://nwbib.de/subjects
- Loading branch information
Showing
4 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ | |
normalized = entryLabel.replaceAll("ß", "ss") + entryLabel.replaceAll("ss", "ß"); | ||
value = (json\"value").as[String]; | ||
hits = (json\"hits").asOpt[scala.Long].getOrElse(0L); | ||
matches = (json\"matches").asOpt[Seq[String]].getOrElse(Seq()); | ||
anchor = value.split("[/#]").last; | ||
textToCopy = (if(entryLabel.contains("span")){entryLabel.split("</span> ")(1)}else{entryLabel}) + "$$0" + value) { | ||
<li id='@anchor'>@if(id=="root" && !placeholder.contains("Register") && t!="Wikidata" && t!="Zeitschriften") { <b>@Html(entryLabel)</b> } else { | ||
|
@@ -89,6 +90,29 @@ | |
case _ => value | ||
}}">@hits</a>) | ||
} | ||
@if(!matches.isEmpty()) { | ||
<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"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<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"> | ||
@link match { | ||
case x if x.contains("d-nb.info/gnd") => { <img src='@controllers.routes.Assets.at("images/gnd.png")' style="width:1em" alt="Gemeinsame Normdatei (GND)"> } | ||
case x if x.contains("wikidata.org") => { <img src='@controllers.routes.Assets.at("images/wikidata.png")' style="width:1em" alt="Wikidata"> } | ||
case _ => { <span class="octicon octicon-link"></span> } | ||
} | ||
@link</a></p> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
} | ||
@if(t!="Zeitschriften"){<span @if(t!="Wikidata"){class='copy-link'}><a data-toggle="tooltip" data-placement="right" title="Identifikator und Bezeichnung in die Zwischenablage kopieren" href="#" onclick="copyToClipboard('@textToCopy', $(this));return false;"><span class="octicon octicon-clippy"></span></a></span>} | ||
<div style="display: none">@normalized</div> | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.