From 590d7336cb6331bad09e3a4b8162f39756bc3d2c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 22 Apr 2015 12:14:24 +0200 Subject: [PATCH] Bug 10866: Hide patron's history if intranetreadinghistory is set to not allow If set to "not allow", the intranetreadinghistory pref prevent staff members to access patron's checkout history. But: 1/ The page is still accessible if you know the url 2/ The history can be consulted on the item history page Test plan: 0/ Don't apply this patch 1/ Set the intranetreadinghistory to allow 2/ Go on a patron's checkout history page 3/ Open a new tab and go on a item's checkout history page 4/ Set the intranetreadinghistory to not allow 5/ Refresh both pages => no change 6/ Apply this patch 7/ Refresh both page. On the first page, you should see a warning On the other one, you should see that the patron column is not displayed anymore. --- .../prog/en/modules/catalogue/issuehistory.tt | 26 +++++++++++++--------- .../prog/en/modules/members/readingrec.tt | 4 +++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index 50cd561..90d56af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Catalog › Checkout history for [% title |html %] @@ -7,13 +8,12 @@ @@ -38,18 +38,22 @@ $(document).ready(function() {

Checked out [% total %] times

+ [% IF Koha.Preference('intranetreadinghistory') %] + [% END %] - - - + + + [% FOREACH issue IN issues %] - [% UNLESS ( loop.odd ) %][% ELSE %][% END %] + + [% IF Koha.Preference('intranetreadinghistory') %] + [% END %]
PatronBarcode Checked out from RenewedCheckout onDue dateCheckin onCheckout onDue dateCheckin on
[% IF HidePatronName %][% issue.cardnumber %][% ELSE %][% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %][% END %][% IF ( issue.barcode ) %] [% issue.barcode %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index 71e2888..d8c6563 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -48,7 +48,9 @@ [% INCLUDE 'members-toolbar.inc' %]

Circulation history

-[% IF is_anonymous %] +[% UNLESS Koha.Preference('intranetreadinghistory') %] +
Staff members are not allowed to access patron's checkout history
+[% ELSIF is_anonymous %]
This is the anonymous patron, so no circulation history is displayed. To get a list of anonymized loans, please run a report.
[% ELSIF ( !loop_reading ) %]
This patron has no circulation history.
-- 2.1.0