From c7b98ffc6e9054d756758f70776fe049a70c631b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 5 Aug 2025 16:00:24 +0000 Subject: [PATCH] Bug 40590: Prevent OPACAuthorIdentifiersAndInformation from showing empty list elements for unknown 024$2 This patch modifies the template which is used to display additional author information if OPACAuthorIdentifiersAndInformation is displayed. The change prevents an empty list item from appearing. To test, apply the patch and go to system preferences in the staff interface. - Search for OPACAuthorIdentifiersAndInformation and make sure that "Identifiers (024$2$a)" is checked. - Have a record with at least 2 persons (100, 700) linked to an authority record - One of those authority records should not have an 024 tag - The other authority record should have two 024 tags: - 024 $a someidyoumakeup $2orcid - 024 $a someidyoumakeup $2somethingelse - Check the detail page in OPAC -> "Author information" tab - Check the authority detail page in OPAC, under "Author information" in the right-hand column. Before the patch, '$2somethingelse' is not "supported" and will create the empty list element. After the patch there should be no empty list item. Sponsored-by: Athens County Public Libraries Signed-off-by: Roman Dolny --- .../en/includes/authority-information.inc | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/authority-information.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/authority-information.inc index 4354e3b71a..dcff3e1674 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/authority-information.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/authority-information.inc @@ -1,31 +1,43 @@ [% FOREACH info IN information %] [% SWITCH info_type %] [% CASE 'identifiers' %] -
  • - [% SWITCH info.source.lower %] - [% CASE 'orcid' %] + [% SWITCH info.source.lower %] + [% CASE 'orcid' %] +
  • ORCID: [% info.number | html %] - [% CASE 'scopus' %] +
  • + [% CASE 'scopus' %] +
  • ScopusID: [% info.number | html %] - [% CASE 'loop' %] +
  • + [% CASE 'loop' %] +
  • Loop ID: [% info.number | html %] - [% CASE 'rid' %] +
  • + [% CASE 'rid' %] +
  • Publons ID: [% info.number | html %] - [% CASE 'viaf' %] +
  • + [% CASE 'viaf' %] +
  • VIAF ID: [% info.number | html %] - [% CASE 'isni' %] +
  • + [% CASE 'isni' %] +
  • ISNI ID: [% info.number | html %] - [% CASE 'wikidata' %] +
  • + [% CASE 'wikidata' %] +
  • WIKIDATA ID: [% info.number | html %] - [% END %] -
  • + + [% END %] [% CASE 'activity' %] [% IF info.field_of_activity %]
  • -- 2.39.5