|
Lines 258-411
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 |
<a href="#" class="toolbar-collapse-toggle d-none" aria-expanded="false" aria-controls="toolbar-collapse-content"> |
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 |
<i class="fa fa-bars" aria-hidden="true"></i> List actions |
|
|
| 263 |
</a> |
| 264 |
<div class="toolbar-collapse" id="toolbar-collapse-content"> |
262 |
<div class="toolbar-collapse" id="toolbar-collapse-content"> |
| 265 |
<div id="toolbar" class="toolbar clearfix"> |
263 |
<div id="toolbar" class="toolbar clearfix"> |
| 266 |
<div class="list-actions"> |
264 |
<div class="list-actions"> |
| 267 |
<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> |
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> |
| 268 |
|
266 |
|
| 269 |
<div id="download-list" class="btn-group dropdown"> |
267 |
<div id="download-list" class="btn-group dropdown"> |
| 270 |
<a |
268 |
<a |
| 271 |
id="format" |
269 |
id="format" |
| 272 |
class="btn btn-link dropdown-toggle" |
270 |
class="btn btn-link dropdown-toggle" |
| 273 |
aria-haspopup="menu" |
271 |
aria-haspopup="menu" |
| 274 |
aria-label="Select format and download list" |
272 |
aria-label="Select format and download list" |
| 275 |
data-bs-toggle="dropdown" |
273 |
data-bs-toggle="dropdown" |
| 276 |
href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]" |
274 |
href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]" |
| 277 |
><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download <b class="caret"></b |
275 |
><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download <b class="caret"></b |
| 278 |
></a> |
276 |
></a> |
| 279 |
<div class="dropdown-menu pull-left" role="menu" aria-labelledby="format"> |
277 |
<div class="dropdown-menu pull-left" role="menu" aria-labelledby="format"> |
| 280 |
<a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a> |
278 |
<a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a> |
| 281 |
[% IF Koha.Preference('OPACISBD') %]<a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>[% END %] |
279 |
[% IF Koha.Preference('OPACISBD') %]<a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>[% END %] |
| 282 |
<a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a> |
280 |
<a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a> |
| 283 |
<a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a> |
281 |
<a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a> |
| 284 |
[% FOREACH csv_profile IN csv_profiles %] |
282 |
[% FOREACH csv_profile IN csv_profiles %] |
| 285 |
<a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a> |
283 |
<a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a> |
| 286 |
[% END %] |
284 |
[% END %] |
|
|
285 |
</div> |
| 287 |
</div> |
286 |
</div> |
| 288 |
</div> |
|
|
| 289 |
|
287 |
|
| 290 |
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( ! Koha.Preference('OPACDisableSendList') ) %] |
288 |
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( ! Koha.Preference('OPACDisableSendList') ) %] |
| 291 |
<span class="sendlist" |
289 |
<span class="sendlist" |
| 292 |
><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&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 |
| 293 |
> |
299 |
> |
| 294 |
[% END %] |
|
|
| 295 |
|
300 |
|
| 296 |
<a |
301 |
[% IF can_manage_shelf %] |
| 297 |
class="btn btn-link print-small" |
302 |
<span class="sep">|</span> |
| 298 |
target="_blank" |
303 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
| 299 |
href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | html %]&sortfield=[% sortfield | html %]&direction=[% direction | uri %]&print=1" |
304 |
<input type="hidden" name="op" value="edit_form" /> |
| 300 |
><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print list</a |
305 |
<input type="hidden" name="referer" value="view" /> |
| 301 |
> |
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 --> |
| 302 |
|
332 |
|
| 303 |
[% IF can_manage_shelf %] |
333 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by"> |
| 304 |
<span class="sep">|</span> |
334 |
<input type="hidden" name="op" value="view" /> |
| 305 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
335 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
| 306 |
<input type="hidden" name="op" value="edit_form" /> |
|
|
| 307 |
<input type="hidden" name="referer" value="view" /> |
| 308 |
<input type="hidden" name="public" value="[% shelf.public | html %]" /> |
| 309 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
| 310 |
<button type="submit" class="btn btn-link editshelf"><i class="fa-fw fa-solid fa-pencil" aria-hidden="true"></i> Edit list</button> |
| 311 |
</form> |
| 312 |
|
336 |
|
| 313 |
[% 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> |
| 314 |
|
401 |
|
| 315 |
[% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %] |
402 |
<input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" /> |
| 316 |
<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> |
| 317 |
[% END %] |
404 |
<!-- /#sorting-form --> |
| 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> |
405 |
</div> |
| 331 |
<!-- /.list-actions --> |
406 |
<!-- / #toolbar --> |
| 332 |
|
407 |
[% INCLUDE 'result-batch-controls.inc' %] |
| 333 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by"> |
|
|
| 334 |
<input type="hidden" name="op" value="view" /> |
| 335 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
| 336 |
|
| 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> |
| 401 |
|
| 402 |
<input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" /> |
| 403 |
</form> |
| 404 |
<!-- /#sorting-form --> |
| 405 |
</div> |
408 |
</div> |
| 406 |
<!-- / #toolbar --> |
409 |
<!-- / .toolbar-collapse --> |
| 407 |
[% INCLUDE 'result-batch-controls.inc' %] |
|
|
| 408 |
</div> <!-- / .toolbar-collapse --> |
| 409 |
</div> |
410 |
</div> |
| 410 |
<!-- /#floating --> |
411 |
<!-- /#floating --> |
| 411 |
|
412 |
|
|
Lines 1099-1114
Link Here
|
| 1099 |
Dopop( link ); |
1100 |
Dopop( link ); |
| 1100 |
}); |
1101 |
}); |
| 1101 |
|
1102 |
|
| 1102 |
$(".toolbar-collapse-toggle").on("click", function(e) { |
|
|
| 1103 |
e.preventDefault(); |
| 1104 |
var $toggle = $(this); |
| 1105 |
var $collapse = $toggle.siblings(".toolbar-collapse"); |
| 1106 |
var isOpen = $collapse.hasClass("open"); |
| 1107 |
$collapse.toggleClass("open"); |
| 1108 |
$toggle.attr("aria-expanded", !isOpen ? "true" : "false"); |
| 1109 |
$toggle.find("i").toggleClass("fa-bars fa-times"); |
| 1110 |
}); |
| 1111 |
|
| 1112 |
}); // document.ready |
1103 |
}); // document.ready |
| 1113 |
|
1104 |
|
| 1114 |
function sortMenu( sorting_form ){ |
1105 |
function sortMenu( sorting_form ){ |