Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display of non-GND subjects in componentList (RPB-127) #89

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions app/views/tags/result_doc.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
}

@subjects(subjects: Seq[JsValue]) = {
@if(subjects.toString.contains("GND")){
<tr>
<td>Schlagwörter</td>
<td>
Expand All @@ -149,17 +148,15 @@
if !sourceLabel.getOrElse("").contains("Rheinland-Pfälzischen");
if !sourceLabel.getOrElse("").contains("Dewey");
label <- (component \ "label").asOpt[String];
id = (component \ "id").asOpt[String]) {
<span style="white-space: nowrap;"><a title="Nach weiteren Titeln zu '@label' suchen" href='@nwbib.routes.Application.search(subject=id.getOrElse("\""+label+"\""))'/>@label</a></span>
<a title="Nach Themen mit '@label' suchen" href='@nwbib.routes.Application.topics(q=label.replace(":","\\:"))'><span class='octicon octicon-ellipsis'></span></a>
id = (component \ "id").asOpt[String].getOrElse("")) {
<span style="white-space: nowrap;"><a title="Nach weiteren Titeln zu '@label' suchen" href='@nwbib.routes.Application.search(subject=if(id.contains("/gnd/")) {id} else {"\""+label+"\""})'/>@label</a></span>
@if(components.last == component) {
@for(topic <- (subject\"label").asOpt[String]; hits = Lobid.getTotalHits("subject.label.raw", topic.trim, CONFIG.getString("nwbib.filter")).get(Lobid.API_TIMEOUT); if hits > 1){
| <a href='@nwbib.routes.Application.search(q="subject.label.raw:\""+topic.trim+"\"")' title="Alle @hits Titel zum Thema '@topic.trim' anzeigen"><span class='badge progress-bar-success'>@hits</span></a>
}<br/>
} else { | }
}</td>
</tr>
}
}

@sortedPublications(seq: Seq[JsValue]) = @{
Expand Down
Loading