From 073ebf482e96e3d02c7aace27d15914ab8850167 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 24 Apr 2014 10:28:44 -0400 Subject: [PATCH] Bug 9303 [QA Followup 4] - Syspref the feature for staff Signed-off-by: Katrin Fischer Fixed sequence of sysprefs in sysprefs.sql --- 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 be2f63f..4ef68e3 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -29,6 +29,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'), ('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'), ('AllowSelfCheckReturns','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), +('AllowStaffToSetRelativesCheckoutsVisibility','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo'), ('AllowTooManyOverride','1','','If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts','YesNo'), ('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z',NULL,'Alphabet than can be expanded into browse links, e.g. on Home > Patrons','free'), ('AlternateHoldingsField','',NULL,'The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).','free'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4262ebe..14f4078 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8493,6 +8493,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 2469431..8364fe0 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 @@ -134,6 +134,12 @@ Patrons: 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. + - - Card numbers for patrons must be - pref: CardnumberLength - "characters long. The length can be a single number to specify an exact length, a range separated by a comma (i.e., 'Min,Max'), or a maximum with no minimum (i.e., ',Max')." 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 414b552..10cb802 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 %] @@ -1170,19 +1171,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