From 57b10179dd7dcb5f76e6bd0d9d16230c3876e885 Mon Sep 17 00:00:00 2001 From: Fabian Steeg Date: Tue, 23 Jan 2024 11:12:44 +0100 Subject: [PATCH] Show all `related` publications, with their ISBN and ISSN (#636) Previously, only those with `id` showed up, without other details --- app/views/tags/result_doc.scala.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/tags/result_doc.scala.html b/app/views/tags/result_doc.scala.html index 5854159..7efe6ca 100644 --- a/app/views/tags/result_doc.scala.html +++ b/app/views/tags/result_doc.scala.html @@ -212,12 +212,22 @@ @parallelausgabe() = { @for( related <- (doc \ "related").asOpt[Seq[JsValue]].getOrElse(Seq()); - id <- (related \ "id").asOpt[String]; - shortId = Lobid.shortId(id); - note <- (related \ "note").asOpt[Seq[String]]) { + id = (related \ "id").asOpt[String]; + shortId = Lobid.shortId(id.getOrElse("")); + note = (related \ "note").asOpt[Seq[String]]){ Parallelausgabe - @note + + @if(id.isDefined){ + @note.getOrElse(shortId) | + +
+ } else { + @optional("", "note", related) + } + @optional("", "isbn", related) + @optional("", "issn", related) + } }