Skip to content

Commit

Permalink
Merge branch 'fix/ndash' of https://github.com/rettinghaus/lobid-gnd
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Jun 11, 2024
2 parents 8c1a936 + 04ce842 commit 1ea1c65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/AuthorityResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public static Stream<JsonNode> fieldValues(String field, JsonNode document) {
String v1 = year(document.findValue(fields[0]));
String v2 = year(document.findValue(fields[1]));
return v1.isEmpty() && v2.isEmpty() ? Stream.empty()
: Stream.of(Json.toJson(String.format("%s-%s", v1, v2)));
: Stream.of(Json.toJson(String.format("%s%s", v1, v2)));
}
return document.findValues(field).stream().flatMap((node) -> {
return node.isArray() ? Lists.newArrayList(node.elements()).stream() : Arrays.asList(node).stream();
Expand Down
3 changes: 1 addition & 2 deletions app/views/search.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@
@field(types, "Work", doc, "dateOfProduction")

@field(types, "Person", doc, "professionOrOccupation")
@for(v <- (doc \ "dateOfBirth").asOpt[Seq[String]]){@Html(cleanDate(v.head)) &ndash; }
@for(v <- (doc \ "dateOfDeath").asOpt[Seq[String]]){@Html(cleanDate(v.head))}
@for(v <- (doc \ "dateOfBirth").asOpt[Seq[String]]){@Html(cleanDate(v.head))&ndash;}@for(v <- (doc \ "dateOfDeath").asOpt[Seq[String]]){@Html(cleanDate(v.head))}
</td>
}
<td class='text-center text-muted'>&nbsp;@((doc \ "gndIdentifier").asOpt[String].getOrElse(""))</td>
Expand Down

0 comments on commit 1ea1c65

Please sign in to comment.