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 6, 2024
1 parent f3f0764 commit 3e1587d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions web/app/views/tags/result_doc.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@
}}}
}

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

@lobid2_part_of(field: String, subField: String) = {
Expand Down Expand Up @@ -197,9 +200,13 @@
@result_field("In", "containedIn", doc, TableRow.LINKS)

@lobid2_part_of("isPartOf", "hasSuperordinate")
@defining(lobidUrl(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"))
@defining(lobidUrlWithZdbId(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"))
}
@defining(lobidUrlWithHbzId(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 3e1587d

Please sign in to comment.