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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss (+39 lines)
Lines 217-222 Link Here
217
    #checkouts_filter {
217
    #checkouts_filter {
218
        display: block;
218
        display: block;
219
    }
219
    }
220
221
    #opac-userlists,
222
    #opac-lists {
223
        .toolbar-collapse-toggle {
224
            background-color: #EEEEEE;
225
            color: $gray-550;
226
            display: block !important;
227
            font-size: .9rem;
228
            padding: 6px 10px;
229
            text-align: center;
230
            width: 100%;
231
232
            &:hover,
233
            &:focus {
234
                background-color: darken( #EEEEEE, 5% );
235
                color: $gray-700;
236
                text-decoration: none;
237
            }
238
        }
239
240
        .toolbar-collapse {
241
            display: none;
242
243
            &.open {
244
                display: block;
245
            }
246
        }
247
248
        .actions-menu .actions {
249
            display: inline;
250
251
            a {
252
                display: inline;
253
                font-size: .9rem;
254
                font-weight: normal;
255
                margin: 0;
256
            }
257
        }
258
    }
220
}
259
}
221
260
222
@media only screen and ( max-width: 700px ) {
261
@media only screen and ( max-width: 700px ) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-135 / +150 lines)
Lines 258-406 Link Here
258
                            [% SET contents = shelf.get_contents %]
258
                            [% SET contents = shelf.get_contents %]
259
                            [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
259
                            [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
260
                            <div id="floating" class="sticky">
260
                            <div id="floating" class="sticky">
261
                                <div id="toolbar" class="toolbar clearfix">
261
                                <a href="#" class="toolbar-collapse-toggle d-none" aria-expanded="false" aria-controls="toolbar-collapse-content"> <i class="fa fa-bars" aria-hidden="true"></i> List actions </a>
262
                                    <div class="list-actions">
262
                                <div class="toolbar-collapse" id="toolbar-collapse-content">
263
                                        <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>
263
                                    <div id="toolbar" class="toolbar clearfix">
264
264
                                        <div class="list-actions">
265
                                        <div id="download-list" class="btn-group dropdown">
265
                                            <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>
266
                                            <a
266
267
                                                id="format"
267
                                            <div id="download-list" class="btn-group dropdown">
268
                                                class="btn btn-link dropdown-toggle"
268
                                                <a
269
                                                aria-haspopup="menu"
269
                                                    id="format"
270
                                                aria-label="Select format and download list"
270
                                                    class="btn btn-link dropdown-toggle"
271
                                                data-bs-toggle="dropdown"
271
                                                    aria-haspopup="menu"
272
                                                href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]"
272
                                                    aria-label="Select format and download list"
273
                                                ><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download <b class="caret"></b
273
                                                    data-bs-toggle="dropdown"
274
                                            ></a>
274
                                                    href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]"
275
                                            <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
275
                                                    ><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download <b class="caret"></b
276
                                                <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
276
                                                ></a>
277
                                                [% IF Koha.Preference('OPACISBD') %]<a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>[% END %]
277
                                                <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
278
                                                <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
278
                                                    <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
279
                                                <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
279
                                                    [% IF Koha.Preference('OPACISBD') %]<a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>[% END %]
280
                                                [% FOREACH csv_profile IN csv_profiles %]
280
                                                    <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
281
                                                    <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
281
                                                    <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
282
                                                [% END %]
282
                                                    [% FOREACH csv_profile IN csv_profiles %]
283
                                                        <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
284
                                                    [% END %]
285
                                                </div>
283
                                            </div>
286
                                            </div>
284
                                        </div>
285
287
286
                                        [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( ! Koha.Preference('OPACDisableSendList') ) %]
288
                                            [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( ! Koha.Preference('OPACDisableSendList') ) %]
287
                                            <span class="sendlist"
289
                                                <span class="sendlist"
288
                                                ><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber | uri %]" class="btn btn-link send"><i class="fa fa-fw fa-envelope" aria-hidden="true"></i> Send list</a></span
290
                                                    ><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber | uri %]" class="btn btn-link send"><i class="fa fa-fw fa-envelope" aria-hidden="true"></i> Send list</a></span
291
                                                >
292
                                            [% END %]
293
294
                                            <a
295
                                                class="btn btn-link print-small"
296
                                                target="_blank"
297
                                                href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | html %]&sortfield=[% sortfield | html %]&direction=[% direction | uri %]&print=1"
298
                                                ><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print list</a
289
                                            >
299
                                            >
290
                                        [% END %]
291
300
292
                                        <a
301
                                            [% IF can_manage_shelf %]
293
                                            class="btn btn-link print-small"
302
                                                <span class="sep">|</span>
294
                                            target="_blank"
303
                                                <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
295
                                            href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | html %]&sortfield=[% sortfield | html %]&direction=[% direction | uri %]&print=1"
