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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+7 lines)
Lines 651-656 OPAC: Link Here
651
                  0: "Don't hide"
651
                  0: "Don't hide"
652
                  1: Hide
652
                  1: Hide
653
            - "the bibliographic record when all its items are hidden by <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems'>OpacHiddenItems</a>."
653
            - "the bibliographic record when all its items are hidden by <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems'>OpacHiddenItems</a>."
654
        -
655
            - pref: OpacAllowPrivateListCreation
656
              default: 1
657
              choices:
658
                  0: "Don't allow"
659
                  1: Allow
660
            - "OPAC users to create private lists."
654
        -
661
        -
655
            - pref: OpacAllowPublicListCreation
662
            - pref: OpacAllowPublicListCreation
656
              default: 1
663
              default: 1
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-2 / +4 lines)
Lines 98-105 Link Here
98
                                        [% ELSE %]
98
                                        [% ELSE %]
99
                                            <a class="dropdown-item disabled" aria-disabled="true" href="#" tabindex="-1" role="menuitem">No private lists</a>
99
                                            <a class="dropdown-item disabled" aria-disabled="true" href="#" tabindex="-1" role="menuitem">No private lists</a>
100
                                        [% END %]
100
                                        [% END %]
101
                                        <a class="dropdown-item listmenulink" href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" role="menuitem">New list</a>
