From a7e78c517ed936d7227cefe3625415e9d795f430 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Lapointe Date: Wed, 15 Aug 2018 11:10:07 -0400 Subject: [PATCH] Bug 20312: Add a link to last consulted patron This new feature adds a link to the last patron consulted in the staff site. It uses cookies to save this information. When a staff site user accesses a patron record, the ID, name and card number of the patron will be saved in the cookie. To test: 1- Apply the patch 2- Go to a patron details' page 3- Verify that the link "Last patron" appears on the top-right corner of the screen 4- Go to another page 5- The link should still be here 6- Click on the link 7- Verify that you are at the patron's checkout page 8- Click on the "X" button next to the "Last patron" link 9- The link should be gone 10- Go to another page 11- The link shouldn't appear (until the next patron detail's page) Signed-off-by: Owen Leonard --- .../intranet-tmpl/prog/css/src/staff-global.scss | 27 ++++++++++++++++++++++ .../intranet-tmpl/prog/en/includes/circ-menu.inc | 4 ++++ .../intranet-tmpl/prog/en/includes/header.inc | 1 + .../prog/en/includes/last-borrower.inc | 4 ++++ koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 27 ++++++++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/last-borrower.inc diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index b17c6e4..acae734 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4069,6 +4069,33 @@ span { } } +.lastborrower { + background-color: #E6F0F2; + border: 1px solid #95C6D0; + box-shadow: 1px 1px 1px 0 #999; + color: #CC0000; + margin: .4em 0; + padding: .3em .5em .3em .5em; +} + +#lastborrower-ref { + border-radius: 5px 0px 0px 5px; + float: left; +} + +#lastborrower-remove { + border-radius: 0px 5px 5px 0px; + cursor: pointer; + float: right; +} + +#lastborrower-window { + display: inline-block; + position: absolute; + right: 5px; + top: 100px; +} + /* ==== MODULE LINKS - Start ==== */ ul { 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 2d36462..748603e 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,10 @@ [% USE Koha %] [% IF ( patron.borrowernumber ) %]
[% INCLUDE 'patron-title.inc' %]
+ + + +