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 |
|
6 |
|
Lines 10-16
Link Here
|
10 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline"> |
8 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline"> |
11 |
<input type="hidden" name="op" value="delete" /> |
9 |
<input type="hidden" name="op" value="delete" /> |
12 |
<input type="hidden" name="referer" value="list" /> |
10 |
<input type="hidden" name="referer" value="list" /> |
13 |
<input type='hidden' name='category' value='[% category | html %]' /> |
11 |
<input type='hidden' name='public' value='[% public | html %]' /> |
14 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
12 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | 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 %]"> |
13 |
<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 %]"> |
16 |
<i class="fa fa-remove" aria-hidden="true"></i> |
14 |
<i class="fa fa-remove" aria-hidden="true"></i> |
Lines 80-86
Link Here
|
80 |
[% IF shelf and shelf.is_private %] |
78 |
[% IF shelf and shelf.is_private %] |
81 |
[% IF op == 'view' OR op == 'edit_form' %] |
79 |
[% IF op == 'view' OR op == 'edit_form' %] |
82 |
<li class="breadcrumb-item"> |
80 |
<li class="breadcrumb-item"> |
83 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a> |
81 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a> |
84 |
</li> |
82 |
</li> |
85 |
[% ELSE %] |
83 |
[% ELSE %] |
86 |
<li class="breadcrumb-item active"> |
84 |
<li class="breadcrumb-item active"> |
Lines 90-96
Link Here
|
90 |
[% ELSIF shelf AND shelf.is_public %] |
88 |
[% ELSIF shelf AND shelf.is_public %] |
91 |
[% IF op == 'view' %] |
89 |
[% IF op == 'view' %] |
92 |
<li class="breadcrumb-item"> |
90 |
<li class="breadcrumb-item"> |
93 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a> |
91 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a> |
94 |
</li> |
92 |
</li> |
95 |
[% ELSE %] |
93 |
[% ELSE %] |
96 |
<li class="breadcrumb-item active"> |
94 |
<li class="breadcrumb-item active"> |
Lines 231-251
Link Here
|
231 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
229 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
232 |
<input type="hidden" name="op" value="edit_form" /> |
230 |
<input type="hidden" name="op" value="edit_form" /> |
233 |
<input type="hidden" name="referer" value="view" /> |
231 |
<input type="hidden" name="referer" value="view" /> |
234 |
<input type='hidden' name='category' value='[% shelf.category | html %]' /> |
232 |
<input type='hidden' name='public' value='[% shelf.public | html %]' /> |
235 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
233 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
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> |
234 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button> |
237 |
</form> |
235 |
</form> |
238 |
|
236 |
|
239 |
[% PROCESS delete_shelf context = "details" %] |
237 |
[% PROCESS delete_shelf context = "details" %] |
240 |
|
238 |
|
241 |
[% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %] |
239 |
[% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %] |
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> |
240 |
<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> |
243 |
[% END %] |
241 |
[% END %] |
244 |
[% ELSIF category == PRIVATE # not manageshelf and private means shared %] |
242 |
[% ELSIF !public # not manageshelf and private means shared %] |
245 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline"> |
243 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline"> |
246 |
<input type="hidden" name="op" value="remove_share" /> |
244 |
<input type="hidden" name="op" value="remove_share" /> |
247 |
<input type="hidden" name="referer" value="list" /> |
245 |
<input type="hidden" name="referer" value="list" /> |
248 |
<input type='hidden' name='category' value='[% category | html %]' /> |
246 |
<input type='hidden' name='public' value='[% public | html %]' /> |
249 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
247 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
250 |
<button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]"> |
248 |
<button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]"> |
251 |
<i class="fa fa-remove" aria-hidden="true"></i> Remove share |
249 |
<i class="fa fa-remove" aria-hidden="true"></i> Remove share |
Lines 522-528
Link Here
|
522 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
520 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline"> |
523 |
<input type="hidden" name="op" value="edit_form" /> |
521 |
<input type="hidden" name="op" value="edit_form" /> |
524 |
<input type="hidden" name="referer" value="view" /> |
522 |
<input type="hidden" name="referer" value="view" /> |
525 |
<input type="hidden" name="category" value="[% shelf.category | html %]" /> |
523 |
<input type="hidden" name="public" value="[% shelf.public | html %]" /> |
526 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
524 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
527 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button> |
525 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button> |
528 |
</form> |
526 |
</form> |
Lines 600-618
Link Here
|
600 |
[% END %] |
598 |
[% END %] |
601 |
</select> |
599 |
</select> |
602 |
</li> |
600 |
</li> |
603 |
[% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %] |
601 |
[% IF Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %] |
604 |
<li> |
602 |
<li> |
605 |
<label for="category">Category:</label> |
603 |
<label for="public">Category:</label> |
606 |
<select name="category" id="category" onchange="AdjustRemark()"> |
604 |
<select name="public" id="public" onchange="AdjustRemark()"> |
607 |
[% IF shelf.is_private %] |
605 |
[% IF shelf.is_private %] |
608 |
<option value="1" selected="selected">Private</option> |
606 |
<option value="0" selected="selected">Private</option> |
609 |
[% ELSE %] |
607 |
[% ELSE %] |
610 |
<option value="1">Private</option> |
608 |
<option value="0">Private</option> |
611 |
[% END %] |
609 |
[% END %] |
612 |
[% IF shelf.is_public %] |
610 |
[% IF shelf.is_public %] |
613 |
<option value="2" selected="selected">Public</option> |
611 |
<option value="1" selected="selected">Public</option> |
614 |
[% ELSE %] |
612 |
[% ELSE %] |
615 |
<option value="2">Public</option> |
613 |
<option value="1">Public</option> |
616 |
[% END %] |
614 |
[% END %] |
617 |
</select> |
615 |
</select> |
618 |
[% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %] |
616 |
[% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %] |
Lines 622-629
Link Here
|
622 |
[% END %] |
620 |
[% END %] |
623 |
[% INCLUDE list_permissions %] |
621 |
[% INCLUDE list_permissions %] |
624 |
</ol> |
622 |
</ol> |
625 |
[% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %] |
623 |
[% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %] |
626 |
<input type="hidden" name="category" value="[% PRIVATE | html %]" /> |
624 |
<input type="hidden" name="public" value="0" /> |
627 |
[% END %] |
625 |
[% END %] |
628 |
</fieldset> <!-- /.rows --> |
626 |
</fieldset> <!-- /.rows --> |
629 |
|
627 |
|
Lines 632-638
Link Here
|
632 |
[% IF referer == 'view' %] |
630 |
[% IF referer == 'view' %] |
633 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a> |
631 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a> |
634 |
[% ELSE %] |
632 |
[% ELSE %] |
635 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a> |
633 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0" class="cancel">Cancel</a> |
636 |
[% END %] |
634 |
[% END %] |
637 |
</fieldset> |
635 |
</fieldset> |
638 |
</form> |
636 |
</form> |
Lines 642-667
Link Here
|
642 |
<div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> |
640 |
<div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> |
643 |
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
641 |
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
644 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
642 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
645 |
[% IF category == PRIVATE %] |
643 |
[% IF !public %] |
646 |
<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> |
644 |
<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> |
647 |
[% ELSE %] |
645 |
[% ELSE %] |
648 |
<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> |
646 |
<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> |
649 |
[% END %] |
647 |
[% END %] |
650 |
[% END %] |
648 |
[% END %] |
651 |
[% IF category == PUBLIC %] |
649 |
[% IF public %] |
652 |
<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> |
650 |
<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> |
653 |
[% ELSE %] |
651 |
[% ELSE %] |
654 |
<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> |
652 |
<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> |
655 |
[% END %] |
653 |
[% END %] |
656 |
</ul> |
654 |
</ul> |
657 |
|
655 |
|
658 |
[% IF category == PRIVATE %] |
656 |
[% IF !public %] |
659 |
<div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
657 |
<div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
660 |
[% ELSE %] |
658 |
[% ELSE %] |
661 |
<div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
659 |
<div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
662 |
[% END %] |
660 |
[% END %] |
663 |
|
661 |
|
664 |
[% IF category == PRIVATE || Koha.Preference('OpacAllowPublicListCreation') %] |
662 |
[% IF !public || Koha.Preference('OpacAllowPublicListCreation') %] |
665 |
[% IF loggedinusername %] |
663 |
[% IF loggedinusername %] |
666 |
<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> |
664 |
<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> |
667 |
[% ELSE %] |
665 |
[% ELSE %] |
Lines 673-681
Link Here
|
673 |
|
671 |
|
674 |
[% IF shelves.count %] |
672 |
[% IF shelves.count %] |
675 |
<table class="table"> |
673 |
<table class="table"> |
676 |
[% IF category == PRIVATE %] |
674 |
[% IF !public %] |
677 |
<caption class="sr-only">Your lists</caption> |
675 |
<caption class="sr-only">Your lists</caption> |
678 |
[% ELSIF category == PUBLIC %] |
676 |
[% ELSIF public %] |
679 |
<caption class="sr-only">Public lists</caption> |
677 |
<caption class="sr-only">Public lists</caption> |
680 |
[% END %] |
678 |
[% END %] |
681 |
<thead> |
679 |
<thead> |
Lines 703-709
Link Here
|
703 |
[% IF s.can_be_managed( loggedinusernumber ) %] |
701 |
[% IF s.can_be_managed( loggedinusernumber ) %] |
704 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline"> |
702 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline"> |
705 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
703 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
706 |
<input type="hidden" name="category" value="[% s.category | html %]" /> |
704 |
<input type="hidden" name="public" value="[% s.public | html %]" /> |
707 |
<input type="hidden" name="op" value="edit_form" /> |
705 |
<input type="hidden" name="op" value="edit_form" /> |
708 |
<input type="hidden" name="referer" value="list" /> |
706 |
<input type="hidden" name="referer" value="list" /> |
709 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button> |
707 |
<button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button> |
Lines 719-725
Link Here
|
719 |
<form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline"> |
717 |
<form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline"> |
720 |
<input type="hidden" name="op" value="remove_share" /> |
718 |
<input type="hidden" name="op" value="remove_share" /> |
721 |
<input type="hidden" name="referer" value="list" /> |
719 |
<input type="hidden" name="referer" value="list" /> |
722 |
<input type='hidden' name='category' value='[% category | html %]' /> |
720 |
<input type='hidden' name='public' value='[% public | html %]' /> |
723 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
721 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
724 |
<button type="submit" class="btn btn-link remove remove_share" |
722 |
<button type="submit" class="btn btn-link remove remove_share" |
725 |
data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button> |
723 |
data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button> |
Lines 732-738
Link Here
|
732 |
</table> <!-- /.table --> |
730 |
</table> <!-- /.table --> |
733 |
<div class="pages">[% pagination_bar | $raw %]</div> |
731 |
<div class="pages">[% pagination_bar | $raw %]</div> |
734 |
[% ELSE %] |
732 |
[% ELSE %] |
735 |
[% IF category == PUBLIC %] |
733 |
[% IF public %] |
736 |
<p>No public lists.</p> |
734 |
<p>No public lists.</p> |
737 |
[% ELSIF loggedinusernumber %] |
735 |
[% ELSIF loggedinusernumber %] |
738 |
<p>No private lists.</p> |
736 |
<p>No private lists.</p> |
Lines 1031-1047
function sortMenu( sorting_form ){
Link Here
|
1031 |
} |
1029 |
} |
1032 |
|
1030 |
|
1033 |
function AdjustRemark() { |
1031 |
function AdjustRemark() { |
1034 |
var category; |
1032 |
var public; |
1035 |
if( $("#category").length > 0 ) { |
1033 |
if( $("#public").length > 0 ) { |
1036 |
category = $("#category").val(); |
1034 |
public = $("#public").val(); |
1037 |
} else { |
1035 |
} else { |
1038 |
category = "[% category | html %]"; |
1036 |
public = "[% public | html %]"; |
1039 |
} |
1037 |
} |
1040 |
var perms = $("#allow_changes_from").val(); |
1038 |
var perms = $("#allow_changes_from").val(); |
1041 |
|
1039 |
|
1042 |
if( perms < 2 ) { |
1040 |
if( perms < 2 ) { |
1043 |
$("#anyone_remark").hide(); |
1041 |
$("#anyone_remark").hide(); |
1044 |
} else if( category==1 ) { |
1042 |
} else if( public==0 ) { |
1045 |
// If we move to Private (without shares), show Anyone remark |
1043 |
// If we move to Private (without shares), show Anyone remark |
1046 |
// Note: the number of shares is not tested real-time |
1044 |
// Note: the number of shares is not tested real-time |
1047 |
[% IF !shelf.is_shared %] |
1045 |
[% IF !shelf.is_shared %] |