From 33fe1792b41c6213d78c3f5b5481fbf8b7d31f17 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Lapointe Date: Mon, 13 Aug 2018 16:38:16 -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) --- .../intranet-tmpl/prog/css/src/staff-global.scss | 25 ++++++++++++++++ .../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 | 34 ++++++++++++++++++++++ 5 files changed, 68 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..cae3c3b 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,31 @@ span { } } +div { + .lastborrower { + background-color: #e6f0f2; + border: 1px solid #95c6d0; + box-shadow: 1px 1px 1px 0 #999; + padding: .3em .5em .3em .5em; + margin: .4em 0; + } +} +#lastborrower-ref { + float: left; + border-radius: 5px 0px 0px 5px; +} +#lastborrower-remove { + float: right; + border-radius: 0px 5px 5px 0px; + cursor: pointer; +} +#lastborrower-window { + position: absolute; + display: inline-block; + 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 fb56a01..b18088b 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' %]
+ + + +