Skip to content

Commit

Permalink
Fix details view links in describedBy.source (RPB-38)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Nov 16, 2023
1 parent 76a5f90 commit f385bf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/AuthorityResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ private String process(String field, String value, String label, int i, int size
result = String.format("<a href='%s'>%s</a>", value, value);
} else if (Arrays.asList("dateOfBirth", "dateOfDeath").contains(field)) {
result = germanDate(value);
} else if (field.equals("source") && value.startsWith("http")) {
result = String.format("<a href='%s'>%s</a> %s", value.split(" ")[0], value.split(" ")[0],
value.replace(value.split(" ")[0] + " ", ""));
} else if (value.startsWith("http")) {
String link = value.startsWith(GND_PREFIX)
? controllers.routes.HomeController.authority(value.replace(GND_PREFIX, ""), null).toString()
Expand Down

0 comments on commit f385bf9

Please sign in to comment.