From 1881bc0e9859d2b6b9e3eda0e50ebe0e064de131 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 18 Feb 2022 17:31:04 +0000 Subject: [PATCH] Bug 29965: (follow-up) Use a new class for the preview With previous patches everythign worked, however, clicking the heading in authority search results now launched the preview instead of taking you to the authority details This patch uses a new class to launch the modal and conditionally applies it to authority results as we expect different behaviours when searching from the popup vs authority module To test: 1 - Repeate previous tests, confirm they pass 2 - Search for authorities in the authority module 3 - COnfirm clicking on heading takes you to detail page for authority Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer --- .../prog/en/includes/authorities-search-results.inc | 2 +- .../prog/en/modules/authorities/searchresultlist-auth.tt | 2 +- .../prog/en/modules/authorities/searchresultlist.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js | 2 +- 4 files changed, 4 insertions(+), 4 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 3e0c4904f1..66d8c7f633 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 @@ -64,7 +64,7 @@ [% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %] - + [% authorize.heading | html %] [% UNLESS loop.last %] | [% END %] 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 f50e578a84..ea9754225a 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 @@ -50,7 +50,7 @@ [% FOREACH resul IN result %] - [% PROCESS authresult summary=resul.summary authid=resul.authid %] + [% PROCESS authresult summary=resul.summary authid=resul.authid auth_preview=1 %] [% resul.summary.label | html %] [% resul.used | html %] times diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt index 3d36ed3b28..e5de11f17c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt @@ -79,7 +79,7 @@ [% UNLESS ( resul.used ) %]
  • Delete
  • [% END %] -
  • +
  • MARC preview
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js b/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js index 26a314d00d..931cecd1f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js +++ b/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js @@ -1,5 +1,5 @@ $(document).ready(function(){ - $(".authorizedheading a").on("click", function(e){ + $(".authority_preview a").on("click", function(e){ e.preventDefault(); var authid = $(this).data("authid"); -- 2.30.2