From 587e12100f4c35caa395e27815fcc03e6bfb4e5d 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 Signed-off-by: Nick Clemens --- .../prog/css/src/staff-global.scss | 28 ++++++++++++++++++- .../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 | 28 +++++++++++++++++++ 5 files changed, 63 insertions(+), 1 deletion(-) 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 73329e001d..5244c3a235 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4182,8 +4182,34 @@ span { } } -// ==== MODULE LINKS - Start ==== +.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 ==== */ .buttons-list { // List containing the module links margin-bottom: 30px; 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 305ebb5abf..c54e4275ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -2,6 +2,9 @@ [% USE KohaDates %] [% IF ( patron.borrowernumber ) %]
[% INCLUDE 'patron-title.inc' %]
+ + +