Skip to content

Commit

Permalink
Use zbd or hbz id as lobidUri for linking #1992
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Sep 5, 2024
1 parent f3f0764 commit 3e3f270
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/app/views/tags/result_doc.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@
}}}
}

@lobidUrl(doc: JsValue) = @{
"http://lobid.org/resources/" + (doc\"almaMmsId").asOpt[String].orElse((doc\"hbzId").asOpt[String]).orElse((doc\"rpbId").asOpt[String]).getOrElse("") + "#!"
}
@lobidUrlwithZdbIdOrHbzId(doc: JsValue) = @{
"http://lobid.org/resources/" + ("ZDB-" + (doc\"zdbId")).asOpt[String].orElse((doc\"hbzId").asOpt[String]).getOrElse("") + "#!"
}

@lobid2_part_of(field: String, subField: String) = {
@if((doc \ "isPartOf").asOpt[JsValue].isDefined){
Expand Down Expand Up @@ -197,7 +197,7 @@
@result_field("In", "containedIn", doc, TableRow.LINKS)

@lobid2_part_of("isPartOf", "hasSuperordinate")
@defining(lobidUrl(doc)){ id =>
@defining(lobidUrlwithZdbIdOrHbzId(doc)){ id =>
@subordinated("isPartOf.hasSuperordinate.id", id, "Bände", ("zugehöriger Band", "zugehörige Bände"))
@subordinated("containedIn.id", id, "Enthält", ("Beitrag", "Beiträge"))
}
Expand Down

0 comments on commit 3e3f270

Please sign in to comment.