From ed7f9a45453fa88dd2a6d17f07566931b6149678 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 13 Aug 2018 13:55:31 +0000 Subject: [PATCH] Bug 18480: Get rid of unwanted / distracting link in patron search for fund owner MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch modifies templates where a pop-up window is used to display patron search results. A link has been added to the patron name which triggers a modal window displaying more details about that patron. With each page in the test plan, check that clicking linked names in search results triggers a modal with the correct data. - Acquisitions -> Vendor -> View basket -> Add user - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record -> Add user - Acquisitions -> Funds -> Edit fund -> Select owner - Tools -> Patron card creator -> Manage -> Card batches -> Edit -> Add patrons - Serials -> Subscription -> Edit routing list -> Add recipients Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../modules/acqui/tables/members_results.tt | 2 +- .../prog/en/modules/common/patron_search.tt | 36 +++++++++++++++++++ .../modules/members/tables/members_results.tt | 2 +- .../patroncards/tables/members_results.tt | 2 +- .../modules/serials/tables/members_results.tt | 2 +- 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt index 77a51883e5..b90a8d795d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt @@ -9,7 +9,7 @@ "dt_cardnumber": "[% data.cardnumber | html %]", "dt_name": - "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]", + "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]", "dt_branch": "[% data.branchname | html %]", "dt_category": diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt index 44773bb715..328d2e88a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt @@ -7,6 +7,7 @@ Koha › Patron search [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("css/datatables.css") | $raw %] + @@ -89,6 +90,29 @@ + + + + + + [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] @@ -200,6 +224,18 @@ select_user( borrowernumber, JSON.parse(borrower_data) ); }); + $("body").on("click",".patron_preview", function( e ){ + e.preventDefault(); + var borrowernumber = $(this).data("borrowernumber"); + var page = "/cgi-bin/koha/members/moremember.pl?print=brief&borrowernumber=" + borrowernumber; + $("#patronPreview .modal-body").load( page + " div.container-fluid" ); + $('#patronPreview').modal({show:true}); + }); + + $("#patronPreview").on('hidden.bs.modal', function (e) { + $("#patronPreview .modal-body").html("\"\" Loading"); + }); + }); function filter() { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt index 0dd7f19a3a..607146e269 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -17,7 +17,7 @@ "dt_cardnumber": "[% data.cardnumber | html %]", "dt_name": - "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) invert_name = 1 %]
[% INCLUDE escape_address data = data %][% IF data.email %]
Email: [% data.email | html %][% END %]
", + "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) invert_name = 1 %]
[% INCLUDE escape_address data = data %][% IF data.email %]
Email: [% data.email | html %][% END %]", "dt_dateofbirth": "[% data.dateofbirth | $KohaDates %]", "dt_category": diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt index 3ff9547071..f4af6752af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt @@ -9,7 +9,7 @@ "dt_cardnumber": "[% data.cardnumber | html %]", "dt_name": - "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]", + "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]", "dt_category": "[% data.category_description | html %] ([% data.category_type | html %])", "dt_branch": diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt index 976b178922..25912d4abf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt @@ -9,7 +9,7 @@ "dt_cardnumber": "[% data.cardnumber | html %]", "dt_name": - "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]", + "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1 %]", "dt_branch": "[% data.branchname | html %]", "dt_action": -- 2.39.5