diff --git a/C4/Auth.pm b/C4/Auth.pm index f6f6459060..3623b439c5 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -498,6 +498,7 @@ sub get_template_and_user { IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"), IntranetNav => C4::Context->preference("IntranetNav"), intranetreadinghistory => C4::Context->preference("intranetreadinghistory"), + IntranetReadingHistoryHolds => C4::Context->preference("IntranetReadingHistoryHolds"), intranetstylesheet => C4::Context->preference("intranetstylesheet"), IntranetUserCSS => C4::Context->preference("IntranetUserCSS"), IntranetUserJS => C4::Context->preference("IntranetUserJS"), diff --git a/installer/data/mysql/atomicupdate/bug_31357.pl b/installer/data/mysql/atomicupdate/bug_31357.pl new file mode 100644 index 0000000000..e38675285f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_31357.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "31357", + description => "Add new system preference IntranetReadingHistoryHolds", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) SELECT + 'IntranetReadingHistoryHolds', value, '', 'If ON, Holds history is enabled for all patrons', 'YesNo' + FROM systempreferences WHERE variable = 'intranetreadinghistory'; + } + ); + }, + } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index 8aec41dfcb..ead8c18fbe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -151,7 +151,7 @@ [% END %] [% END %] [% IF CAN_user_borrowers_edit_borrowers %] - [% IF ( intranetreadinghistory ) %] + [% IF ( IntranetReadingHistoryHolds ) %] [% IF ( holdshistoryview ) %]
  • [% ELSE %]
  • [% END %]Holds history
  • [% END %] [% END %] 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 0a39164237..3126811d97 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 @@ -26,7 +26,13 @@ Patrons: choices: 1: "Allow" 0: "Don't allow" - - "staff to access a patron's checkout and hold history (checkout history is still stored, regardless of staff being allowed access or not)." + - "staff to access a patron's checkout (checkout history is still stored, regardless of staff being allowed access or not)." + - + - pref: IntranetReadingHistoryHolds + choices: + 1: "Allow" + 0: "Don't allow" + - "staff to access a patron's hold history (hold history is still stored, regardless of staff being allowed access or not)." - - "When deleting a patron who owns public or shared lists," - pref: ListOwnershipUponPatronDeletion diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index 8acf414340..92a7e1d758 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -44,7 +44,7 @@ [% INCLUDE 'members-toolbar.inc' %]

    Holds history

    -[% UNLESS Koha.Preference('intranetreadinghistory') %] +[% UNLESS Koha.Preference('IntranetReadingHistoryHolds') %]
    Staff members are not allowed to access patron's holds history
    [% ELSIF is_anonymous %]
    This is the anonymous patron, so no holds history is displayed.