From 18d28ff9c5f190929e17663de03bfd90be552da0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 6 Mar 2019 17:12:17 +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 --- .../en/includes/authorities-search-results.inc | 7 +++- .../modules/authorities/searchresultlist-auth.tt | 44 ++++++++++++++++++++-- .../en/modules/authorities/searchresultlist.tt | 7 ++-- .../value_builder/unimarc_field_210c.tt | 41 +++++++++++++++++++- .../prog/en/modules/tools/batch_delete_records.tt | 2 +- .../en/modules/tools/batch_record_modification.tt | 2 +- 6 files changed, 91 insertions(+), 12 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 3832d3c..fe6cbc8 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,8 +53,8 @@ [% END %] [% END %] [% END %] + [% BLOCK authresult %] - [% IF ( summary.label ) %][% summary.label | html %]:[% END %] [% IF summary.summary %]
[% summary.summary | html %] @@ -63,7 +63,9 @@ [% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %] - [% authorize.heading | html %] + + [% authorize.heading | html %] + [% UNLESS loop.last %] | [% END %] [% END %]
@@ -126,6 +128,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 b50ebbc..39b676e 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,14 +88,50 @@ [% END %] + + + [% MACRO jsinclude BLOCK %] - [% Asset.js("js/auth-finder-search.js") | $raw %] -