From d847b1d92a9df6db2bb5321f032f3ec13d6ba55d 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Followed test plan, results were as expected. Signed-off-by: Marc Véron http://bugs.koha-community.org/show_bug.cgi?id=10886 Signed-off-by: Katrin Fischer Nice addition! Signed-off-by: Tomas Cohen Arazi --- .../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 7b6483c9bf..89531f438e 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 e24ff7c42f..6fb109e3de 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.39.5