Bugzilla – Attachment 72638 Details for
Bug 20312
Add a link towards the last consulted patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20312 - Add a link to last consulted patron
Bug-20312---Add-a-link-to-last-consulted-patron.patch (text/plain), 4.73 KB, created by
Biblibre Sandboxes
on 2018-03-12 10:34:32 UTC
(
hide
)
Description:
Bug 20312 - Add a link to last consulted patron
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2018-03-12 10:34:32 UTC
Size:
4.73 KB
patch
obsolete
>From f7b30815d3db342aa379519a9d01f62044b44c37 Mon Sep 17 00:00:00 2001 >From: Maksim Sen <maksim.sen@inlibro.com> >Date: Wed, 28 Feb 2018 14:30:56 -0500 >Subject: [PATCH] Bug 20312 - Add a link to last consulted patron > >TEST PLAN >1 - apply patch >2 - Go to a patron record >3 - Go to a different module >4 - Click on "Last patron" (top-left) >5 - It should go the last patron record you consulted > >Signed-off-by: Axelle <axelle.clarisse@univ-amu.fr> >--- > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 24 ++++++++++++++++++++ > .../intranet-tmpl/prog/en/includes/header.inc | 26 ++++++++++++++++++++++ > .../inlibro/staff-cam1310-dernier-utilisateur.po | 3 +++ > 3 files changed, 53 insertions(+) > create mode 100644 misc/translator/inlibro/staff-cam1310-dernier-utilisateur.po > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 9bbdcbd..f6f7dd5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -1,6 +1,30 @@ > [% USE Koha %] > [% IF ( patron.borrowernumber ) %] >+<script> >+var lastborrowernumber; >+var lastborrowername; >+var lastborrowercard; >+document.addEventListener('DOMContentLoaded', function(){ >+ lastborrowernumber = $.cookie("lastborrowernumber"); >+ lastborrowername = $.cookie("lastborrowername"); >+ lastborrowercard = $.cookie("lastborrowercard"); >+ if (typeof lastborrowernumber !== "undefined"){ >+ $('#lastpatronlink').show(); >+ $('#lastpatronlink').prop('title', lastborrowername+' ('+lastborrowercard+')'); >+ $('#lastpatronlink').prop('href', '/cgi-bin/koha/circ/circulation.pl?borrowernumber='+lastborrowernumber); >+ } else { >+ $('#lastpatronlink').hide(); >+ } >+ $.cookie("lastborrowernumber", $("#hiddenborrowernumber").val(), { path: '/' }); >+ $.cookie("lastborrowername", $("#hiddenborrowername").val(), { path: '/' }); >+ $.cookie("lastborrowercard", $("#hiddenborrowercard").val(), { path: '/' }); >+}, false); >+</script> > <div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5> >+<input type="hidden" id="hiddenborrowernumber" value="[% borrowernumber %]"> >+<input type="hidden" id="hiddenborrowername" value="[% surname %] [% firstname %]"> >+<input type="hidden" id="hiddenborrowercard" value="[% cardnumber %]"> >+<input type="hidden" id="hiddenborrower" value="1"> > <!--[if IE 6]> > <style type="tex/css">img { width: expression(this.width > 140 ? 140: true); > }</style> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index 46d8db8..98fb4f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -1,9 +1,35 @@ > [% USE Branches %] >+<script> >+var lastborrowernumber; >+var lastborrowername; >+var lastborrowercard; >+document.addEventListener('DOMContentLoaded', function(){ >+ if ($('a#logout').length > 0){ >+ $('a#logout').click(function(){ >+ delCookie('lastborrowernumber'); >+ }); >+ } >+ if ($("#hiddenborrower").length == 0){ >+ lastborrowernumber = $.cookie("lastborrowernumber"); >+ lastborrowername = $.cookie("lastborrowername"); >+ lastborrowercard = $.cookie("lastborrowercard"); >+ >+ if (typeof lastborrowernumber !== "undefined"){ >+ $('#lastpatronlink').show(); >+ $('#lastpatronlink').prop('title', lastborrowername+' ('+lastborrowercard+')'); >+ $('#lastpatronlink').prop('href', '/cgi-bin/koha/circ/circulation.pl?borrowernumber='+lastborrowernumber); >+ } else { >+ $('#lastpatronlink').hide(); >+ } >+ } >+}, false); >+</script> > <div id="header" class="navbar navbar-default"> > <div class="container-fluid"> > <ul id="toplevelmenu" class="nav navbar-nav"> > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li>[% END %] > [% IF CAN_user_borrowers_edit_borrowers %]<li><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li>[% END %] >+ <li><a id="lastpatronlink" href="" title="">Last patron</a></li> > <li class="dropdown"> > <a href="/cgi-bin/koha/catalogue/search.pl" class="dropdown-toggle" data-toggle="dropdown">Search <b class="caret"></b></a> > <ul class="dropdown-menu dropdown-menu-right"> >diff --git a/misc/translator/inlibro/staff-cam1310-dernier-utilisateur.po b/misc/translator/inlibro/staff-cam1310-dernier-utilisateur.po >new file mode 100644 >index 0000000..754d6c0 >--- /dev/null >+++ b/misc/translator/inlibro/staff-cam1310-dernier-utilisateur.po >@@ -0,0 +1,3 @@ >+#, c-format >+msgid "Last patron" >+msgstr "Dernier utilisateur" >-- >2.7.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 20312
:
72294
|
72638
|
75672
|
77272
|
77769
|
77796
|
77835
|
77977
|
77979
|
78002
|
78005
|
81726
|
81727
|
81728