View | Details | Raw Unified | Return to bug 27503
Collapse All | Expand All

(-)a/C4/Auth.pm (-3 / +3 lines)
Lines 501-507 sub get_template_and_user { Link Here
501
            IntranetUserJS                                                             => C4::Context->preference("IntranetUserJS"),
501
            IntranetUserJS                                                             => C4::Context->preference("IntranetUserJS"),
502
            intranetbookbag                                                            => C4::Context->preference("intranetbookbag"),
502
            intranetbookbag                                                            => C4::Context->preference("intranetbookbag"),
503
            suggestion                                                                 => C4::Context->preference("suggestion"),
503
            suggestion                                                                 => C4::Context->preference("suggestion"),
504
            virtualshelves                                                             => C4::Context->preference("virtualshelves"),
504
            virtualshelves                                                             => C4::Context->preference("AllowLists"),
505
            StaffSerialIssueDisplayCount                                               => C4::Context->preference("StaffSerialIssueDisplayCount"),
505
            StaffSerialIssueDisplayCount                                               => C4::Context->preference("StaffSerialIssueDisplayCount"),
506
            EasyAnalyticalRecords                                                      => C4::Context->preference('EasyAnalyticalRecords'),
506
            EasyAnalyticalRecords                                                      => C4::Context->preference('EasyAnalyticalRecords'),
507
            LocalCoverImages                                                           => C4::Context->preference('LocalCoverImages'),
507
            LocalCoverImages                                                           => C4::Context->preference('LocalCoverImages'),
Lines 592-598 sub get_template_and_user { Link Here
592
            ShowReviewer                          => C4::Context->preference("ShowReviewer"),
592
            ShowReviewer                          => C4::Context->preference("ShowReviewer"),
593
            ShowReviewerPhoto                     => C4::Context->preference("ShowReviewerPhoto"),
593
            ShowReviewerPhoto                     => C4::Context->preference("ShowReviewerPhoto"),
594
            suggestion                            => "" . C4::Context->preference("suggestion"),
594
            suggestion                            => "" . C4::Context->preference("suggestion"),
595
            virtualshelves                        => "" . C4::Context->preference("virtualshelves"),
595
            virtualshelves                        => "" . C4::Context->preference("AllowLists"),
596
            OPACSerialIssueDisplayCount           => C4::Context->preference("OPACSerialIssueDisplayCount"),
596
            OPACSerialIssueDisplayCount           => C4::Context->preference("OPACSerialIssueDisplayCount"),
597
            OPACXSLTDetailsDisplay                => C4::Context->preference("OPACXSLTDetailsDisplay"),
597
            OPACXSLTDetailsDisplay                => C4::Context->preference("OPACXSLTDetailsDisplay"),
598
            OPACXSLTResultsDisplay                => C4::Context->preference("OPACXSLTResultsDisplay"),
598
            OPACXSLTResultsDisplay                => C4::Context->preference("OPACXSLTResultsDisplay"),
Lines 1302-1308 sub checkauth { Link Here
1302
        shibbolethAuthentication              => $shib,
1302
        shibbolethAuthentication              => $shib,
1303
        SessionRestrictionByIP                => C4::Context->preference("SessionRestrictionByIP"),
1303
        SessionRestrictionByIP                => C4::Context->preference("SessionRestrictionByIP"),
1304
        suggestion                            => C4::Context->preference("suggestion"),
1304
        suggestion                            => C4::Context->preference("suggestion"),
1305
        virtualshelves                        => C4::Context->preference("virtualshelves"),
1305
        virtualshelves                        => C4::Context->preference("AllowLists"),
1306
        LibraryName                           => "" . C4::Context->preference("LibraryName"),
1306
        LibraryName                           => "" . C4::Context->preference("LibraryName"),
1307
        LibraryNameTitle                      => "" . $LibraryNameTitle,
1307
        LibraryNameTitle                      => "" . $LibraryNameTitle,
1308
        opacuserlogin                         => C4::Context->preference("opacuserlogin"),
1308
        opacuserlogin                         => C4::Context->preference("opacuserlogin"),
(-)a/basket/sendbasket.pl (-1 / +1 lines)
Lines 164-170 else { Link Here
164
        bib_list       => $bib_list,
164
        bib_list       => $bib_list,
165
        url            => "/cgi-bin/koha/basket/sendbasket.pl",
165
        url            => "/cgi-bin/koha/basket/sendbasket.pl",
166
        suggestion     => C4::Context->preference("suggestion"),
166
        suggestion     => C4::Context->preference("suggestion"),
167
        virtualshelves => C4::Context->preference("virtualshelves"),
167
        virtualshelves => C4::Context->preference("AllowLists"),
168
        csrf_token     => Koha::Token->new->generate_csrf({ session_id => scalar $query->cookie('CGISESSID'), }),
168
        csrf_token     => Koha::Token->new->generate_csrf({ session_id => scalar $query->cookie('CGISESSID'), }),
169
    );
169
    );
170
    output_html_with_http_headers $query, $cookie, $template->output;
170
    output_html_with_http_headers $query, $cookie, $template->output;
(-)a/catalogue/detail.pl (-1 / +1 lines)
Lines 527-533 $template->param( Link Here
527
527
528
# Lists
528
# Lists
529
529
530
if (C4::Context->preference("virtualshelves") ) {
530
if (C4::Context->preference("AllowLists") ) {
531
    my $shelves = Koha::Virtualshelves->search(
531
    my $shelves = Koha::Virtualshelves->search(
532
        {
532
        {
533
            biblionumber => $biblionumber,
533
            biblionumber => $biblionumber,
(-)a/catalogue/search.pl (-1 / +1 lines)
Lines 304-310 if ( $template_type eq 'advsearch' ) { Link Here
304
        $template->param( expanded_options => $expanded );
304
        $template->param( expanded_options => $expanded );
305
    }
305
    }
306
306
307
    $template->param(virtualshelves => C4::Context->preference("virtualshelves"));
307
    $template->param(virtualshelves => C4::Context->preference("AllowLists"));
308
308
309
    output_html_with_http_headers $cgi, $cookie, $template->output;
309
    output_html_with_http_headers $cgi, $cookie, $template->output;
310
    exit;
310
    exit;
(-)a/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl (+5 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{UPDATE systempreferences SET variable="AllowLists" WHERE variable="virtualshelves" });
4
    NewVersion( $DBversion, 27503, "Renaming virtualshelves to AllowLists");
5
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 713-719 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
713
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
713
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
714
('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'),
714
('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'),
715
('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'),
715
('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'),
716
('virtualshelves','1','','If ON, enables Lists management','YesNo'),
716
('AllowLists','1','','If ON, enables Lists management','YesNo'),
717
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
717
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
718
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
718
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
719
('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'),
719
('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (-2 / +2 lines)
Lines 118-124 CAN_user_serials_create_subscription ) %] Link Here
118
        [% END %]
118
        [% END %]
119
    [% END %]
119
    [% END %]
120
120
121
    [% IF Koha.Preference('virtualshelves') %]
121
    [% IF Koha.Preference('AllowLists') %]
122
        <div class="btn-group">
122
        <div class="btn-group">
123
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
123
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
124
                <i class="fa fa-list"></i> Add to list <span class="caret"></span>
124
                <i class="fa fa-list"></i> Add to list <span class="caret"></span>
Lines 161-167 CAN_user_serials_create_subscription ) %] Link Here
161
                </li>
161
                </li>
162
            </ul>
162
            </ul>
163
        </div>
163
        </div>
164
    [% END # /IF virtualshelves %]
164
    [% END # /IF AllowLists %]
165
165
166
    <div class="btn-group"><a id="printbiblio" class="btn btn-default"><i class="fa fa-print"></i> Print</a></div>
166
    <div class="btn-group"><a id="printbiblio" class="btn btn-default"><i class="fa fa-print"></i> Print</a></div>
167
167
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-1 / +1 lines)
Lines 37-43 Link Here
37
[% END %]
37
[% END %]
38
38
39
<!-- js_includes.inc -->
39
<!-- js_includes.inc -->
40
[% IF ( Koha.Preference('virtualshelves') || Koha.Preference('intranetbookbag') ) %]
40
[% IF ( Koha.Preference('AllowLists') || Koha.Preference('intranetbookbag') ) %]
41
    [% Asset.js("js/basket.js") | $raw %]
41
    [% Asset.js("js/basket.js") | $raw %]
42
[% END %]
42
[% END %]
43
43
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (-1 / +1 lines)
Lines 54-60 Administration: Link Here
54
                  '#': "#'s"
54
                  '#': "#'s"
55
        -
55
        -
56
            - "Allow staff and patrons to create and view saved lists of books: "
56
            - "Allow staff and patrons to create and view saved lists of books: "
57
            - pref: virtualshelves
57
            - pref: AllowLists
58
              choices:
58
              choices:
59
                  yes: "Yes"
59
                  yes: "Yes"
60
                  no: "No"
60
                  no: "No"
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-2 / +2 lines)
Lines 82-88 Link Here
82
                                </div>
82
                                </div>
83
                            [% END %]
83
                            [% END %]
84
84
85
                            [% IF Koha.Preference('virtualshelves') %]
85
                            [% IF Koha.Preference('AllowLists') %]
86
                                <div class="btn-group">
86
                                <div class="btn-group">
87
                                    <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
87
                                    <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
88
                                        <i class="fa fa-list"></i> Add to list <span class="caret"></span>
88
                                        <i class="fa fa-list"></i> Add to list <span class="caret"></span>
Lines 125-131 Link Here
125
                                        </li>
125
                                        </li>
126
                                    </ul>
126
                                    </ul>
127
                                </div>
127
                                </div>
128
                            [% END # /IF virtualshelves %]
128
                            [% END # /IF AllowLists %]
129
129
130
                            [% IF ( CAN_user_reserveforothers_place_holds && DisplayMultiPlaceHold ) %]
130
                            [% IF ( CAN_user_reserveforothers_place_holds && DisplayMultiPlaceHold ) %]
131
                                [% IF ( holdfor or holdforclub ) %]
131
                                [% IF ( holdfor or holdforclub ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-1 / +1 lines)
Lines 564-570 Link Here
564
                [% IF ( intranetbookbag ) %]
564
                [% IF ( intranetbookbag ) %]
565
                     param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
565
                     param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
566
                [% END %]
566
                [% END %]
567
                [% IF Koha.Preference('virtualshelves') %]
567
                [% IF Koha.Preference('AllowLists') %]
568
                    [% IF add_to_some_private_shelves.count %]
568
                    [% IF add_to_some_private_shelves.count %]
569
                        param1 += "<optgroup label=\""+_("Your lists:")+"\">";
569
                        param1 += "<optgroup label=\""+_("Your lists:")+"\">";
570
                        [% SET number_of_private_shelves = 0 %]
570
                        [% SET number_of_private_shelves = 0 %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-2 / +2 lines)
Lines 34-40 Link Here
34
                    </li>
34
                    </li>
35
                [% END %]
35
                [% END %]
36
                <li class="divider-vertical"></li>
36
                <li class="divider-vertical"></li>
37
                [% IF ( Koha.Preference( 'virtualshelves' ) == 1 ) %]
37
                [% IF ( Koha.Preference( 'AllowLists' ) == 1 ) %]
38
                    <li class="nav-item dropdown">
38
                    <li class="nav-item dropdown">
39
                        <a href="#" title="Show lists" class="nav-link dropdown-toggle" id="listsmenu" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"
39
                        <a href="#" title="Show lists" class="nav-link dropdown-toggle" id="listsmenu" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"
40
                            ><i class="fa fa-list fa-icon-black" aria-hidden="true"></i> <span class="listslabel">Lists</span>
40
                            ><i class="fa fa-list fa-icon-black" aria-hidden="true"></i> <span class="listslabel">Lists</span>
Lines 78-84 Link Here
78
                            [% END # / IF opacuserlogin %]
78
                            [% END # / IF opacuserlogin %]
79
                        </div> <!-- / .dropdown-menu -->
79
                        </div> <!-- / .dropdown-menu -->
80
                    </li> <!-- / .nav-item.dropdown -->
80
                    </li> <!-- / .nav-item.dropdown -->
81
                [% END # / IF virtualshelves %]
81
                [% END # / IF AllowLists %]
82
            </ul> <!-- / .navbar-nav -->
82
            </ul> <!-- / .navbar-nav -->
83
83
84
            [% IF Koha.Preference( 'opacuserlogin' ) == 1 ||  Koha.Preference( 'EnableOpacSearchHistory') || Koha.Preference( 'opaclanguagesdisplay' ) %]
84
            [% IF Koha.Preference( 'opacuserlogin' ) == 1 ||  Koha.Preference( 'EnableOpacSearchHistory') || Koha.Preference( 'opaclanguagesdisplay' ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-1 / +1 lines)
Lines 245-251 $.widget.bridge('uitooltip', $.ui.tooltip); Link Here
245
245
246
[% IF Koha.Preference( 'opacbookbag' ) == 1 %]
246
[% IF Koha.Preference( 'opacbookbag' ) == 1 %]
247
    [% Asset.js("js/basket.js") | $raw %]
247
    [% Asset.js("js/basket.js") | $raw %]
248
[% ELSIF ( Koha.Preference( 'virtualshelves' ) == 1 ) %]
248
[% ELSIF ( Koha.Preference( 'AllowLists' ) == 1 ) %]
249
    [% Asset.js("js/basket.js") | $raw %]
249
    [% Asset.js("js/basket.js") | $raw %]
250
[% ELSE %]
250
[% ELSE %]
251
    <script>var readCookie;</script>
251
    <script>var readCookie;</script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc (-1 / +1 lines)
Lines 19-25 Link Here
19
        [% END %]
19
        [% END %]
20
    [% END %]
20
    [% END %]
21
21
22
    [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
22
    [% IF Koha.Preference( 'AllowLists' ) == 1 %]
23
        [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername ) %]
23
        [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername ) %]
24
            <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>
24
            <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>
25
        [% END %]
25
        [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc (-1 / +1 lines)
Lines 40-46 Link Here
40
        [% END # IF loggedinusername %]
40
        [% END # IF loggedinusername %]
41
    [% END # if TagsInputEnabled %]
41
    [% END # if TagsInputEnabled %]
42
42
43
    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
43
    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'AllowLists' ) == 1 ) ) %]
44
        [% IF ( shelf AND op == 'view' ) %]
44
        [% IF ( shelf AND op == 'view' ) %]
45
            <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>
45
            <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>
46
            [% IF can_remove_biblios %]
46
            [% IF can_remove_biblios %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (-1 / +1 lines)
Lines 103-109 Link Here
103
                 [% END %]
103
                 [% END %]
104
            [% END %]
104
            [% END %]
105
105
106
            [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
106
            [% IF Koha.Preference( 'AllowLists' ) == 1 %]
107
                [% IF ( listsview ) %]
107
                [% IF ( listsview ) %]
108
                    <li class="active">
108
                    <li class="active">
109
                [% ELSE %]
109
                [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-1 / +1 lines)
Lines 56-62 Link Here
56
                                    <span id="selections">Select titles to: </span>
56
                                    <span id="selections">Select titles to: </span>
57
                                    <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a>
57
                                    <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a>
58
                                    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
58
                                    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
59
                                        [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
59
                                        [% IF ( ( Koha.Preference( 'AllowLists' ) == 1 ) && loggedinusername ) %]
60
                                            <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>
60
                                            <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>
61
                                        [% END %]
61
                                        [% END %]
62
                                        [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
62
                                        [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt (-4 / +4 lines)
Lines 145-151 Link Here
145
                                                        <select id="sort_by" name="sort_by"> [% INCLUDE 'resort_form.inc' %] </select>
145
                                                        <select id="sort_by" name="sort_by"> [% INCLUDE 'resort_form.inc' %] </select>
146
                                                        <input type="submit" class="submit clearfix" id="sortsubmit" value="Go" />
146
                                                        <input type="submit" class="submit clearfix" id="sortsubmit" value="Go" />
147
                                                    </div>
147
                                                    </div>
148
                                                    [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
148
                                                    [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %]
149
                                                        <div class="cartlist"><span class="checkall"></span>
149
                                                        <div class="cartlist"><span class="checkall"></span>
150
                                                        <span class="clearall"></span>
150
                                                        <span class="clearall"></span>
151
                                                        <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
151
                                                        <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
Lines 244-254 Link Here
244
                                                                    [% END %]
244
                                                                    [% END %]
245
                                                                [% END %]
245
                                                                [% END %]
246
246
247
                                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
247
                                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %]
248
                                                                    <input type="checkbox" name="biblionumber" value="[% GROUP_RESULT.biblionumber | html %]" title="Click to add to cart" /> <label for="bib[% GROUP_RESULT.biblionumber | html %]">
248
                                                                    <input type="checkbox" name="biblionumber" value="[% GROUP_RESULT.biblionumber | html %]" title="Click to add to cart" /> <label for="bib[% GROUP_RESULT.biblionumber | html %]">
249
                                                                [% END %]
249
                                                                [% END %]
250
                                                                <img src="[% themelang | html %]/images/[% GROUP_RESULT.itemtype | html %].gif" alt="[% GROUP_RESULT.ccode | html %]" title="[% GROUP_RESULT.ccode | html %]" />
250
                                                                <img src="[% themelang | html %]/images/[% GROUP_RESULT.itemtype | html %].gif" alt="[% GROUP_RESULT.ccode | html %]" title="[% GROUP_RESULT.ccode | html %]" />
251
                                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) = 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]</label>[% END %]
251
                                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) = 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %]</label>[% END %]
252
                                                                [% IF ( GROUP_RESULT.classification ) %]
252
                                                                [% IF ( GROUP_RESULT.classification ) %]
253
                                                                    <a href="/cgi-bin/koha/opac-search.pl?q=callnum:[% GROUP_RESULT.classification |url %]"> [% GROUP_RESULT.classification | html %] </a>
253
                                                                    <a href="/cgi-bin/koha/opac-search.pl?q=callnum:[% GROUP_RESULT.classification |url %]"> [% GROUP_RESULT.classification | html %] </a>
254
                                                                [% END %]
254
                                                                [% END %]
Lines 304-310 Link Here
304
            });
304
            });
305
            $("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">" + _("Clear all") + "</a>");
305
            $("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">" + _("Clear all") + "</a>");
306
            $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">" + _("Select all") + "</a>");
306
            $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">" + _("Select all") + "</a>");
307
            $("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") + "\" />");
307
            $("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") + "\" />");
308
            $("#addto").change(function(){
308
            $("#addto").change(function(){
309
                cartList();
309
                cartList();
310
            });
310
            });
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-11 / +11 lines)
Lines 218-224 Link Here
218
                                        <span class="clearall"></span> <span class="sep">|</span>
218
                                        <span class="clearall"></span> <span class="sep">|</span>
219
219
220
                                            <span class="links">
220
                                            <span class="links">
221
                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
221
                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %]
222
                                                    <span class="addto"></span>
222
                                                    <span class="addto"></span>
223
                                                [% END %]
223
                                                [% END %]
224
                                                <span id="placehold"></span>
224
                                                <span id="placehold"></span>
Lines 257-263 Link Here
257
                                                [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
257
                                                [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
258
                                                    <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>
258
                                                    <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>
259
                                                [% ELSE %]
259
                                                [% ELSE %]
260
                                                    [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
260
                                                    [% IF Koha.Preference( 'AllowLists' ) == 1 %]
261
                                                        <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>
261
                                                        <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>
262
                                                    [% ELSE %]
262
                                                    [% ELSE %]
263
                                                        [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
263
                                                        [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
Lines 266-272 Link Here
266
                                                                [% END %]
266
                                                                [% END %]
267
                                                            [% END %]
267
                                                            [% END %]
268
                                                        [% END # IF RequestOnOpac %]
268
                                                        [% END # IF RequestOnOpac %]
269
                                                    [% END # IF virtualshelves %]
269
                                                    [% END # IF AllowLists %]
270
                                                [% END # IF opacbookbag%]
270
                                                [% END # IF opacbookbag%]
271
                                            </td>
271
                                            </td>
272
272
Lines 529-535 Link Here
529
                                                    </div>
529
                                                    </div>
530
                                                [% END %]
530
                                                [% END %]
531
531
532
                                                [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
532
                                                [% IF Koha.Preference('AllowLists') AND SEARCH_RESULT.shelves.count %]
533
                                                    <div class="results_summary shelves">
533
                                                    <div class="results_summary shelves">
534
                                                        <span class="label">Lists:</span>
534
                                                        <span class="label">Lists:</span>
535
                                                        <ul>
535
                                                        <ul>
Lines 772-788 Link Here
772
            });
772
            });
773
773
774
            var param1 = "";
774
            var param1 = "";
775
            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
775
            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) || loggedinusername ) %]
776
                param1 += "<span id=\"selections\">"+_("Select titles to: ")+"</span>";
776
                param1 += "<span id=\"selections\">"+_("Select titles to: ")+"</span>";
777
            [% END %]
777
            [% END %]
778
778
779
            [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
779
            [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('AllowLists') %]
780
                param1 += "<select class=\"disabled\" name=\"addto\" id=\"addto\"><option>"+_("Add to...")+"</option>";
780
                param1 += "<select class=\"disabled\" name=\"addto\" id=\"addto\"><option>"+_("Add to...")+"</option>";
781
781
782
                [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
782
                [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
783
                    param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
783
                    param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
784
                [% END %]
784
                [% END %]
785
                [% IF Koha.Preference('virtualshelves') %]
785
                [% IF Koha.Preference('AllowLists') %]
786
                    [% IF loggedinusername AND add_to_some_private_shelves.count %]
786
                    [% IF loggedinusername AND add_to_some_private_shelves.count %]
787
                        param1 += "<optgroup label=\""+_("Your lists:")+"\">";
787
                        param1 += "<optgroup label=\""+_("Your lists:")+"\">";
788
                        [% SET number_of_private_shelves = 0 %]
788
                        [% SET number_of_private_shelves = 0 %]
Lines 811-817 Link Here
811
                        param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
811
                        param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
812
                    [% END %]
812
                    [% END %]
813
                    param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
813
                    param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
814
                [% END # /IF virtualshelves %]
814
                [% END # /IF AllowLists %]
815
                param1 += "<\/select> <input type=\"submit\" class=\"btn btn-sm btn-primary\" value=\""+_("Save")+"\" />";
815
                param1 += "<\/select> <input type=\"submit\" class=\"btn btn-sm btn-primary\" value=\""+_("Save")+"\" />";
816
            [% END # /IF opacbookbag || virtualshelves %]
816
            [% END # /IF opacbookbag || virtualshelves %]
817
817
Lines 829-841 Link Here
829
            [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
829
            [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
830
                $("span.addto").html(param1);
830
                $("span.addto").html(param1);
831
            [% ELSE %]
831
            [% ELSE %]
832
                [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
832
                [% IF ( ( Koha.Preference( 'AllowLists' ) == 1 ) && loggedinusername ) %]
833
                    $("span.addto").html(param1);
833
                    $("span.addto").html(param1);
834
                [% END %]
834
                [% END %]
835
            [% END %]
835
            [% END %]
836
836
837
            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
837
            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'AllowLists' ) == 1 ) ) %]
838
                [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
838
                [% IF Koha.Preference( 'AllowLists' ) == 1 %]
839
                    $("#addto").on("change",function(){
839
                    $("#addto").on("change",function(){
840
                        cartList();
840
                        cartList();
841
                    });
841
                    });
(-)a/opac/opac-addbybiblionumber.pl (-2 / +2 lines)
Lines 38-45 my $category = $query->param('category'); Link Here
38
my ( $errcode, $authorized ) = ( 0, 1 );
38
my ( $errcode, $authorized ) = ( 0, 1 );
39
my @biblios;
39
my @biblios;
40
40
41
# if virtualshelves is disabled, leave immediately
41
# if AddLists is disabled, leave immediately
42
if ( !C4::Context->preference('virtualshelves') ) {
42
if ( !C4::Context->preference('AllowLists') ) {
43
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
43
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
44
    exit;
44
    exit;
45
}
45
}
(-)a/opac/opac-detail.pl (-1 / +1 lines)
Lines 952-958 $template->param( Link Here
952
);
952
);
953
953
954
# Lists
954
# Lists
955
if (C4::Context->preference("virtualshelves") ) {
955
if (C4::Context->preference("AllowLists") ) {
956
    my $shelves = Koha::Virtualshelves->search(
956
    my $shelves = Koha::Virtualshelves->search(
957
        {
957
        {
958
            biblionumber => $biblionumber,
958
            biblionumber => $biblionumber,
(-)a/opac/opac-downloadshelf.pl (-2 / +2 lines)
Lines 35-42 use Koha::Virtualshelves; Link Here
35
use utf8;
35
use utf8;
36
my $query = CGI->new;
36
my $query = CGI->new;
37
37
38
# if virtualshelves is disabled, leave immediately
38
# if AllowLists is disabled, leave immediately
39
if ( ! C4::Context->preference('virtualshelves') ) {
39
if ( ! C4::Context->preference('AllowLists') ) {
40
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
40
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
41
    exit;
41
    exit;
42
}
42
}
(-)a/opac/opac-sendbasket.pl (-1 / +1 lines)
Lines 183-189 else { Link Here
183
        bib_list       => $bib_list,
183
        bib_list       => $bib_list,
184
        url            => "/cgi-bin/koha/opac-sendbasket.pl",
184
        url            => "/cgi-bin/koha/opac-sendbasket.pl",
185
        suggestion     => C4::Context->preference("suggestion"),
185
        suggestion     => C4::Context->preference("suggestion"),
186
        virtualshelves => C4::Context->preference("virtualshelves"),
186
        virtualshelves => C4::Context->preference("AllowLists"),
187
        csrf_token => Koha::Token->new->generate_csrf(
187
        csrf_token => Koha::Token->new->generate_csrf(
188
            { session_id => $new_session_id, } ),
188
            { session_id => $new_session_id, } ),
189
    );
189
    );
(-)a/opac/opac-sendshelf.pl (-2 / +2 lines)
Lines 35-42 use Koha::Virtualshelves; Link Here
35
35
36
my $query = CGI->new;
36
my $query = CGI->new;
37
37
38
# if virtualshelves is disabled, leave immediately
38
# if AllowLists is disabled, leave immediately
39
if ( ! C4::Context->preference('virtualshelves') ) {
39
if ( ! C4::Context->preference('AllowLists') ) {
40
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
40
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
41
    exit;
41
    exit;
42
}
42
}
(-)a/opac/opac-serial-issues.pl (-1 / +1 lines)
Lines 76-82 if ( $selectview eq "full" ) { Link Here
76
        yearmax        => $yearmax,
76
        yearmax        => $yearmax,
77
        bibliotitle    => $title,
77
        bibliotitle    => $title,
78
        suggestion     => C4::Context->preference("suggestion"),
78
        suggestion     => C4::Context->preference("suggestion"),
79
        virtualshelves => C4::Context->preference("virtualshelves"),
79
        virtualshelves => C4::Context->preference("AllowLists"),
80
    );
80
    );
81
81
82
}
82
}
(-)a/opac/opac-shareshelf.pl (-2 / +2 lines)
Lines 38-45 use Koha::Virtualshelves; Link Here
38
use Koha::Virtualshelfshares;
38
use Koha::Virtualshelfshares;
39
39
40
40
41
# if virtualshelves is disabled, leave immediately
41
# if AllowLists is disabled, leave immediately
42
if ( ! C4::Context->preference('virtualshelves') ) {
42
if ( ! C4::Context->preference('AllowLists') ) {
43
    my $query = CGI->new;
43
    my $query = CGI->new;
44
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
44
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
45
    exit;
45
    exit;
(-)a/opac/opac-shelves.pl (-2 / +2 lines)
Lines 46-53 my $query = CGI->new; Link Here
46
46
47
my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt";
47
my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt";
48
48
49
# if virtualshelves is disabled, leave immediately
49
# if AllowLists is disabled, leave immediately
50
if ( ! C4::Context->preference('virtualshelves') ) {
50
if ( ! C4::Context->preference('AllowLists') ) {
51
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
51
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
52
    exit;
52
    exit;
53
}
53
}
(-)a/serials/serials-collection.pl (-2 / +1 lines)
Lines 200-206 $template->param( Link Here
200
          yearmax =>$yearmax,
200
          yearmax =>$yearmax,
201
          bibliotitle => $title,
201
          bibliotitle => $title,
202
          suggestion => C4::Context->preference("suggestion"),
202
          suggestion => C4::Context->preference("suggestion"),
203
          virtualshelves => C4::Context->preference("virtualshelves"),
203
          virtualshelves => C4::Context->preference("AllowLists"),
204
          routing => C4::Context->preference("RoutingSerials"),
204
          routing => C4::Context->preference("RoutingSerials"),
205
          subscr=>scalar $query->param('subscriptionid'),
205
          subscr=>scalar $query->param('subscriptionid'),
206
          subscriptioncount => $subscriptioncount,
206
          subscriptioncount => $subscriptioncount,
207
- 

Return to bug 27503