From c212d9f4fc092ae355154949589b9d8aad5010a0 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. Signed-off-by: Mason James --- .../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 50cd561135..90d56af696 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 5460ea0da2..c1776042cc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -34,7 +34,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.39.5