From 66289610fa34574e09bd25a95c104a5c03a9cc7f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 21 Oct 2020 13:04:42 +0000 Subject: [PATCH] Bug 12533: Improve authority search result display This patch implements a few changes in the way authority records are displayed in search results. - In most cases heading type is now displayed as a separate column in the table of search results. - The heading itself is now linked rather than a separate "details" link. In the authority search results for MARC editor plugins the heading link triggers a modal with the authority details instead of linking to a separate page. To test, apply the patch and go to Authorities. - Perform an authority search which will return results. - In the search results headings should be linked to the corresponding detail page. - There should be a separate column for heading type. - Go to Cataloging and create a new record using a framework which has a field linked to an authority type (e.g. 100a -> PERSO_NAME ). - Perform a search which will return results. - In the search results, clicking a heading link should trigger a modal window with the authority details. - Test multiple entries in the results and confirm that each time the correct data is loaded into the modal window. - Test the same process for a field which is linked to the unimarc_field_210c.pl plugin. - Go to Tools -> Batch record modification and submit multiple authority record numbers. - In the results list the heading should be linked correctly to the corresponding detail page. Heading type is not present in this view. - Perform the same test with batch record deletion. Signed-off-by: Claire Gravely Signed-off-by: Marjorie Barry-Vila Signed-off-by: Katrin Fischer Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../includes/authorities-search-results.inc | 6 ++- .../authorities/searchresultlist-auth.tt | 40 +++++++++++++++++- .../modules/authorities/searchresultlist.tt | 7 ++-- .../value_builder/unimarc_field_210c.tt | 41 ++++++++++++++++++- .../en/modules/tools/batch_delete_records.tt | 2 +- .../tools/batch_record_modification.tt | 2 +- 6 files changed, 89 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc index 3832d3c5ca..3e0c4904f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc @@ -53,6 +53,7 @@ [% END %] [% END %] [% END %] + [% BLOCK authresult %] [% IF ( summary.label ) %][% summary.label | html %]:[% END %] [% IF summary.summary %] @@ -63,7 +64,9 @@ [% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %] - [% authorize.heading | html %] + + [% authorize.heading | html %] + [% UNLESS loop.last %] | [% END %] [% END %]
@@ -126,6 +129,7 @@ [% END %] [% END %] [% END %] + [% BLOCK language %] [% SWITCH lang %] [% CASE ['en', 'eng'] %]English diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt index e16baca296..ec1092bcfe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt @@ -42,13 +42,15 @@ + [% FOREACH resul IN result %] - + +
SummaryHeading type Used Get it! Other action
[% PROCESS authresult summary=resul.summary %][% PROCESS authresult summary=resul.summary authid=resul.authid %][% resul.summary.label | html %] [% resul.used | html %] times [% IF resul.summary && resul.summary.authorized && resul.summary.authorized.size > 1 %] @@ -86,6 +88,24 @@ [% END %] + + + [% MACRO jsinclude BLOCK %] [% Asset.js("js/auth-finder-search.js") | $raw %]