101
                                        [% IF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
102
                                    [% ELSE %]
102
                                            <a class="dropdown-item listmenulink" href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" role="menuitem">New list</a>
103
                                        [% END %]
104
                                    [% ELSIF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
103
                                        <a class="dropdown-item" href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" role="menuitem">Log in to create your own lists</a>
105
                                        <a class="dropdown-item" href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" role="menuitem">Log in to create your own lists</a>
104
                                    [% END # / IF loggedinusername %]
106
                                    [% END # / IF loggedinusername %]
105
                                [% END # / IF opacuserlogin %]
107
                                [% END # / IF opacuserlogin %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc (-1 / +1 lines)
Lines 35-41 Link Here
35
    [% END %]
35
    [% END %]
36
36
37
    [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
37
    [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
38
        [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername ) %]
38
        [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) ) %]
39
            <li
39
            <li
40
                ><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
40
                ><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
41
            >
41
            >
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/result-batch-controls.inc (-3 / +5 lines)
Lines 29-37 Link Here
29
29
30
        [% IF ( ListsEnabled ) %]
30
        [% IF ( ListsEnabled ) %]
31
            <div class="btn-group">
31
            <div class="btn-group">
32
                <button type="button" class="btn btn-link btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
32
                [% IF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
33
                    <i class="fa fa-list" aria-hidden="true"></i> Add to list <span class="caret"></span>
33
                    <button type="button" class="btn btn-link btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
34
                </button>
34
                        <i class="fa fa-list" aria-hidden="true"></i> Add to list <span class="caret"></span>
35
                    </button>
36
                [% END %]
35
                <div class="dropdown-menu">
37
                <div class="dropdown-menu">
36
                    [% IF add_to_some_private_shelves.count %]
38
                    [% IF add_to_some_private_shelves.count %]
37
                        <h6 class="dropdown-header">Your lists</h6>
39
                        <h6 class="dropdown-header">Your lists</h6>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc (-1 / +1 lines)
Lines 62-68 Link Here
62
        [% END # IF loggedinusername %]
62
        [% END # IF loggedinusername %]
63
    [% END # if TagsInputEnabled %]
63
    [% END # if TagsInputEnabled %]
64
64
65
    [% IF ( ListsEnabled ) %]
65
    [% IF ( ListsEnabled ) && ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
66
        [% IF ( shelf AND op == 'view' ) %]
66
        [% IF ( shelf AND op == 'view' ) %]
67
            <span class="actions"
67
            <span class="actions"
68
                ><a href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% items.biblionumber | uri %]" class="addtoshelf btn btn-link btn-sm"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Save to another list</a></span
68
                ><a href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% items.biblionumber | uri %]" class="addtoshelf btn btn-link btn-sm"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Save to another list</a></span
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt (-25 / +32 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% USE raw %]
2
[% USE raw %]
2
[% PROCESS 'i18n.inc' %]
3
[% PROCESS 'i18n.inc' %]
3
[% PROCESS 'html_helpers.inc' %]
4
[% PROCESS 'html_helpers.inc' %]
Lines 72-78 Link Here
72
                                        <a class="close cancel" href="#">Cancel</a>
73
                                        <a class="close cancel" href="#">Cancel</a>
73
                                    </fieldset>
74
                                    </fieldset>
74
                                </form>
75
                                </form>
75
                                <p>...or...</p>
76
                                [% IF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
77
                                    <p>...or...</p>
78
                                [% END %]
76
                            [% ELSE %]
79
                            [% ELSE %]
77
                                [% IF ( singleshelf ) %]
80
                                [% IF ( singleshelf ) %]
78
                                    <form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
81
                                    <form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
Lines 92-121 Link Here
92
                        [% END # / UNLESS newshelf %]
95
                        [% END # / UNLESS newshelf %]
93
96
94
                        [% UNLESS ( singleshelf ) %]
97
                        [% UNLESS ( singleshelf ) %]
95
                            <form name="f2" method="post" action="/cgi-bin/koha/opac-addbybiblionumber.pl">
98
                            [% IF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
96
                                [% INCLUDE 'csrf-token.inc' %]
99
                                <form name="f2" method="post" action="/cgi-bin/koha/opac-addbybiblionumber.pl">
97
                                <fieldset>
100
                                    [% INCLUDE 'csrf-token.inc' %]
98
                                    <legend>Add to a new list:</legend>
101
                                    <fieldset>
99
                                    <label for="newvirtualshelf">List name:</label>
102
                                        <legend>Add to a new list:</legend>
100
                                    <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
103
                                        <label for="newvirtualshelf">List name:</label>
101
                                    <label for="category">Category:</label>
104
                                        <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
102
                                    <select name="public" id="public">
105
                                        <label for="category">Category:</label>
103
                                        <option value="0">Private</option>
106
                                        <select name="public" id="public">
104
                                        [% IF (OpacAllowPublicListCreation) %]
107
                                            [% IF Koha.Preference('OpacAllowPrivateListCreation') %]
105
                                            <option value="1">Public</option>
108
                                                <option value="0">Private</option>
106
                                        [% END %]
109
                                            [% END %]
107
                                    </select>
110
                                            [% IF (OpacAllowPublicListCreation) %]
108
                                </fieldset>
111
                                                <option value="1">Public</option>
109
                                [% FOREACH biblio IN biblios %]
112
                                            [% END %]
110
                                    <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
113
                                        </select>
111
                                [% END %]
114
                                    </fieldset>
112
                                <fieldset class="action">
115
                                    [% FOREACH biblio IN biblios %]
113
                                    <input type="hidden" name="op" value="cud-add" />
116
                                        <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
114
                                    <input type="hidden" name="sortfield" value="title" />
117
                                    [% END %]
115
                                    <input type="submit" value="Save" class="btn btn-primary" />
118
                                    <fieldset class="action">
116
                                    <a class="close cancel" href="#">Cancel</a>
119
                                        <input type="hidden" name="op" value="cud-add" />
117
                                </fieldset>
120
                                        <input type="hidden" name="sortfield" value="title" />
118
                            </form>
121
                                        <input type="submit" value="Save" class="btn btn-primary" />
122
                                        <a class="close cancel" href="#">Cancel</a>
123
                                    </fieldset>
124
                                </form>
125
                            [% END %]
119
                        [% END # / UNLESS singleshelf %]
126
                        [% END # / UNLESS singleshelf %]
120
                    [% ELSE %]
127
                    [% ELSE %]
121
                        <p>
128
                        <p>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-2 / +2 lines)
Lines 80-87 Link Here
80
                                <span class="selections">Select titles to: </span>
80
                                <span class="selections">Select titles to: </span>
81
                                <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled" aria-disabled="true"><i class="fa fa-times" aria-hidden="true"></i> Remove</a>
81
                                <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled" aria-disabled="true"><i class="fa fa-times" aria-hidden="true"></i> Remove</a>
82
                                [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
82
                                [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
83
                                    [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
83
                                    [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername && ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) ) %]
84
                                        <a href="#" class="btn btn-link btn-sm newshelf disabled" aria-disabled="true"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to list</a>
84
                                        <a href="#" class="btn btn-link btn-sm newshelf disabled" aria-disabled="true"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a>
85
                                    [% END %]
85
                                    [% END %]
86
                                    [% IF ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
86
                                    [% IF ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
87
                                        <a href="#" class="btn btn-link btn-sm hold disabled" aria-disabled="true"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
87
                                        <a href="#" class="btn btn-link btn-sm hold disabled" aria-disabled="true"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-6 / +11 lines)
Lines 235-241 Link Here
235
                            <div id="floating" class="sticky">
235
                            <div id="floating" class="sticky">
236
                                <div id="toolbar" class="toolbar clearfix">
236
                                <div id="toolbar" class="toolbar clearfix">
237
                                    <div class="list-actions">
237
                                    <div class="list-actions">
238
                                        <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus" aria-hidden="true"></i> New list</a> <span class="sep">|</span>
238
                                        [% IF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
239
                                            <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus" aria-hidden="true"></i> New list</a> <span class="sep">|</span>
240
                                        [% END %]
239
241
240
                                        <div id="download-list" class="btn-group dropdown">
242
                                        <div id="download-list" class="btn-group dropdown">
241
                                            <a
243
                                            <a
Lines 568-576 Link Here
568
                        [% ELSE %]
570
                        [% ELSE %]
569
                            <div id="toolbar" class="toolbar clearfix">
571
                            <div id="toolbar" class="toolbar clearfix">
570
                                <div class="list-actions">
572
                                <div class="list-actions">
571
                                    <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus" aria-hidden="true"></i> New list</a>
573
                                    [% IF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
574
                                        <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus" aria-hidden="true"></i> New list</a>
575
                                    [% END %]
572
                                    [% IF can_manage_shelf %]
576
                                    [% IF can_manage_shelf %]
573
                                        <span class="sep">|</span>
577
                                        [% IF ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
578
                                            <span class="sep">|</span>
579
                                        [% END %]
574
                                        <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
580
                                        <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
575
                                            <input type="hidden" name="op" value="edit_form" />
581
                                            <input type="hidden" name="op" value="edit_form" />
576
                                            <input type="hidden" name="referer" value="view" />
582
                                            <input type="hidden" name="referer" value="view" />
Lines 745-751 Link Here
745
                                    <div id="publicshelves" class="tab-pane active"> </div>
751
                                    <div id="publicshelves" class="tab-pane active"> </div>
746
                                [% END %]
752
                                [% END %]
747
753
748
                                [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %]
754
                                [% IF Koha.Preference('OpacAllowPrivateListCreation') || Koha.Preference('OpacAllowPublicListCreation') %]
749
                                    [% IF loggedinusername %]
755
                                    [% IF loggedinusername %]
750
                                        <div id="toolbar" class="toolbar"
756
                                        <div id="toolbar" class="toolbar"
751
                                            ><a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-plus" aria-hidden="true"></i> New list</a></div
757
                                            ><a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-plus" aria-hidden="true"></i> New list</a></div
Lines 843-849 Link Here
843
                        </div>
849
                        </div>
844
                        <!-- /.toptabs -->
850
                        <!-- /.toptabs -->
845
                    [% ELSIF NOT loggedinusernumber %]
851
                    [% ELSIF NOT loggedinusernumber %]
846
                        [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
852
                        [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference('OpacAllowPublicListCreation') || Koha.Preference('OpacAllowPrivateListCreation') ) %]
847
                            <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div>
853
                            <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div>
848
                        [% END %]
854
                        [% END %]
849
                    [% END  # IF op == 'add_form' OR op == 'edit_form' %]
855
                    [% END  # IF op == 'add_form' OR op == 'edit_form' %]
850
- 

Return to bug 39372