From 9656196fd230722a2681c44e5c1a324772a306d7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 24 Feb 2014 09:31:21 -0500 Subject: [PATCH] Bug 9303 [QA Followup 4] - Syspref the feature for staff --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 8 +++++ .../prog/en/modules/admin/preferences/patrons.pref | 6 ++++ .../prog/en/modules/members/memberentrygen.tt | 29 +++++++++++--------- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 2c45345..54b8a5e 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -11,6 +11,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AgeRestrictionOverride','0',NULL,'Allow staff to check out an item with age restriction.','YesNo'), ('AllFinesNeedOverride','1','0','If on, staff will be asked to override every fine, even if it is below noissuescharge.','YesNo'), ('AllowAllMessageDeletion','0','','Allow any Library to delete any message','YesNo'), +('AllowStaffToSetRelativesCheckoutsVisibility','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo'), ('AllowFineOverride','0','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'), ('AllowHoldDateInFuture','0','','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'), ('AllowHoldPolicyOverride','0',NULL,'Allow staff to override hold policies when placing holds','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4b409a4..e0d0b94 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8040,6 +8040,14 @@ if(CheckVersion($DBversion)) { ALTER TABLE issues AUTO_INCREMENT = $max_issue_id }); + $dbh->do(q{ + INSERT INTO systempreferences (variable, value, options, explanation, type ) + VALUES ( + 'AllowStaffToSetRelativesCheckoutsVisibility', '0', NULL, + 'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo' + ) + }); + print "Upgrade to $DBversion done (Bug 9303 - relative's checkouts in the opac)\n"; SetVersion($DBversion); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 74d14af..0c9ffc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -139,3 +139,9 @@ Patrons: yes: Do no: "Don't" - enable the ability to upload and attach arbitrary files to a borrower record. + - + - pref: AllowStaffToSetRelativesCheckoutsVisibility + choices: + yes: Allow + no: "Don't allow" + - staff to set the ability for a patron's checkouts to be viewed by linked patrons in the OPAC. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 9ccf828..30b74a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1,5 +1,6 @@ [% IF ( opduplicate ) %][% SET focusAction = "clearDupe" %][% END %] [% USE KohaDates %] +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] [% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %][% UNLESS ( opadd ) %] [% surname %], [% firstname %][% END %] @@ -1165,19 +1166,21 @@ [% END %] [% IF ( mandatorypassword ) %]Required[% END %][% IF ( ERROR_password_mismatch ) %]Passwords do not match[% END %] -
  • - - -
    Allow linked patron accounts to view this patron's checkouts from the OPAC
    -
  • + [% IF Koha.Preference('AllowStaffToSetRelativesCheckoutsVisibility') %] +
  • + + +
    Allow linked patron accounts to view this patron's checkouts from the OPAC
    +
  • + [% END %] [% END # hide fieldset %][% END %] -- 1.7.2.5