From 8d9e405247d1054140ef9589fafcdf1b66016b49 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Lapointe Date: Fri, 17 Aug 2018 16:45:23 -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 4- Go to another page 4- Verify that the link "Last patron" appears on the top-right corner of the screen 5- Click on the link 6- Verify that you are at the patron's checkout page 7- Click on the "X" button next to the "Last patron" link 8- The link should be gone 9- Go to another page 10- The link shouldn't appear (until the next patron detail's page) Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize --- .../prog/css/src/staff-global.scss | 27 +++++++++++++++++++ .../prog/en/includes/circ-menu.inc | 3 +++ .../intranet-tmpl/prog/en/includes/header.inc | 1 + .../prog/en/includes/last-borrower.inc | 4 +++ .../intranet-tmpl/prog/js/staff-global.js | 27 +++++++++++++++++++ 5 files changed, 62 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 b17c6e4517..5b176bb24a 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: none; + 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 2d36462d69..3e0c523228 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,9 @@ [% USE Koha %] [% IF ( patron.borrowernumber ) %]
[% INCLUDE 'patron-title.inc' %]
+ + +