From 5299ab2cc494bd8555cb7876ec3ac5ae1604de1b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 22 Apr 2015 12:14:24 +0200 Subject: [PATCH] [PASSED QA] Bug 10866: Hide patron's history if intranetreadinghistory is set to not allow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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! --- .../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 7b6483c..89531f4 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 0d4afa9..9afebf3 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.
-- 1.7.10.4