Lines 1-8
Link Here
|
1 |
[% USE raw %] |
1 |
[% USE raw %] |
2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
3 |
[% USE Koha %] |
3 |
[% USE Koha %] |
4 |
[% SET PRIVATE = 1 %] |
|
|
5 |
[% SET PUBLIC = 2 %] |
6 |
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %] |
4 |
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %] |
7 |
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %] |
5 |
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %] |
8 |
[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] |
6 |
[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] |
Lines 12-18
Link Here
|
12 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline"> |
10 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline"> |
13 |
<input type="hidden" name="op" value="delete" /> |
11 |
<input type="hidden" name="op" value="delete" /> |
14 |
<input type="hidden" name="referer" value="list" /> |
12 |
<input type="hidden" name="referer" value="list" /> |
15 |
<input type='hidden' name='category' value='[% category | html %]' /> |
13 |
<input type='hidden' name='public' value='[% public | html %]' /> |
16 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
14 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
17 |
<button type="submit" class="btn btn-link remove deleteshelf" data-shelfnumber="[% shelf.shelfnumber | html %]" data-shelfname="[% shelf.shelfname | html %]" data-shared="[% shelf.is_shared | html %]" data-count="[% contents.count | html %]"> |
15 |
<button type="submit" class="btn btn-link remove deleteshelf" data-shelfnumber="[% shelf.shelfnumber | html %]" data-shelfname="[% shelf.shelfname | html %]" data-shared="[% shelf.is_shared | html %]" data-count="[% contents.count | html %]"> |
18 |
<i class="fa fa-remove" aria-hidden="true"></i> |
16 |
<i class="fa fa-remove" aria-hidden="true"></i> |
Lines 82-88
Link Here
|
82 |
[% IF shelf and shelf.is_private %] |
80 |
[% IF shelf and shelf.is_private %] |
83 |
[% IF op == 'view' OR op == 'edit_form' %] |
81 |
[% IF op == 'view' OR op == 'edit_form' %] |
84 |
<li class="breadcrumb-item"> |
82 |
<li class="breadcrumb-item"> |
85 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a> |
83 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a> |
86 |
</li> |
84 |
</li> |
87 |
[% ELSE %] |
85 |
[% ELSE %] |
88 |
<li class="breadcrumb-item" aria-current="page"> |
86 |
<li class="breadcrumb-item" aria-current="page"> |
Lines 92-98
Link Here
|
92 |
[% ELSIF shelf AND shelf.is_public %] |
90 |
[% ELSIF shelf AND shelf.is_public %] |
93 |
[% IF op == 'view' %] |
91 |
[% IF op == 'view' %] |
94 |
<li class="breadcrumb-item"> |
92 |
<li class="breadcrumb-item"> |
95 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a> |
93 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a> |
96 |
</li> |
94 |
</li> |
97 |
[% ELSE %] |
95 |
[% ELSE %] |
98 |
<li class="breadcrumb-item" aria-current="page"> |
96 |
<li class="breadcrumb-item" aria-current="page"> |
Lines 233-253
Link Here
|
233 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
231 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
234 |
<input type="hidden" name="op" value="edit_form" /> |
232 |
<input type="hidden" name="op" value="edit_form" /> |
235 |
<input type="hidden" name="referer" value="view" /> |
233 |
<input type="hidden" name="referer" value="view" /> |
236 |
<input type='hidden' name='category' value='[% shelf.category | html %]' /> |
234 |
<input type='hidden' name='public' value='[% shelf.public | html %]' /> |
237 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
235 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
238 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button> |
236 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button> |
239 |
</form> |
237 |
</form> |
240 |
|
238 |
|
241 |
[% PROCESS delete_shelf context = "details" %] |
239 |
[% PROCESS delete_shelf context = "details" %] |
242 |
|
240 |
|
243 |
[% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %] |
241 |
[% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %] |
244 |
<a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link sharelist"><i class="fa fa-fw fa-share" aria-hidden="true"></i> Share list</a> |
242 |
<a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link sharelist"><i class="fa fa-fw fa-share" aria-hidden="true"></i> Share list</a> |
245 |
[% END %] |
243 |
[% END %] |
246 |
[% ELSIF category == PRIVATE # not manageshelf and private means shared %] |
244 |
[% ELSIF !public # not manageshelf and private means shared %] |
247 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline"> |
245 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline"> |
248 |
<input type="hidden" name="op" value="remove_share" /> |
246 |
<input type="hidden" name="op" value="remove_share" /> |
249 |
<input type="hidden" name="referer" value="list" /> |
247 |
<input type="hidden" name="referer" value="list" /> |
250 |
<input type='hidden' name='category' value='[% category | html %]' /> |
248 |
<input type='hidden' name='public' value='[% public | html %]' /> |
251 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
249 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
252 |
<button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]"> |
250 |
<button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]"> |
253 |
<i class="fa fa-remove" aria-hidden="true"></i> Remove share |
251 |
<i class="fa fa-remove" aria-hidden="true"></i> Remove share |
Lines 526-532
Link Here
|
526 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
524 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
527 |
<input type="hidden" name="op" value="edit_form" /> |
525 |
<input type="hidden" name="op" value="edit_form" /> |
528 |
<input type="hidden" name="referer" value="view" /> |
526 |
<input type="hidden" name="referer" value="view" /> |
529 |
<input type="hidden" name="category" value="[% shelf.category | html %]" /> |
527 |
<input type="hidden" name="public" value="[% shelf.public | html %]" /> |
530 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
528 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
531 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button> |
529 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button> |
532 |
</form> |
530 |
</form> |
Lines 604-622
Link Here
|
604 |
[% END %] |
602 |
[% END %] |
605 |
</select> |
603 |
</select> |
606 |
</li> |
604 |
</li> |
607 |
[% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %] |
605 |
[% IF Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %] |
608 |
<li> |
606 |
<li> |
609 |
<label for="category">Category:</label> |
607 |
<label for="public">Category:</label> |
610 |
<select name="category" id="category" onchange="AdjustRemark()"> |
608 |
<select name="public" id="public" onchange="AdjustRemark()"> |
611 |
[% IF shelf.is_private %] |
609 |
[% IF shelf.is_private %] |
612 |
<option value="1" selected="selected">Private</option> |
610 |
<option value="0" selected="selected">Private</option> |
613 |
[% ELSE %] |
611 |
[% ELSE %] |
614 |
<option value="1">Private</option> |
612 |
<option value="0">Private</option> |
615 |
[% END %] |
613 |
[% END %] |
616 |
[% IF shelf.is_public %] |
614 |
[% IF shelf.is_public %] |
617 |
<option value="2" selected="selected">Public</option> |
615 |
<option value="1" selected="selected">Public</option> |
618 |
[% ELSE %] |
616 |
[% ELSE %] |
619 |
<option value="2">Public</option> |
617 |
<option value="1">Public</option> |
620 |
[% END %] |
618 |
[% END %] |
621 |
</select> |
619 |
</select> |
622 |
[% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %] |
620 |
[% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %] |
Lines 626-633
Link Here
|
626 |
[% END %] |
624 |
[% END %] |
627 |
[% INCLUDE list_permissions %] |
625 |
[% INCLUDE list_permissions %] |
628 |
</ol> |
626 |
</ol> |
629 |
[% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %] |
627 |
[% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %] |
630 |
<input type="hidden" name="category" value="[% PRIVATE | html %]" /> |
628 |
<input type="hidden" name="public" value="0" /> |
631 |
[% END %] |
629 |
[% END %] |
632 |
</fieldset> <!-- /.rows --> |
630 |
</fieldset> <!-- /.rows --> |
633 |
|
631 |
|
Lines 636-642
Link Here
|
636 |
[% IF referer == 'view' %] |
634 |
[% IF referer == 'view' %] |
637 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a> |
635 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a> |
638 |
[% ELSE %] |
636 |
[% ELSE %] |
639 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a> |
637 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0" class="cancel">Cancel</a> |
640 |
[% END %] |
638 |
[% END %] |
641 |
</fieldset> |
639 |
</fieldset> |
642 |
</form> |
640 |
</form> |
Lines 646-671
Link Here
|
646 |
<div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> |
644 |
<div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> |
647 |
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
645 |
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
648 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
646 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
649 |
[% IF category == PRIVATE %] |
647 |
[% IF !public %] |
650 |
<li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | html %]">Your lists</a></li> |
648 |
<li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a></li> |
651 |
[% ELSE %] |
649 |
[% ELSE %] |
652 |
<li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | html %]">Your lists</a></li> |
650 |
<li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a></li> |
653 |
[% END %] |
651 |
[% END %] |
654 |
[% END %] |
652 |
[% END %] |
655 |
[% IF category == PUBLIC %] |
653 |
[% IF public %] |
656 |
<li id="publicshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | html %]">Public lists</a></li> |
654 |
<li id="publicshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a></li> |
657 |
[% ELSE %] |
655 |
[% ELSE %] |
658 |
<li id="publicshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | html %]">Public lists</a></li> |
656 |
<li id="publicshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a></li> |
659 |
[% END %] |
657 |
[% END %] |
660 |
</ul> |
658 |
</ul> |
661 |
|
659 |
|
662 |
[% IF category == PRIVATE %] |
660 |
[% IF !public %] |
663 |
<div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
661 |
<div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
664 |
[% ELSE %] |
662 |
[% ELSE %] |
665 |
<div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
663 |
<div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
666 |
[% END %] |
664 |
[% END %] |
667 |
|
665 |
|
668 |
[% IF category == PRIVATE || Koha.Preference('OpacAllowPublicListCreation') %] |
666 |
[% IF !public || Koha.Preference('OpacAllowPublicListCreation') %] |
669 |
[% IF loggedinusername %] |
667 |
[% IF loggedinusername %] |
670 |
<div id="toolbar" class="toolbar"><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> |
668 |
<div id="toolbar" class="toolbar"><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> |
671 |
[% ELSE %] |
669 |
[% ELSE %] |
Lines 677-685
Link Here
|
677 |
|
675 |
|
678 |
[% IF shelves.count %] |
676 |
[% IF shelves.count %] |
679 |
<table class="table"> |
677 |
<table class="table"> |
680 |
[% IF category == PRIVATE %] |
678 |
[% IF !public %] |
681 |
<caption class="sr-only">Your lists</caption> |
679 |
<caption class="sr-only">Your lists</caption> |
682 |
[% ELSIF category == PUBLIC %] |
680 |
[% ELSIF public %] |
683 |
<caption class="sr-only">Public lists</caption> |
681 |
<caption class="sr-only">Public lists</caption> |
684 |
[% END %] |
682 |
[% END %] |
685 |
<thead> |
683 |
<thead> |
Lines 707-713
Link Here
|
707 |
[% IF s.can_be_managed( loggedinusernumber ) %] |
705 |
[% IF s.can_be_managed( loggedinusernumber ) %] |
708 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline"> |
706 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline"> |
709 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
707 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
710 |
<input type="hidden" name="category" value="[% s.category | html %]" /> |
708 |
<input type="hidden" name="public" value="[% s.public | html %]" /> |
711 |
<input type="hidden" name="op" value="edit_form" /> |
709 |
<input type="hidden" name="op" value="edit_form" /> |
712 |
<input type="hidden" name="referer" value="list" /> |
710 |
<input type="hidden" name="referer" value="list" /> |
713 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button> |
711 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button> |
Lines 723-729
Link Here
|
723 |
<form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline"> |
721 |
<form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline"> |
724 |
<input type="hidden" name="op" value="remove_share" /> |
722 |
<input type="hidden" name="op" value="remove_share" /> |
725 |
<input type="hidden" name="referer" value="list" /> |
723 |
<input type="hidden" name="referer" value="list" /> |
726 |
<input type='hidden' name='category' value='[% category | html %]' /> |
724 |
<input type='hidden' name='public' value='[% public | html %]' /> |
727 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
725 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
728 |
<button type="submit" class="btn btn-link remove remove_share" |
726 |
<button type="submit" class="btn btn-link remove remove_share" |
729 |
data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button> |
727 |
data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button> |
Lines 736-742
Link Here
|
736 |
</table> <!-- /.table --> |
734 |
</table> <!-- /.table --> |
737 |
<div class="pages">[% pagination_bar | $raw %]</div> |
735 |
<div class="pages">[% pagination_bar | $raw %]</div> |
738 |
[% ELSE %] |
736 |
[% ELSE %] |
739 |
[% IF category == PUBLIC %] |
737 |
[% IF public %] |
740 |
<p>No public lists.</p> |
738 |
<p>No public lists.</p> |
741 |
[% ELSIF loggedinusernumber %] |
739 |
[% ELSIF loggedinusernumber %] |
742 |
<p>No private lists.</p> |
740 |
<p>No private lists.</p> |
Lines 1035-1051
function sortMenu( sorting_form ){
Link Here
|
1035 |
} |
1033 |
} |
1036 |
|
1034 |
|
1037 |
function AdjustRemark() { |
1035 |
function AdjustRemark() { |
1038 |
var category; |
1036 |
var public; |
1039 |
if( $("#category").length > 0 ) { |
1037 |
if( $("#public").length > 0 ) { |
1040 |
category = $("#category").val(); |
1038 |
public = $("#public").val(); |
1041 |
} else { |
1039 |
} else { |
1042 |
category = "[% category | html %]"; |
1040 |
public = "[% public | html %]"; |
1043 |
} |
1041 |
} |
1044 |
var perms = $("#allow_changes_from").val(); |
1042 |
var perms = $("#allow_changes_from").val(); |
1045 |
|
1043 |
|
1046 |
if( perms < 2 ) { |
1044 |
if( perms < 2 ) { |
1047 |
$("#anyone_remark").hide(); |
1045 |
$("#anyone_remark").hide(); |
1048 |
} else if( category==1 ) { |
1046 |
} else if( public==0 ) { |
1049 |
// If we move to Private (without shares), show Anyone remark |
1047 |
// If we move to Private (without shares), show Anyone remark |
1050 |
// Note: the number of shares is not tested real-time |
1048 |
// Note: the number of shares is not tested real-time |
1051 |
[% IF !shelf.is_shared %] |
1049 |
[% IF !shelf.is_shared %] |