Bugzilla – Attachment 75461 Details for
Bug 18480
Use modal for displaying patron details on add_user_search.pl to avoid redirect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18480: Get rid of unwanted / distracting link in patron search for fund owner
Bug-18480-Get-rid-of-unwanted--distracting-link-in.patch (text/plain), 7.80 KB, created by
Owen Leonard
on 2018-05-21 16:30:41 UTC
(
hide
)
Description:
Bug 18480: Get rid of unwanted / distracting link in patron search for fund owner
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-05-21 16:30:41 UTC
Size:
7.80 KB
patch
obsolete
>From 416e84534764f228206bff9bff7982091cec0306 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 21 May 2018 16:27:01 +0000 >Subject: [PATCH] Bug 18480: Get rid of unwanted / distracting link in patron > search for fund owner > >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 >--- > .../en/modules/acqui/tables/members_results.tt | 2 +- > .../prog/en/modules/common/patron_search.tt | 30 ++++++++++++++++++++++ > .../en/modules/members/tables/members_results.tt | 2 +- > .../modules/patroncards/tables/members_results.tt | 2 +- > 4 files changed, 33 insertions(+), 3 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 1ff3156..869630f 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 %]", > "dt_name": >- "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% 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%]</a></span>", >+ "<a href=\"#\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber %]\" style='white-space:nowrap'>[% 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%]</a>", > "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 476bf89..5a0309d 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 >@@ -6,6 +6,7 @@ > <title>Koha › Patron search</title> > [% INCLUDE 'doc-head-close.inc' %] > [% Asset.css("css/datatables.css") %] >+<style> .modal-body .close { display: none; } </style> > </head> > > <body id="common_patron_search" class="common"> >@@ -88,6 +89,27 @@ > </div> > > <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div> >+ >+<!-- Patron preview modal --> >+<div class="modal" id="patronPreview" tabindex="-1" role="dialog" aria-labelledby="patronPreviewLabel"> >+ <div class="modal-dialog" role="document"> >+ <div class="modal-content"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> >+ <h4 class="modal-title" id="patronPreviewLabel"></h4> >+ </div> >+ <div class="modal-body"> >+ <div id="loading"> >+ <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading >+ </div> >+ </div> >+ <div class="modal-footer"> >+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> >+ </div> >+ </div> >+ </div> >+</div> >+ > </div> > </div> > >@@ -202,6 +224,14 @@ > 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}); >+ }); >+ > }); > > 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 666b59c..6000818 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 >@@ -16,7 +16,7 @@ > "dt_cardnumber": > "[% data.cardnumber | html %]", > "dt_name": >- "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% 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 %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html %]'>[% data.email | html %]</a>[% END %]</span>", >+ "<a href=\"#\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber %]\" style='white-space:nowrap'>[% 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 %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html %]'>[% data.email | html %]</a>[% 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 61c34d0..ca61069 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 %]", > "dt_name": >- "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% 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%]</a></span>", >+ "<a href=\"#\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber %]\" style='white-space:nowrap'>[% 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%]</a>", > "dt_category": > "[% data.category_description |html %] ([% data.category_type |html %])", > "dt_branch": >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18480
:
62562
|
75461
|
77743
|
78395
|
78925
|
78926
|
79004
|
79899
|
79943
|
80168