304
                                                    <input type="hidden" name="op" value="edit_form" />
296
                                            ><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print list</a
305
                                                    <input type="hidden" name="referer" value="view" />
297
                                        >
306
                                                    <input type="hidden" name="public" value="[% shelf.public | html %]" />
307
                                                    <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
308
                                                    <button type="submit" class="btn btn-link editshelf"><i class="fa-fw fa-solid fa-pencil" aria-hidden="true"></i> Edit list</button>
309
                                                </form>
310
311
                                                [% PROCESS delete_shelf context = "details" %]
312
313
                                                [% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %]
314
                                                    <a href="/cgi-bin/koha/opac-shareshelf.pl?op=show&shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link sharelist"
315
                                                        ><i class="fa fa-fw fa-share" aria-hidden="true"></i> Share list</a
316
                                                    >
317
                                                [% END %]
318
                                            [% ELSIF !public # not manageshelf and private means shared %]
319
                                                <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
320
                                                    [% INCLUDE 'csrf-token.inc' %]
321
                                                    <input type="hidden" name="op" value="cud-remove_share" />
322
                                                    <input type="hidden" name="referer" value="list" />
323
                                                    <input type="hidden" name="public" value="[% public | html %]" />
324
                                                    <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
325
                                                    <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
326
                                                        <i class="fa fa-times" aria-hidden="true"></i> Remove share
327
                                                    </button>
328
                                                </form>
329
                                            [% END # /IF can_manage_shelf %]
330
                                        </div>
331
                                        <!-- /.list-actions -->
298
332
299
                                        [% IF can_manage_shelf %]
333
                                        <form method="get" action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by">
300
                                            <span class="sep">|</span>
334
                                            <input type="hidden" name="op" value="view" />
301
                                            <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
335
                                            <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
302
                                                <input type="hidden" name="op" value="edit_form" />
303
                                                <input type="hidden" name="referer" value="view" />
304
                                                <input type="hidden" name="public" value="[% shelf.public | html %]" />
305
                                                <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
306
                                                <button type="submit" class="btn btn-link editshelf"><i class="fa-fw fa-solid fa-pencil" aria-hidden="true"></i> Edit list</button>
307
                                            </form>
308
336
309
                                            [% PROCESS delete_shelf context = "details" %]
337
                                            <label for="sortfield">Sort by: </label>
338
                                            <select name="sortfield" id="sortfield" class="resort">
339
                                                <option value="">Default sorting</option>
340
                                                <optgroup label="Author">
341
                                                    [% IF sortfield == 'author' && direction == 'asc' %]
342
                                                        <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
343
                                                    [% ELSE %]
344
                                                        <option value="author" data-direction="asc">Author (A-Z)</option>
345
                                                    [% END %]
346
                                                    [% IF sortfield == 'author' && direction == 'desc' %]
347
                                                        <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
348
                                                    [% ELSE %]
349
                                                        <option value="author" data-direction="desc">Author (Z-A)</option>
350
                                                    [% END %]
351
                                                </optgroup>
352
                                                <optgroup label="Title">
353
                                                    [% IF sortfield == 'title' && direction == 'asc' %]
354
                                                        <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
355
                                                    [% ELSE %]
356
                                                        <option value="title" data-direction="asc">Title (A-Z)</option>
357
                                                    [% END %]
358
                                                    [% IF sortfield == 'title' && direction == 'desc' %]
359
                                                        <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
360
                                                    [% ELSE %]
361
                                                        <option value="title" data-direction="desc">Title (Z-A)</option>
362
                                                    [% END %]
363
                                                </optgroup>
364
                                                <optgroup label="Call number">
365
                                                    [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
366
                                                        <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
367
                                                    [% ELSE %]
368
                                                        <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
369
                                                    [% END %]
370
                                                    [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
371
                                                        <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
372
                                                    [% ELSE %]
373
                                                        <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
374
                                                    [% END %]
375
                                                </optgroup>
376
                                                <optgroup label="Copyright date">
377
                                                    [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
378
                                                        <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
379
                                                    [% ELSE %]
380
                                                        <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
381
                                                    [% END %]
382
                                                    [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
383
                                                        <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
384
                                                    [% ELSE %]
385
                                                        <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
386
                                                    [% END %]
387
                                                </optgroup>
388
                                                <optgroup label="Date added">
389
                                                    [% IF sortfield == "dateadded" && direction == 'asc' %]
390
                                                        <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
391
                                                    [% ELSE %]
392
                                                        <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
393
                                                    [% END %]
394
                                                    [% IF sortfield == "dateadded" && direction == 'desc' %]
395
                                                        <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
396
                                                    [% ELSE %]
397
                                                        <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
398
                                                    [% END %]
399
                                                </optgroup>
400
                                            </select>
310
401
311
                                            [% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %]
402
                                            <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
312
                                                <a href="/cgi-bin/koha/opac-shareshelf.pl?op=show&shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link sharelist"><i class="fa fa-fw fa-share" aria-hidden="true"></i> Share list</a>
403
                                        </form>
313
                                            [% END %]
404
                                        <!-- /#sorting-form -->
314
                                        [% ELSIF !public # not manageshelf and private means shared %]
315
                                            <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
316
                                                [% INCLUDE 'csrf-token.inc' %]
317
                                                <input type="hidden" name="op" value="cud-remove_share" />
318
                                                <input type="hidden" name="referer" value="list" />
319
                                                <input type="hidden" name="public" value="[% public | html %]" />
320
                                                <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
321
                                                <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
322
                                                    <i class="fa fa-times" aria-hidden="true"></i> Remove share
323
                                                </button>
324
                                            </form>
325
                                        [% END # /IF can_manage_shelf %]
326
                                    </div>
405
                                    </div>
327
                                    <!-- /.list-actions -->
406
                                    <!-- / #toolbar -->
328
407
                                    [% INCLUDE 'result-batch-controls.inc' %]
329
                                    <form method="get" action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by">
330
                                        <input type="hidden" name="op" value="view" />
331
                                        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
332
333
                                        <label for="sortfield">Sort by: </label>
334
                                        <select name="sortfield" id="sortfield" class="resort">
335
                                            <option value="">Default sorting</option>
336
                                            <optgroup label="Author">
337
                                                [% IF sortfield == 'author' && direction == 'asc' %]
338
                                                    <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
339
                                                [% ELSE %]
340
                                                    <option value="author" data-direction="asc">Author (A-Z)</option>
341
                                                [% END %]
342
                                                [% IF sortfield == 'author' && direction == 'desc' %]
343
                                                    <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
344
                                                [% ELSE %]
345
                                                    <option value="author" data-direction="desc">Author (Z-A)</option>
346
                                                [% END %]
347
                                            </optgroup>
348
                                            <optgroup label="Title">
349
                                                [% IF sortfield == 'title' && direction == 'asc' %]
350
                                                    <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
351
                                                [% ELSE %]
352
                                                    <option value="title" data-direction="asc">Title (A-Z)</option>
353
                                                [% END %]
354
                                                [% IF sortfield == 'title' && direction == 'desc' %]
355
                                                    <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
356
                                                [% ELSE %]
357
                                                    <option value="title" data-direction="desc">Title (Z-A)</option>
358
                                                [% END %]
359
                                            </optgroup>
360
                                            <optgroup label="Call number">
361
                                                [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
362
                                                    <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
363
                                                [% ELSE %]
364
                                                    <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
365
                                                [% END %]
366
                                                [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
367
                                                    <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
368
                                                [% ELSE %]
369
                                                    <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
370
                                                [% END %]
371
                                            </optgroup>
372
                                            <optgroup label="Copyright date">
373
                                                [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
374
                                                    <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
375
                                                [% ELSE %]
376
                                                    <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
377
                                                [% END %]
378
                                                [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
379
                                                    <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
380
                                                [% ELSE %]
381
                                                    <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
382
                                                [% END %]
383
                                            </optgroup>
384
                                            <optgroup label="Date added">
385
                                                [% IF sortfield == "dateadded" && direction == 'asc' %]
386
                                                    <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
387
                                                [% ELSE %]
388
                                                    <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
389
                                                [% END %]
390
                                                [% IF sortfield == "dateadded" && direction == 'desc' %]
391
                                                    <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
392
                                                [% ELSE %]
393
                                                    <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
394
                                                [% END %]
395
                                            </optgroup>
396
                                        </select>
397
398
                                        <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
399
                                    </form>
400
                                    <!-- /#sorting-form -->
401
                                </div>
408
                                </div>
402
                                <!-- / #toolbar -->
409
                                <!-- / .toolbar-collapse -->
403
                                [% INCLUDE 'result-batch-controls.inc' %]
404
                            </div>
410
                            </div>
405
                            <!-- /#floating -->
411
                            <!-- /#floating -->
406
412
Lines 1094-1099 Link Here
1094
                Dopop( link );
1100
                Dopop( link );
1095
            });
1101
            });
1096
1102
1103
            $(".toolbar-collapse-toggle").on("click", function(e) {
1104
                e.preventDefault();
1105
                var $toggle = $(this);
1106
                var $collapse = $toggle.siblings(".toolbar-collapse");
1107
                var isOpen = $collapse.hasClass("open");
1108
                $collapse.toggleClass("open");
1109
                $toggle.attr("aria-expanded", !isOpen ? "true" : "false");
1110
                $toggle.find("i").toggleClass("fa-bars fa-times");
1111
            });
1112
1097
        }); // document.ready
1113
        }); // document.ready
1098
1114
1099
        function sortMenu( sorting_form ){
1115
        function sortMenu( sorting_form ){
1100
- 

Return to bug 41963