From 5f8ec85c22b7dc8c8f766ac01709d213e26a8e24 Mon Sep 17 00:00:00 2001 From: James O'Keeffe <jamespfk@gmail.com> Date: Thu, 21 Jan 2021 01:53:05 +0000 Subject: [PATCH] Bug 27503: Rename system preference virtualshelves to AllowLists This patch renames virtualshelves to AllowLists Test plan: 1. In Koha Administration, search System preferences for virtualshelves 2. Note the virtualshelves preference 3. Apply the patch and run updatedatabase.pl 4. Search system preferances for virtualshelves, there should be no results 5. Search system preferances for AllowLists 6. ensure that the preferance runs correctly, as if it were virtualshelves. --- C4/Auth.pm | 6 +++--- basket/sendbasket.pl | 2 +- catalogue/detail.pl | 2 +- catalogue/search.pl | 2 +- .../bug_27503-add_AllowLists_syspref.perl | 5 +++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 4 ++-- .../intranet-tmpl/prog/en/includes/js_includes.inc | 2 +- .../prog/en/modules/admin/preferences/admin.pref | 2 +- .../prog/en/modules/catalogue/results.tt | 4 ++-- .../prog/en/modules/virtualshelves/shelves.tt | 2 +- .../opac-tmpl/bootstrap/en/includes/masthead.inc | 4 ++-- .../bootstrap/en/includes/opac-bottom.inc | 2 +- .../bootstrap/en/includes/opac-detail-sidebar.inc | 2 +- .../bootstrap/en/includes/title-actions-menu.inc | 2 +- .../opac-tmpl/bootstrap/en/includes/usermenu.inc | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 2 +- .../bootstrap/en/modules/opac-results-grouped.tt | 8 ++++---- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 22 +++++++++++----------- opac/opac-addbybiblionumber.pl | 4 ++-- opac/opac-detail.pl | 2 +- opac/opac-downloadshelf.pl | 4 ++-- opac/opac-sendbasket.pl | 2 +- opac/opac-sendshelf.pl | 4 ++-- opac/opac-serial-issues.pl | 2 +- opac/opac-shareshelf.pl | 4 ++-- opac/opac-shelves.pl | 4 ++-- serials/serials-collection.pl | 2 +- 28 files changed, 55 insertions(+), 50 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl diff --git a/C4/Auth.pm b/C4/Auth.pm index 675344d4a5..ac87727cd0 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -501,7 +501,7 @@ sub get_template_and_user { IntranetUserJS => C4::Context->preference("IntranetUserJS"), intranetbookbag => C4::Context->preference("intranetbookbag"), suggestion => C4::Context->preference("suggestion"), - virtualshelves => C4::Context->preference("virtualshelves"), + virtualshelves => C4::Context->preference("AllowLists"), StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"), EasyAnalyticalRecords => C4::Context->preference('EasyAnalyticalRecords'), LocalCoverImages => C4::Context->preference('LocalCoverImages'), @@ -592,7 +592,7 @@ sub get_template_and_user { ShowReviewer => C4::Context->preference("ShowReviewer"), ShowReviewerPhoto => C4::Context->preference("ShowReviewerPhoto"), suggestion => "" . C4::Context->preference("suggestion"), - virtualshelves => "" . C4::Context->preference("virtualshelves"), + virtualshelves => "" . C4::Context->preference("AllowLists"), OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"), OPACXSLTDetailsDisplay => C4::Context->preference("OPACXSLTDetailsDisplay"), OPACXSLTResultsDisplay => C4::Context->preference("OPACXSLTResultsDisplay"), @@ -1302,7 +1302,7 @@ sub checkauth { shibbolethAuthentication => $shib, SessionRestrictionByIP => C4::Context->preference("SessionRestrictionByIP"), suggestion => C4::Context->preference("suggestion"), - virtualshelves => C4::Context->preference("virtualshelves"), + virtualshelves => C4::Context->preference("AllowLists"), LibraryName => "" . C4::Context->preference("LibraryName"), LibraryNameTitle => "" . $LibraryNameTitle, opacuserlogin => C4::Context->preference("opacuserlogin"), diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index 9e273b1f45..0bde4c6e02 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -164,7 +164,7 @@ else { bib_list => $bib_list, url => "/cgi-bin/koha/basket/sendbasket.pl", suggestion => C4::Context->preference("suggestion"), - virtualshelves => C4::Context->preference("virtualshelves"), + virtualshelves => C4::Context->preference("AllowLists"), csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $query->cookie('CGISESSID'), }), ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 9cb607b1e1..8e82bab2dc 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -527,7 +527,7 @@ $template->param( # Lists -if (C4::Context->preference("virtualshelves") ) { +if (C4::Context->preference("AllowLists") ) { my $shelves = Koha::Virtualshelves->search( { biblionumber => $biblionumber, diff --git a/catalogue/search.pl b/catalogue/search.pl index d354a40eeb..7567cae237 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -304,7 +304,7 @@ if ( $template_type eq 'advsearch' ) { $template->param( expanded_options => $expanded ); } - $template->param(virtualshelves => C4::Context->preference("virtualshelves")); + $template->param(virtualshelves => C4::Context->preference("AllowLists")); output_html_with_http_headers $cgi, $cookie, $template->output; exit; diff --git a/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl b/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl new file mode 100644 index 0000000000..fcd3f402a4 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl @@ -0,0 +1,5 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{UPDATE systempreferences SET variable="AllowLists" WHERE variable="virtualshelves" }); + NewVersion( $DBversion, 27503, "Renaming virtualshelves to AllowLists"); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 7f0afaa594..93e6b64a8c 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -713,7 +713,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), ('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'), ('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'), -('virtualshelves','1','','If ON, enables Lists management','YesNo'), +('AllowLists','1','','If ON, enables Lists management','YesNo'), ('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'), ('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'), ('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index d55c57cdff..e72f9eecaf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -118,7 +118,7 @@ CAN_user_serials_create_subscription ) %] [% END %] [% END %] - [% IF Koha.Preference('virtualshelves') %] + [% IF Koha.Preference('AllowLists') %] <div class="btn-group"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-list"></i> Add to list <span class="caret"></span> @@ -161,7 +161,7 @@ CAN_user_serials_create_subscription ) %] </li> </ul> </div> - [% END # /IF virtualshelves %] + [% END # /IF AllowLists %] <div class="btn-group"><a id="printbiblio" class="btn btn-default"><i class="fa fa-print"></i> Print</a></div> diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc index b832eec518..48087889ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -37,7 +37,7 @@ [% END %] <!-- js_includes.inc --> -[% IF ( Koha.Preference('virtualshelves') || Koha.Preference('intranetbookbag') ) %] +[% IF ( Koha.Preference('AllowLists') || Koha.Preference('intranetbookbag') ) %] [% Asset.js("js/basket.js") | $raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index c5532ca5e4..54e4da446f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -54,7 +54,7 @@ Administration: '#': "#'s" - - "Allow staff and patrons to create and view saved lists of books: " - - pref: virtualshelves + - pref: AllowLists choices: yes: "Yes" no: "No" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index ebb64f26ce..94f05c0f20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -82,7 +82,7 @@ </div> [% END %] - [% IF Koha.Preference('virtualshelves') %] + [% IF Koha.Preference('AllowLists') %] <div class="btn-group"> <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-list"></i> Add to list <span class="caret"></span> @@ -125,7 +125,7 @@ </li> </ul> </div> - [% END # /IF virtualshelves %] + [% END # /IF AllowLists %] [% IF ( CAN_user_reserveforothers_place_holds && DisplayMultiPlaceHold ) %] [% IF ( holdfor or holdforclub ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 61d3b9bbe1..5d67a3362a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -564,7 +564,7 @@ [% IF ( intranetbookbag ) %] param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; [% END %] - [% IF Koha.Preference('virtualshelves') %] + [% IF Koha.Preference('AllowLists') %] [% IF add_to_some_private_shelves.count %] param1 += "<optgroup label=\""+_("Your lists:")+"\">"; [% SET number_of_private_shelves = 0 %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 85cbb9a4b0..025b123dbc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -34,7 +34,7 @@ </li> [% END %] <li class="divider-vertical"></li> - [% IF ( Koha.Preference( 'virtualshelves' ) == 1 ) %] + [% IF ( Koha.Preference( 'AllowLists' ) == 1 ) %] <li class="nav-item dropdown"> <a href="#" title="Show lists" class="nav-link dropdown-toggle" id="listsmenu" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" ><i class="fa fa-list fa-icon-black" aria-hidden="true"></i> <span class="listslabel">Lists</span> @@ -78,7 +78,7 @@ [% END # / IF opacuserlogin %] </div> <!-- / .dropdown-menu --> </li> <!-- / .nav-item.dropdown --> - [% END # / IF virtualshelves %] + [% END # / IF AllowLists %] </ul> <!-- / .navbar-nav --> [% IF Koha.Preference( 'opacuserlogin' ) == 1 || Koha.Preference( 'EnableOpacSearchHistory') || Koha.Preference( 'opaclanguagesdisplay' ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 03372af8d1..36f4eca0d8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -245,7 +245,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip); [% IF Koha.Preference( 'opacbookbag' ) == 1 %] [% Asset.js("js/basket.js") | $raw %] -[% ELSIF ( Koha.Preference( 'virtualshelves' ) == 1 ) %] +[% ELSIF ( Koha.Preference( 'AllowLists' ) == 1 ) %] [% Asset.js("js/basket.js") | $raw %] [% ELSE %] <script>var readCookie;</script> diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc index a110d73a2a..51ac4498b8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc @@ -19,7 +19,7 @@ [% END %] [% END %] - [% IF Koha.Preference( 'virtualshelves' ) == 1 %] + [% IF Koha.Preference( 'AllowLists' ) == 1 %] [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername ) %] <li><a class="addtoshelf btn btn-link btn-lg" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Save to your lists</a></li> [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc index 124c95da4a..8a3d5d34ce 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc @@ -40,7 +40,7 @@ [% END # IF loggedinusername %] [% END # if TagsInputEnabled %] - [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] + [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'AllowLists' ) == 1 ) ) %] [% IF ( shelf AND op == 'view' ) %] <span class="actions"><a href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% items.biblionumber | uri %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% items.biblionumber | uri %]'); return false;" class="btn btn-link btn-sm"><i class="fa fa-list" aria-hidden="true"></i> Save to another list</a></span> [% IF can_remove_biblios %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc index b426065ed6..08553444f2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc @@ -103,7 +103,7 @@ [% END %] [% END %] - [% IF Koha.Preference( 'virtualshelves' ) == 1 %] + [% IF Koha.Preference( 'AllowLists' ) == 1 %] [% IF ( listsview ) %] <li class="active"> [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt index 90f21e5235..aad5ac41f0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -56,7 +56,7 @@ <span id="selections">Select titles to: </span> <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a> [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %] - [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %] + [% IF ( ( Koha.Preference( 'AllowLists' ) == 1 ) && loggedinusername ) %] <a href="#" class="btn btn-link btn-sm newshelf disabled"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a> [% END %] [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt index c976070934..54d8c4fb1b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt @@ -145,7 +145,7 @@ <select id="sort_by" name="sort_by"> [% INCLUDE 'resort_form.inc' %] </select> <input type="submit" class="submit clearfix" id="sortsubmit" value="Go" /> </div> - [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] + [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %] <div class="cartlist"><span class="checkall"></span> <span class="clearall"></span> <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a> @@ -244,11 +244,11 @@ [% END %] [% END %] - [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] + [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %] <input type="checkbox" name="biblionumber" value="[% GROUP_RESULT.biblionumber | html %]" title="Click to add to cart" /> <label for="bib[% GROUP_RESULT.biblionumber | html %]"> [% END %] <img src="[% themelang | html %]/images/[% GROUP_RESULT.itemtype | html %].gif" alt="[% GROUP_RESULT.ccode | html %]" title="[% GROUP_RESULT.ccode | html %]" /> - [% IF ( ( Koha.Preference( 'opacbookbag' ) = 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]</label>[% END %] + [% IF ( ( Koha.Preference( 'opacbookbag' ) = 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %]</label>[% END %] [% IF ( GROUP_RESULT.classification ) %] <a href="/cgi-bin/koha/opac-search.pl?q=callnum:[% GROUP_RESULT.classification |url %]"> [% GROUP_RESULT.classification | html %] </a> [% END %] @@ -304,7 +304,7 @@ }); $("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">" + _("Clear all") + "</a>"); $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">" + _("Select all") + "</a>"); - $("span.addto").html("<label for=\"addto\">" + _("Add to: ") + "</label><select name=\"addto\" id=\"addto\"><option value=\"\"></option>[% IF Koha.Preference( 'opacbookbag' ) == 1 %]<option value=\"addtocart\">" + _("Cart") + "</option>[% END %][% IF Koha.Preference( 'virtualshelves' ) == 1 %][% IF ( loggedinusername ) %]<optgroup label=\"" + _("Lists:") + "\">[% IF ( barshelves ) %][% FOREACH barshelvesloo IN barshelvesloop %][% IF ( category == 1 ) %]<option id=\"s[% barshelvesloo.shelfnumber | html %]\" value=\"addtolist\">[% barshelvesloo.shelfname | html %]</option>[% END %][% END %][% END %]<option value=\"newlist\">" + _("[ New list ]") + "</option></optgroup>[% ELSE %]<option value=\"newlist\">" + _("List") + "</option>[% END %][% END %]</select> <input type=\"submit\" class=\"submit\" value=\"" + _("Save") + "\" />"); + $("span.addto").html("<label for=\"addto\">" + _("Add to: ") + "</label><select name=\"addto\" id=\"addto\"><option value=\"\"></option>[% IF Koha.Preference( 'opacbookbag' ) == 1 %]<option value=\"addtocart\">" + _("Cart") + "</option>[% END %][% IF Koha.Preference( 'AllowLists' ) == 1 %][% IF ( loggedinusername ) %]<optgroup label=\"" + _("Lists:") + "\">[% IF ( barshelves ) %][% FOREACH barshelvesloo IN barshelvesloop %][% IF ( category == 1 ) %]<option id=\"s[% barshelvesloo.shelfnumber | html %]\" value=\"addtolist\">[% barshelvesloo.shelfname | html %]</option>[% END %][% END %][% END %]<option value=\"newlist\">" + _("[ New list ]") + "</option></optgroup>[% ELSE %]<option value=\"newlist\">" + _("List") + "</option>[% END %][% END %]</select> <input type=\"submit\" class=\"submit\" value=\"" + _("Save") + "\" />"); $("#addto").change(function(){ cartList(); }); diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 26d3db9f8a..95072df5f8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -218,7 +218,7 @@ <span class="clearall"></span> <span class="sep">|</span> <span class="links"> - [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] + [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %] <span class="addto"></span> [% END %] <span id="placehold"></span> @@ -257,7 +257,7 @@ [% IF Koha.Preference( 'opacbookbag' ) == 1 %] <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]" /> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label> [% ELSE %] - [% IF Koha.Preference( 'virtualshelves' ) == 1 %] + [% IF Koha.Preference( 'AllowLists' ) == 1 %] <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label> [% ELSE %] [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %] @@ -266,7 +266,7 @@ [% END %] [% END %] [% END # IF RequestOnOpac %] - [% END # IF virtualshelves %] + [% END # IF AllowLists %] [% END # IF opacbookbag%] </td> @@ -529,7 +529,7 @@ </div> [% END %] - [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %] + [% IF Koha.Preference('AllowLists') AND SEARCH_RESULT.shelves.count %] <div class="results_summary shelves"> <span class="label">Lists:</span> <ul> @@ -772,17 +772,17 @@ }); var param1 = ""; - [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %] + [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) || loggedinusername ) %] param1 += "<span id=\"selections\">"+_("Select titles to: ")+"</span>"; [% END %] - [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %] + [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('AllowLists') %] param1 += "<select class=\"disabled\" name=\"addto\" id=\"addto\"><option>"+_("Add to...")+"</option>"; [% IF Koha.Preference( 'opacbookbag' ) == 1 %] param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; [% END %] - [% IF Koha.Preference('virtualshelves') %] + [% IF Koha.Preference('AllowLists') %] [% IF loggedinusername AND add_to_some_private_shelves.count %] param1 += "<optgroup label=\""+_("Your lists:")+"\">"; [% SET number_of_private_shelves = 0 %] @@ -811,7 +811,7 @@ param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>"; [% END %] param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>" - [% END # /IF virtualshelves %] + [% END # /IF AllowLists %] param1 += "<\/select> <input type=\"submit\" class=\"btn btn-sm btn-primary\" value=\""+_("Save")+"\" />"; [% END # /IF opacbookbag || virtualshelves %] @@ -829,13 +829,13 @@ [% IF Koha.Preference( 'opacbookbag' ) == 1 %] $("span.addto").html(param1); [% ELSE %] - [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %] + [% IF ( ( Koha.Preference( 'AllowLists' ) == 1 ) && loggedinusername ) %] $("span.addto").html(param1); [% END %] [% END %] - [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] - [% IF Koha.Preference( 'virtualshelves' ) == 1 %] + [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %] + [% IF Koha.Preference( 'AllowLists' ) == 1 %] $("#addto").on("change",function(){ cartList(); }); diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl index 3563dfc300..5d596ecaf0 100755 --- a/opac/opac-addbybiblionumber.pl +++ b/opac/opac-addbybiblionumber.pl @@ -38,8 +38,8 @@ my $category = $query->param('category'); my ( $errcode, $authorized ) = ( 0, 1 ); my @biblios; -# if virtualshelves is disabled, leave immediately -if ( !C4::Context->preference('virtualshelves') ) { +# if AddLists is disabled, leave immediately +if ( !C4::Context->preference('AllowLists') ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); exit; } diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 8b935af155..f9d22939ed 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -952,7 +952,7 @@ $template->param( ); # Lists -if (C4::Context->preference("virtualshelves") ) { +if (C4::Context->preference("AllowLists") ) { my $shelves = Koha::Virtualshelves->search( { biblionumber => $biblionumber, diff --git a/opac/opac-downloadshelf.pl b/opac/opac-downloadshelf.pl index 99d14a73da..3e18686e88 100755 --- a/opac/opac-downloadshelf.pl +++ b/opac/opac-downloadshelf.pl @@ -35,8 +35,8 @@ use Koha::Virtualshelves; use utf8; my $query = CGI->new; -# if virtualshelves is disabled, leave immediately -if ( ! C4::Context->preference('virtualshelves') ) { +# if AllowLists is disabled, leave immediately +if ( ! C4::Context->preference('AllowLists') ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); exit; } diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index eee5e2c29b..7366c3012b 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -183,7 +183,7 @@ else { bib_list => $bib_list, url => "/cgi-bin/koha/opac-sendbasket.pl", suggestion => C4::Context->preference("suggestion"), - virtualshelves => C4::Context->preference("virtualshelves"), + virtualshelves => C4::Context->preference("AllowLists"), csrf_token => Koha::Token->new->generate_csrf( { session_id => $new_session_id, } ), ); diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index c97aa450dc..3ad0c00ded 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -35,8 +35,8 @@ use Koha::Virtualshelves; my $query = CGI->new; -# if virtualshelves is disabled, leave immediately -if ( ! C4::Context->preference('virtualshelves') ) { +# if AllowLists is disabled, leave immediately +if ( ! C4::Context->preference('AllowLists') ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); exit; } diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl index 74e5abbc55..7b47c15dfc 100755 --- a/opac/opac-serial-issues.pl +++ b/opac/opac-serial-issues.pl @@ -76,7 +76,7 @@ if ( $selectview eq "full" ) { yearmax => $yearmax, bibliotitle => $title, suggestion => C4::Context->preference("suggestion"), - virtualshelves => C4::Context->preference("virtualshelves"), + virtualshelves => C4::Context->preference("AllowLists"), ); } diff --git a/opac/opac-shareshelf.pl b/opac/opac-shareshelf.pl index 7eecf6c45f..cb44e8fa7a 100755 --- a/opac/opac-shareshelf.pl +++ b/opac/opac-shareshelf.pl @@ -38,8 +38,8 @@ use Koha::Virtualshelves; use Koha::Virtualshelfshares; -# if virtualshelves is disabled, leave immediately -if ( ! C4::Context->preference('virtualshelves') ) { +# if AllowLists is disabled, leave immediately +if ( ! C4::Context->preference('AllowLists') ) { my $query = CGI->new; print $query->redirect("/cgi-bin/koha/errors/404.pl"); exit; diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index b94b4126ea..d2e3366efb 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -46,8 +46,8 @@ my $query = CGI->new; my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt"; -# if virtualshelves is disabled, leave immediately -if ( ! C4::Context->preference('virtualshelves') ) { +# if AllowLists is disabled, leave immediately +if ( ! C4::Context->preference('AllowLists') ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); exit; } diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index 14c5a44ff7..0995dd4a4b 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -200,7 +200,7 @@ $template->param( yearmax =>$yearmax, bibliotitle => $title, suggestion => C4::Context->preference("suggestion"), - virtualshelves => C4::Context->preference("virtualshelves"), + virtualshelves => C4::Context->preference("AllowLists"), routing => C4::Context->preference("RoutingSerials"), subscr=>scalar $query->param('subscriptionid'), subscriptioncount => $subscriptioncount, -- 2.11.0