Lines 1-9
Link Here
|
1 |
[% USE Koha %] |
1 |
[% USE Koha %] |
2 |
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %] |
2 |
[% SET PRIVATE = 1 %] |
3 |
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %] |
3 |
[% SET PUBLIC = 2 %] |
|
|
4 |
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %] |
5 |
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %] |
4 |
|
6 |
|
5 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF ( viewshelf ) %]Contents of [% shelfname |html %][% ELSE %]Your lists[% END %]</title>[% INCLUDE 'doc-head-close.inc' %] |
8 |
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF op == 'view' %]Contents of [% shelf.shelfname |html %][% ELSE %]Your lists[% END %]</title>[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% BLOCK cssinclude %][% END %] |
9 |
[% BLOCK cssinclude %][% END %] |
8 |
</head> |
10 |
</head> |
9 |
[% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %][% END %] |
11 |
[% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %][% END %] |
Lines 12-46
Link Here
|
12 |
<li> |
14 |
<li> |
13 |
<label for="allow_add">Permissions: </label> |
15 |
<label for="allow_add">Permissions: </label> |
14 |
<select name="allow_add" id="allow_add"> |
16 |
<select name="allow_add" id="allow_add"> |
15 |
[% IF allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
17 |
[% IF shelf.allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
16 |
[% IF allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
18 |
[% IF shelf.allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
17 |
</select> |
19 |
</select> |
18 |
<span>anyone else to add entries. (The owner of a list is always allowed to add entries, but needs permission to remove.)</span> |
20 |
<span>anyone else to add entries. (The owner of a list is always allowed to add entries, but needs permission to remove.)</span> |
19 |
</li> |
21 |
</li> |
20 |
<li> |
22 |
<li> |
21 |
<label> </label> |
23 |
<label> </label> |
22 |
<select name="allow_delete_own" id="allow_delete_own"> |
24 |
<select name="allow_delete_own" id="allow_delete_own"> |
23 |
[% IF allow_delete_own %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
25 |
[% IF shelf.allow_delete_own %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
24 |
[% IF allow_delete_own %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
26 |
[% IF shelf.allow_delete_own %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
25 |
</select> |
27 |
</select> |
26 |
<span>anyone to remove his own contributed entries.</span> |
28 |
<span>anyone to remove his own contributed entries.</span> |
27 |
</li> |
29 |
</li> |
28 |
<li> |
30 |
<li> |
29 |
<label> </label> |
31 |
<label> </label> |
30 |
<select name="allow_delete_other" id="allow_delete_other"> |
32 |
<select name="allow_delete_other" id="allow_delete_other"> |
31 |
[% IF allow_delete_other %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
33 |
[% IF shelf.allow_delete_other %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
32 |
[% IF allow_delete_other %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
34 |
[% IF shelf.allow_delete_other %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
33 |
</select> |
35 |
</select> |
34 |
<span>anyone to remove other contributed entries.</span> |
36 |
<span>anyone to remove other contributed entries.</span> |
35 |
</li> |
37 |
</li> |
36 |
[% END %] |
38 |
[% END %] |
37 |
[% BLOCK remove_share %] |
|
|
38 |
[%# Use: add parameter shelfnumber and add end form tag %] |
39 |
<form action="opac-shelves.pl" method="post" class="form-inline"> |
40 |
<input type="hidden" name="shelves" value="1" /> |
41 |
<input type="hidden" name="display" value="privateshelves" /> |
42 |
<input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" /> |
43 |
[% END %] |
44 |
|
39 |
|
45 |
[% INCLUDE 'masthead.inc' %] |
40 |
[% INCLUDE 'masthead.inc' %] |
46 |
<div class="main"> |
41 |
<div class="main"> |
Lines 50-91
Link Here
|
50 |
<li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">›</span></li> |
45 |
<li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">›</span></li> |
51 |
[% END %] |
46 |
[% END %] |
52 |
|
47 |
|
53 |
[% IF ( category1 ) %] |
48 |
[% IF op != 'list' %] |
54 |
[% IF ( viewshelf || edit ) %] |
49 |
<li><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a></li> |
55 |
<li><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your lists</a></li> |
50 |
[% ELSE %] |
56 |
[% ELSE %] |
51 |
<li>Lists</li> |
57 |
<li>Your lists</li> |
52 |
[% END %] |
58 |
[% END %] |
53 |
|
59 |
[% ELSIF ( category2 ) %] |
54 |
[% IF shelf and shelf.category == PRIVATE %] |
60 |
[% IF ( viewshelf || edit ) %] |
55 |
[% IF op == 'view' OR op == 'edit_form' %] |
61 |
<li><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public lists</a></li> |
56 |
<li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE %]">Your lists</a></li> |
62 |
[% ELSE %] |
|
|
63 |
<li>Public lists</li> |
64 |
[% END %] |
65 |
[% ELSIF ( showprivateshelves ) %] |
66 |
[% IF ( viewshelf || edit ) %] |
67 |
<li><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your lists</a></li> |
68 |
[% ELSE %] |
57 |
[% ELSE %] |
69 |
<li>Your lists</li> |
58 |
<li><span class="divider">›</span> Your lists</li> |
70 |
[% END %] |
59 |
[% END %] |
71 |
[% ELSIF ( showpublicshelves ) %] |
60 |
[% ELSIF shelf AND shelf.category == PUBLIC %] |
72 |
[% IF ( viewshelf || edit || shelves ) %] |
61 |
[% IF op == 'view' %] |
73 |
<li><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public lists</a></li> |
62 |
<li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC %]">Public lists</a></li> |
74 |
[% ELSE %] |
63 |
[% ELSE %] |
75 |
<li>Public lists</li> |
64 |
<li><span class="divider">›</span> Public lists</li> |
76 |
[% END %] |
65 |
[% END %] |
77 |
[% END %] |
66 |
[% END %] |
78 |
|
67 |
|
79 |
[% IF ( viewshelf ) %] |
68 |
[% IF op == 'view' %] |
80 |
<li><span class="divider">›</span> Contents of <i>[% shelfname | html %]</i></li> |
69 |
<li><span class="divider">›</span> Contents of <i>[% shelf.shelfname | html %]</i></li> |
81 |
[% END %] |
70 |
[% END %] |
82 |
|
71 |
|
83 |
[% IF ( shelves ) %] |
72 |
[% IF op == 'add_form' %] |
84 |
<li><span class="divider">›</span> Create new list</li> |
73 |
<li><span class="divider">›</span> Create new list</li> |
85 |
[% END %] |
74 |
[% END %] |
86 |
|
75 |
|
87 |
[% IF ( edit ) %] |
76 |
[% IF op == 'edit_form' %] |
88 |
<li><span class="divider">›</span> Edit list <i>[% shelfname | html %]</i></li> |
77 |
<li><span class="divider">›</span> Edit list <i>[% shelf.shelfname | html %]</i></li> |
89 |
[% END %] |
78 |
[% END %] |
90 |
|
79 |
|
91 |
</ul> <!-- / .breadcrumb --> |
80 |
</ul> <!-- / .breadcrumb --> |
Lines 107-158
Link Here
|
107 |
[% END %] |
96 |
[% END %] |
108 |
<div id="usershelves" class="maincontent"> |
97 |
<div id="usershelves" class="maincontent"> |
109 |
|
98 |
|
110 |
[% IF ( paramsloop ) %] |
99 |
[% FOR m IN messages %] |
111 |
[% FOREACH paramsloo IN paramsloop %] |
100 |
[% SWITCH m.type %] |
112 |
[% IF ( paramsloo.status ) %]<div class="alert">[% paramsloo.string %]</div>[% END %] |
101 |
[% CASE 'message' %] |
113 |
[% IF ( paramsloo.nobarcode ) %]<div class="alert">ERROR: No barcode given.</div>[% END %] |
102 |
<div class="alert alert-success" role="alert"> |
114 |
[% IF ( paramsloo.noshelfnumber ) %]<div class="alert">ERROR: No shelfnumber given.</div>[% END %] |
103 |
[% CASE 'error' %] |
115 |
[% IF ( paramsloo.need_confirm ) %] |
104 |
<div class="alert alert-danger" role="alert"> |
116 |
<div class="alert"> |
105 |
[% END %] |
117 |
The list <i>[% paramsloo.need_confirm %]</i> is not empty. |
106 |
[% SWITCH m.code %] |
118 |
<br />It has <b>[% paramsloo.count %]</b> [% IF paramsloo.count == 1 %]entry[% ELSE %]entries[% END %]. |
107 |
[% CASE 'error_on_update' %] |
119 |
<br />Use the "Confirm" button below to confirm deletion. |
108 |
An error occurred when updating this list. Perhaps the value already exists. |
120 |
</div> |
109 |
[% CASE 'error_on_insert' %] |
121 |
[% END %] |
110 |
An error occurred when inserting this list. Perhaps the name already exists. |
122 |
[% IF ( paramsloo.nopermission ) %] |
111 |
[% CASE 'error_on_delete' %] |
123 |
<div class="alert">ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission |html%].</div> |
112 |
An error occurred when deleteing this list. Check the logs. |
124 |
[% END %] |
113 |
[% CASE 'error_on_add_biblio' %] |
125 |
[% IF ( paramsloo.failgetitem ) %] |
114 |
The item has not been added to the list. Please check it's not in this list yet. |
126 |
<div class="alert">ERROR: No item found with barcode [% paramsloo.failgetitem %].</div> |
115 |
[% CASE 'error_on_remove_share' %] |
127 |
[% END %] |
116 |
The share has not been removed. |
128 |
[% IF ( paramsloo.duplicatebiblio ) %] |
117 |
[% CASE 'success_on_update' %] |
129 |
<div class="alert">A record matching barcode <b>[% paramsloo.duplicatebiblio %]</b> has already been added.</div> |
118 |
List updated with success. |
130 |
[% END %] |
119 |
[% CASE 'success_on_insert' %] |
131 |
[% IF ( paramsloo.delete_ok ) %] |
120 |
List inserted with success. |
132 |
<div class="alert alert-info">List [% paramsloo.delete_ok |html %] Deleted.</div> |
121 |
[% CASE 'success_on_delete' %] |
133 |
[% END %] |
122 |
List deleted with success. |
134 |
[% IF ( paramsloo.delete_fail ) %] |
123 |
[% CASE 'success_on_add_biblio' %] |
135 |
<div class="alert alert-info">ERROR: Database error. Delete (list number [% paramsloo.delete_fail |html %]) failed.</div> |
124 |
The item has been added to the list. |
136 |
[% END %] |
125 |
[% CASE 'success_on_remove_biblios' %] |
137 |
[% IF ( paramsloo.unrecognized ) %] |
126 |
The item has been removed from the list. |
138 |
<div class="alert alert-info">ERROR: List number [% paramsloo.unrecognized %] unrecognized.</div> |
127 |
[% CASE 'success_on_remove_share' %] |
139 |
[% END %] |
128 |
The share has been removed. |
140 |
[% IF ( paramsloo.modifyfailure) %] |
129 |
[% CASE 'does_not_exist' %] |
141 |
<div class="alert alert-info">ERROR: Shelf could not be renamed to [% paramsloo.modifyfailure %]. This name may not be unique for this type of list. Please check.</div> |
130 |
This list does not exist. |
142 |
[% END %] |
131 |
[% CASE 'item_does_not_exist' %] |
143 |
[% IF ( paramsloo.nothingdeleted) %] |
132 |
This item does not exist. |
144 |
<div class="alert alert-info">Warning: You could not delete any selected items from this shelf.</div> |
133 |
[% CASE 'unauthorized_on_view' %] |
145 |
[% END %] |
134 |
You do not have permission to view this list. |
146 |
[% IF ( paramsloo.somedeleted) %] |
135 |
[% CASE 'unauthorized_on_update' %] |
147 |
<div class="alert alert-info">Warning: You could not delete all selected items from this shelf.</div> |
136 |
You do not have permission to update this list. |
148 |
[% END %] |
137 |
[% CASE 'unauthorized_on_delete' %] |
149 |
[% END # / FOREACH paramsloop %] |
138 |
You do not have permission to delete this list. |
150 |
[% END # / IF paramsloop %] |
139 |
[% CASE 'unauthorized_on_add_biblio' %] |
|
|
140 |
You do not have permission to add a biblio to this list. |
141 |
[% CASE 'no_biblio_removed' %] |
142 |
No biblio has been removed. |
143 |
[% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %] |
144 |
An error occurred when inserting this list. The name already [% shelfname %] exists. |
145 |
[% CASE 'DBIx::Class::Exception' %] |
146 |
[% m.msg %] |
147 |
[% CASE %] |
148 |
[% m.code %] |
149 |
[% m.msg %] |
150 |
[% END %] |
151 |
</div> |
152 |
[% END %] |
151 |
|
153 |
|
152 |
[% IF ( viewshelf ) %]<!-- Viewing a particular shelf --> |
154 |
[% IF op == 'view' %] |
153 |
<h3> |
155 |
<h3> |
154 |
[% shelfname |html %] |
156 |
[% shelf.shelfname |html %] |
155 |
<a href="[% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&viewshelf=[% shelfnumber %]" class="rss-list-link noprint"> |
157 |
<a href="[% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&op=view&shelfnumber=[% shelf.shelfnumber %]" class="rss-list-link noprint"> |
156 |
<img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this list" title="Subscribe to this list" border="0" class="rsssearchicon"/> |
158 |
<img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this list" title="Subscribe to this list" border="0" class="rsssearchicon"/> |
157 |
</a> |
159 |
</a> |
158 |
</h3> |
160 |
</h3> |
Lines 160-227
Link Here
|
160 |
[% IF ( itemsloop ) %] |
162 |
[% IF ( itemsloop ) %] |
161 |
<div id="toolbar" class="toolbar clearfix"> |
163 |
<div id="toolbar" class="toolbar clearfix"> |
162 |
<div class="list-actions"> |
164 |
<div class="list-actions"> |
163 |
<a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New list</a> <span class="sep">|</span> |
165 |
<a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep">|</span> |
164 |
<a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfid=[% shelfnumber | html %]&showprivateshelves=[% showprivateshelves | html %]" class="download" data-toggle="modal" data-target="#modalWin">Download list</a> |
166 |
<a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]" class="download" data-toggle="modal" data-target="#modalWin">Download list</a> |
165 |
|
167 |
|
166 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
168 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
167 |
<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]" class="send" onclick="open('/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span> |
169 |
<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]" class="send" onclick="open('/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span> |
168 |
[% END %] |
170 |
[% END %] |
169 |
|
171 |
|
170 |
<a class="print-small" target="_blank" href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelfnumber %]&sort=[% sort %]&direction=[% direction |uri %]&print=1">Print list</a> |
172 |
<a class="print-small" target="_blank" href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]&sortfield=[% sortfield %]&direction=[% direction |uri %]&print=1">Print list</a> |
171 |
|
173 |
|
172 |
[% IF ( manageshelf ) %] |
174 |
[% IF can_manage_shelf %] |
173 |
<span class="sep">|</span> |
175 |
<span class="sep">|</span> |
174 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
176 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
175 |
<input type="hidden" name="op" value="modif" /> |
177 |
<input type="hidden" name="op" value="edit_form" /> |
176 |
<input type="hidden" name="display" value="viewshelf" /> |
178 |
<input type='hidden' name='category' value='[% category %]' /> |
177 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]" /> |
179 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
178 |
<input type="submit" class="editshelf" value="Edit list" /> |
180 |
<input type="submit" class="editshelf" value="Edit list" /> |
179 |
</form> |
181 |
</form> |
180 |
|
182 |
|
181 |
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
183 |
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
182 |
<input type="hidden" value="1" name="shelves"/> |
184 |
<input type="hidden" name="op" value="delete" /> |
183 |
<input type="hidden" value="1" name="DEL-[% shelfnumber | html %]"/> |
185 |
<input type='hidden' name='category' value='[% category %]' /> |
184 |
[% IF ( showprivateshelves ) %] |
186 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
185 |
<input type="hidden" name="display" value="privateshelves"/> |
|
|
186 |
[% END %] |
187 |
<input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> |
187 |
<input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> |
188 |
</form> |
188 |
</form> |
189 |
[% IF showprivateshelves && Koha.Preference('OpacAllowSharingPrivateLists') %] |
189 |
[% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %] |
190 |
<a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelfnumber | html %]" class="">Share list</a> |
190 |
<a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | html %]" class="">Share list</a> |
191 |
[% END %] |
191 |
[% END %] |
192 |
[% ELSIF showprivateshelves # not manageshelf and private means shared %] |
192 |
[% ELSIF category == PRIVATE # not manageshelf and private means shared %] |
193 |
[% INCLUDE remove_share %] |
193 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline"> |
194 |
<input type="hidden" name="REMSHR-[% shelfnumber | html %]" value="1" /> |
194 |
<input type="hidden" name="op" value="remove_share" /> |
|
|
195 |
<input type='hidden' name='category' value='[% category %]' /> |
196 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
197 |
<input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" /> |
195 |
</form> |
198 |
</form> |
196 |
[% END # / IF manageshelf %] |
199 |
[% END %] |
197 |
</div> |
200 |
</div> |
198 |
|
201 |
|
199 |
<form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="form-inline sort_by pull-right"> |
202 |
<form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="form-inline sort_by pull-right"> |
200 |
<input type="hidden" name="viewshelf" value="[% shelfnumber | html %]" /> |
203 |
<input type="hidden" name="op" value="view" /> |
|
|
204 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
201 |
|
205 |
|
202 |
<label for="sort">Sort by: </label> |
206 |
<label for="sortfield">Sort by: </label> |
203 |
<select name="sort" id="sort" class="resort" onchange="$('#sorting-form').submit()"> |
207 |
<select name="sortfield" id="sortfield" class="resort" onchange="$('#sorting-form').submit()"> |
204 |
<option value="">Default sorting</option> |
208 |
<option value="">Default sorting</option> |
205 |
|
209 |
|
206 |
[% IF sort == 'author' %] |
210 |
[% IF sortfield == 'author' %] |
207 |
<option value="author" selected="selected">Author</option> |
211 |
<option value="author" selected="selected">Author</option> |
208 |
[% ELSE %] |
212 |
[% ELSE %] |
209 |
<option value="author">Author</option> |
213 |
<option value="author">Author</option> |
210 |
[% END %] |
214 |
[% END %] |
211 |
|
215 |
|
212 |
[% IF sort == 'title' %] |
216 |
[% IF sortfield == 'title' %] |
213 |
<option value="title" selected="selected">Title</option> |
217 |
<option value="title" selected="selected">Title</option> |
214 |
[% ELSE %] |
218 |
[% ELSE %] |
215 |
<option value="title">Title</option> |
219 |
<option value="title">Title</option> |
216 |
[% END %] |
220 |
[% END %] |
217 |
|
221 |
|
218 |
[% IF sort == 'itemcallnumber' %] |
222 |
[% IF sortfield == 'itemcallnumber' %] |
219 |
<option value="itemcallnumber" selected="selected">Call number</option> |
223 |
<option value="itemcallnumber" selected="selected">Call number</option> |
220 |
[% ELSE %] |
224 |
[% ELSE %] |
221 |
<option value="itemcallnumber">Call number</option> |
225 |
<option value="itemcallnumber">Call number</option> |
222 |
[% END %] |
226 |
[% END %] |
223 |
|
227 |
|
224 |
[% IF sort == 'copyrightdate' %] |
228 |
[% IF sortfield == 'copyrightdate' %] |
225 |
<option value="copyrightdate" selected="selected">Copyright date</option> |
229 |
<option value="copyrightdate" selected="selected">Copyright date</option> |
226 |
[% ELSE %] |
230 |
[% ELSE %] |
227 |
<option value="copyrightdate">Copyright date</option> |
231 |
<option value="copyrightdate">Copyright date</option> |
Lines 265-287
Link Here
|
265 |
<a href="#" id="tagsel_cancel">Cancel</a> |
269 |
<a href="#" id="tagsel_cancel">Cancel</a> |
266 |
</span> |
270 |
</span> |
267 |
[% END %] |
271 |
[% END %] |
268 |
[% IF ( loggedinusername && allowremovingitems ) %] |
272 |
[% IF loggedinusername && can_remove_biblios %] |
269 |
<span id="removeitems"></span> |
273 |
<span id="removeitems"></span> |
270 |
[% END %] |
274 |
[% END %] |
271 |
</span> <!-- / .links --> |
275 |
</span> <!-- / .links --> |
272 |
</div> <!-- / #selections-toolbar --> |
276 |
</div> <!-- / #selections-toolbar --> |
273 |
|
277 |
|
274 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed"> |
278 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed"> |
275 |
[% IF ( manageshelf ) %] |
279 |
[% IF can_manage_shelf %] |
276 |
<input type="hidden" name="viewshelf" value="[% shelfnumber | html %]" /> |
280 |
<input type="hidden" name="op" value="remove_biblios" /> |
277 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
281 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
278 |
[% END %] |
282 |
[% END %] |
279 |
<div class="searchresults"> |
283 |
<div class="searchresults"> |
280 |
<table id="listcontents" class="table"> |
284 |
<table id="listcontents" class="table"> |
281 |
<tbody> |
285 |
<tbody> |
282 |
[% FOREACH itemsloo IN itemsloop %] |
286 |
[% FOREACH itemsloo IN itemsloop %] |
283 |
<tr> |
287 |
<tr> |
284 |
<td class="select selectcol"><input type="checkbox" class="cb" name="REM-[% itemsloo.biblionumber %]" value="[% itemsloo.biblionumber %]" /></td> |
288 |
<td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber %]" /></td> |
285 |
[% UNLESS ( item_level_itypes ) %] |
289 |
[% UNLESS ( item_level_itypes ) %] |
286 |
<td> |
290 |
<td> |
287 |
[% UNLESS ( noItemTypeImages ) %] |
291 |
[% UNLESS ( noItemTypeImages ) %] |
Lines 455-462
Link Here
|
455 |
<span class="actions"><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a></span> |
459 |
<span class="actions"><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a></span> |
456 |
[% END %] |
460 |
[% END %] |
457 |
|
461 |
|
458 |
[% IF ( allowremovingitems ) %] |
462 |
[% IF can_remove_biblios %] |
459 |
<span class="actions"><a class="removefromlist hidden" id="REM-[% itemsloo.biblionumber %]" href="#">Remove from this list</a></span> |
463 |
<span class="actions"><a class="removefromlist" href="/cgi-bin/koha/opac-shelves.pl?op=remove_biblios&shelfnumber=[% shelf.shelfnumber %]&biblionumber=[% itemsloo.biblionumber %]">Remove from this list</a></span> |
460 |
[% END %] |
464 |
[% END %] |
461 |
|
465 |
|
462 |
[% IF Koha.Preference( 'opacbookbag' ) == 1 %] |
466 |
[% IF Koha.Preference( 'opacbookbag' ) == 1 %] |
Lines 484-508
Link Here
|
484 |
[% ELSE %] |
488 |
[% ELSE %] |
485 |
<div id="toolbar" class="toolbar clearfix"> |
489 |
<div id="toolbar" class="toolbar clearfix"> |
486 |
<div class="list-actions"> |
490 |
<div class="list-actions"> |
487 |
<a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New list</a> <span class="sep"></span> |
491 |
<a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep"></span> |
488 |
[% IF ( manageshelf ) %] |
492 |
[% IF can_manage_shelf %] |
489 |
<span class="sep">|</span> |
493 |
<span class="sep">|</span> |
490 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
494 |
<form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
491 |
<input type="hidden" name="op" value="modif" /> |
495 |
<input type="hidden" name="op" value="edit_form" /> |
492 |
<input type="hidden" name="display" value="viewshelf" /> |
496 |
<input type="hidden" name="category" value="category" /> |
493 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]" /> |
497 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
494 |
<input type="submit" class="editshelf" value="Edit list" /> |
498 |
<input type="submit" class="editshelf" value="Edit list" /> |
495 |
</form> |
499 |
</form> |
496 |
|
500 |
|
497 |
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
501 |
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> |
498 |
<input type="hidden" value="1" name="shelves"/> |
502 |
<input type="hidden" name="op" value="delete" /> |
499 |
<input type="hidden" value="1" name="DEL-[% shelfnumber | html %]"/> |
503 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/> |
500 |
[% IF ( showprivateshelves ) %] |
504 |
<input type="hidden" name="category" value="category" /> |
501 |
<input type="hidden" name="display" value="privateshelves"/> |
|
|
502 |
[% END %] |
503 |
<input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> |
505 |
<input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> |
504 |
</form> |
506 |
</form> |
505 |
[% END # / IF manageshelf %] |
507 |
[% END %] |
506 |
</div> <!-- / .list-actions --> |
508 |
</div> <!-- / .list-actions --> |
507 |
</div> <!-- / #toolbar --> |
509 |
</div> <!-- / #toolbar --> |
508 |
|
510 |
|
Lines 513-809
Link Here
|
513 |
[% END %] |
515 |
[% END %] |
514 |
</div> |
516 |
</div> |
515 |
[% END # / IF itemsloop %] |
517 |
[% END # / IF itemsloop %] |
516 |
[% END # / IF viewshelf %] |
518 |
[% END %] |
517 |
|
519 |
|
518 |
[% IF ( itemsloop && allowremovingitems ) %] |
520 |
[% IF itemsloop && can_remove_biblios %] |
519 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]" /> |
521 |
<input type="hidden" name="op" value="view" /> |
|
|
522 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
520 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
523 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
521 |
<input type="hidden" name="viewshelf" value="[% shelfnumber | html %]" /><input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/> |
524 |
<input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/> |
522 |
</form> |
525 |
</form> |
523 |
[% ELSIF ( !itemsloop && manageshelf ) %] |
526 |
[% ELSIF !itemsloop && can_manage_shelf %] |
524 |
<form method="post" action="opac-shelves.pl"> |
527 |
<form method="post" action="opac-shelves.pl"> |
525 |
<input type="hidden" name="DEL-[% shelfnumber | html %]" value="1" /> |
528 |
<input type="hidden" name="op" value="delete" /> |
526 |
<input type="hidden" name="shelves" value="1" /> |
529 |
<input type="hidden" name="referer" value="list" /> |
527 |
<input type="hidden" name="shelfoff" value="[% shelfoff %]" /> |
530 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/> |
528 |
<input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" /> |
531 |
<input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" /> |
529 |
</form> |
532 |
</form> |
530 |
[% END %] |
533 |
[% END %] |
531 |
|
534 |
|
532 |
[% IF ( edit ) %] |
535 |
[% IF op == 'add_form' OR op == 'edit_form' %] |
533 |
<form method="post" action="/cgi-bin/koha/opac-shelves.pl"> |
536 |
<form method="post" action="/cgi-bin/koha/opac-shelves.pl"> |
534 |
<input type="hidden" name="op" value="modifsave" /> |
|
|
535 |
<input type="hidden" name="display" value="[% display |html %]" /> |
536 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]" /> |
537 |
<fieldset class="rows"> |
537 |
<fieldset class="rows"> |
538 |
<legend>Editing <em>[% shelfname |html %]</em></legend> |
538 |
[% IF op == 'add_form' %] |
|
|
539 |
<div id="addshelf"> |
540 |
<legend>Create a new list</legend> |
541 |
<input type="hidden" name="op" value="add" /> |
542 |
[% ELSE %] |
543 |
<legend>Editing <em>[% shelf.shelfname |html %]</em></legend> |
544 |
<input type="hidden" name="op" value="edit" /> |
545 |
<input type="hidden" name="referer" value="view" /> |
546 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> |
547 |
[% END %] |
548 |
<input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" /> |
539 |
<ol> |
549 |
<ol> |
540 |
<li><label for="shelfname">List name: </label><input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelfname |html %]" /></li> |
550 |
<li> |
|
|
551 |
<label class="required" for="shelfname">List name: </label> |
552 |
<input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname |html %]" /></li> |
541 |
<li> |
553 |
<li> |
542 |
<label for="sortfield" >Sort this list by: </label> |
554 |
<label for="sortfield" >Sort this list by: </label> |
543 |
<select name="sortfield" id="sortfield"> |
555 |
<select name="sortfield" id="sortfield"> |
544 |
[% IF ( sortfield == "title" ) %] |
556 |
[% IF shelf.sortfield == "title" %] |
545 |
<option value="title" selected="selected">Title</option> |
557 |
<option value="title" selected="selected">Title</option> |
546 |
[% ELSE %] |
558 |
[% ELSE %] |
547 |
<option value="title">Title</option> |
559 |
<option value="title">Title</option> |
548 |
[% END %] |
560 |
[% END %] |
549 |
[% IF ( sortfield == "author" ) %] |
561 |
[% IF shelf.sortfield == "author" %] |
550 |
<option value="author" selected="selected">Author</option> |
562 |
<option value="author" selected="selected">Author</option> |
551 |
[% ELSE %] |
563 |
[% ELSE %] |
552 |
<option value="author">Author</option> |
564 |
<option value="author">Author</option> |
553 |
[% END %] |
565 |
[% END %] |
554 |
[% IF ( sortfield == "copyrightdate" ) %] |
566 |
[% IF shelf.sortfield == "copyrightdate" %] |
555 |
<option value="copyrightdate" selected="selected">Year</option> |
567 |
<option value="copyrightdate" selected="selected">Year</option> |
556 |
[% ELSE %] |
568 |
[% ELSE %] |
557 |
<option value="copyrightdate">Year</option> |
569 |
<option value="copyrightdate">Year</option> |
558 |
[% END %] |
570 |
[% END %] |
559 |
[% IF ( sortfield == "itemcallnumber" ) %] |
571 |
[% IF shelf.sortfield == "itemcallnumber" %] |
560 |
<option value="itemcallnumber" selected="selected">Call number</option> |
572 |
<option value="itemcallnumber" selected="selected">Call number</option> |
561 |
[% ELSE %] |
573 |
[% ELSE %] |
562 |
<option value="itemcallnumber">Call number</option> |
574 |
<option value="itemcallnumber">Call number</option> |
563 |
[% END %] |
575 |
[% END %] |
564 |
</select> |
576 |
</select> |
565 |
</li> |
577 |
</li> |
566 |
[% IF ( OpacAllowPublicListCreation || category2 ) %] |
578 |
[% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %] |
567 |
<li> |
579 |
<li> |
568 |
<label for="category">Category:</label> |
580 |
<label for="category">Category:</label> |
569 |
<select name="category" id="category"> |
581 |
<select name="category" id="category"> |
570 |
[% IF ( category1 ) %] |
582 |
[% IF shelf.category == PRIVATE %] |
571 |
<option value="1" selected="selected">Private</option> |
583 |
<option value="1" selected="selected">Private</option> |
572 |
[% ELSE %] |
584 |
[% ELSE %] |
573 |
<option value="1">Private</option> |
585 |
<option value="1">Private</option> |
574 |
[% END %] |
586 |
[% END %] |
575 |
[% IF ( category2 ) %] |
587 |
[% IF shelf.category == PUBLIC %] |
576 |
<option value="2" selected="selected">Public</option> |
588 |
<option value="2" selected="selected">Public</option> |
577 |
[% ELSE %] |
589 |
[% ELSE %] |
578 |
<option value="2">Public</option> |
590 |
<option value="2">Public</option> |
579 |
[% END %] |
591 |
[% END %] |
580 |
</select> |
592 |
</select> |
581 |
[% IF ( category2 && !OpacAllowPublicListCreation ) %] |
593 |
[% IF shelf.category == PUBLIC AND NOT Koha.Preference('OpacAllowPublicListCreation') %] |
582 |
<span class="hint alert alert-info">The library has disabled the ability for patrons to create new public lists. If you make your list private, you will not be able to make it public again.</span> |
594 |
<span class="hint alert alert-info">The library has disabled the ability for patrons to create new public lists. If you make your list private, you will not be able to make it public again.</span> |
583 |
[% END %] |
595 |
[% END %] |
584 |
</li> |
596 |
</li> |
585 |
[% INCLUDE list_permissions %] |
597 |
[% INCLUDE list_permissions %] |
586 |
[% END %] |
598 |
[% END %] |
587 |
</ol> |
599 |
</ol> |
588 |
[% UNLESS ( OpacAllowPublicListCreation || category2 ) %] |
600 |
[% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %] |
589 |
<input type="hidden" name="category" value="1" /> |
601 |
<input type="hidden" name="category" value="[% PRIVATE %]" /> |
590 |
[% END %] |
602 |
[% END %] |
591 |
</fieldset> |
603 |
</fieldset> |
592 |
|
604 |
|
593 |
<fieldset class="action"> |
605 |
<fieldset class="action"> |
594 |
<input type="submit" value="Save" class="btn" /> |
606 |
<input type="submit" onclick="Check(this.form); return false;" value="Save" class="btn" /> |
595 |
[% IF ( showprivateshelves ) %] |
607 |
[% IF referer == 'view' %] |
596 |
<a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=[% shelfnumber | html %]&display=privateshelves">Cancel</a> |
608 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a> |
597 |
[% ELSE %] |
609 |
[% ELSE %] |
598 |
<a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=[% shelfnumber | html %]">Cancel</a> |
610 |
<a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE %]" class="cancel">Cancel</a> |
599 |
[% END %] |
611 |
[% END %] |
|
|
612 |
|
600 |
</fieldset> |
613 |
</fieldset> |
601 |
</form> |
614 |
</form> |
602 |
[% END # / IF edit %] |
|
|
603 |
|
615 |
|
|
|
616 |
[% ELSIF op == 'list' %] |
617 |
<h2>Lists</h2> |
618 |
<div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> |
619 |
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
620 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
621 |
[% IF category == PRIVATE %] |
622 |
<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=listamp;category=[% PRIVATE %]">Your lists</a></li> |
623 |
[% ELSE %] |
624 |
<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 %]">Your lists</a></li> |
625 |
[% END %] |
626 |
[% END %] |
627 |
[% IF category == PUBLIC %] |
628 |
<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 %]">Public lists</a></li> |
629 |
[% ELSE %] |
630 |
<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 %]">Public lists</a></li> |
631 |
[% END %] |
632 |
</ul> |
604 |
|
633 |
|
605 |
[% UNLESS ( edit ) %] |
634 |
[% IF category == PRIVATE %] |
606 |
[% UNLESS ( viewshelf ) %] |
635 |
<div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
607 |
[% UNLESS ( shelves ) %] |
636 |
[% ELSE %] |
608 |
<h2>Lists</h2> |
637 |
<div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
609 |
<div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> |
638 |
[% END %] |
610 |
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
639 |
|
611 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
640 |
<div id="toolbar" class="toolbar"><a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a></div> |
612 |
[% IF ( showprivateshelves ) %] |
641 |
[% IF shelves %] |
613 |
<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?display=privateshelves">Your lists</a></li> |
642 |
<table class="table"> |
614 |
[% ELSE %] |
643 |
<thead> |
615 |
<li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your lists</a></li> |
644 |
<tr> |
616 |
[% END %] |
645 |
<th>List name</th> |
617 |
[% END %] |
646 |
<th>Contents</th> |
618 |
[% IF ( showpublicshelves ) %] |
647 |
<th>Type</th> |
619 |
<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?display=publicshelves">Public lists</a></li> |
648 |
<th> </th> |
620 |
[% ELSE %] |
649 |
</tr> |
621 |
<li id="publicshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public lists</a></li> |
650 |
</thead> |
622 |
[% END %] |
651 |
<tbody> |
623 |
</ul> |
652 |
[% FOREACH s IN shelves %] |
624 |
|
653 |
[% SET contents = s.get_contents %] |
625 |
[% IF ( showprivateshelves ) %] |
654 |
<tr> |
626 |
<div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
655 |
<td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber %]">[% s.shelfname |html %]</a></td> |
627 |
|
656 |
<td>[% IF contents.count %][% contents.count %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td> |
628 |
[% IF ( loggedinusername ) %] |
657 |
<td> |
629 |
<div id="toolbar" class="toolbar"><a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New list</a></div> |
658 |
[% IF s.category == PRIVATE %] |
630 |
[% IF ( showprivateshelves ) %] |
659 |
[% IF s.is_shared %]Shared[% ELSE %]Private[% END %] |
631 |
[% IF ( shelveslooppriv ) %] |
660 |
[% ELSE %] |
632 |
<table class="table"> |
661 |
Public |
633 |
<thead> |
662 |
[% END %] |
634 |
<tr> |
663 |
</td> |
635 |
<th>List name</th> |
664 |
<td> |
636 |
<th>Contents</th> |
665 |
[% IF s.can_be_managed( loggedinusernumber ) %] |
637 |
<th>Type</th> |
666 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline"> |
638 |
<th> </th> |
667 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber |html %]" /> |
639 |
</tr> |
668 |
<input type="hidden" name="category" value="[% s.category %]" /> |
640 |
</thead> |
669 |
<input type="hidden" name="op" value="edit_form" /> |
641 |
<tbody> |
670 |
<input type="hidden" name="referer" value="list" /> |
642 |
[% FOREACH shelveslooppri IN shelveslooppriv %] |
671 |
<input type="submit" class="editshelf" value="Edit" /> |
643 |
<tr> |
672 |
</form> |
644 |
<td><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves&viewshelf=[% shelveslooppri.shelf %]&sortfield=[% shelveslooppri.sortfield %]">[% shelveslooppri.shelfname |html %]</a></td> |
673 |
[% END %] |
645 |
<td>[% IF ( shelveslooppri.count ) %][% shelveslooppri.count %] [% IF shelveslooppri.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td> |
674 |
[% IF s.can_be_deleted( loggedinusernumber ) %] |
646 |
<td> |
675 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline"> |
647 |
[% IF ( shelveslooppri.viewcategory1 ) %][% IF !shelveslooppri.shares %]Private[% ELSE %]Shared[% END %][% END %] |
676 |
<input type="hidden" name="op" value="delete" /> |
648 |
</td> |
677 |
<input type="hidden" name="referer" value="list" /> |
649 |
<td> |
678 |
<input type='hidden' name='category' value='[% category %]' /> |
650 |
[% IF ( shelveslooppri.mine ) %] |
679 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
651 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline"> |
680 |
<input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" /> |
652 |
<input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf |html %]" /> |
681 |
</form> |
653 |
<input type="hidden" name="display" value="privateshelves" /> |
682 |
[% END %] |
654 |
<input type="hidden" name="op" value="modif" /> |
683 |
[% IF s.category == PRIVATE AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %] |
655 |
<input type="submit" class="editshelf" value="Edit" /> |
684 |
<a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber |html %]" class="">Share</a> |
656 |
</form> |
685 |
[% END %] |
657 |
<form action="opac-shelves.pl" method="post" class="form-inline"> |
686 |
[% IF s.is_shared_with( loggedinusernumber ) %] |
658 |
<input type="hidden" name="shelves" value="1" /> |
687 |
<form action="opac-shelves.pl" method="post" class="form-inline"> |
659 |
<input type="hidden" name="display" value="privateshelves" /> |
688 |
<input type="hidden" name="op" value="remove_share" /> |
660 |
<input type="hidden" name="DEL-[% shelveslooppri.shelf |html %]" value="1" /> |
689 |
<input type="hidden" name="referer" value="list" /> |
661 |
<input type="hidden" name="shelfoff" value="[% shelfoff |html %]" /> |
690 |
<input type='hidden' name='category' value='[% category %]' /> |
662 |
[% IF ( shelveslooppri.confirm ) %] |
691 |
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> |
663 |
<input type="hidden" name="CONFIRM-[% shelveslooppri.confirm |html %]" value="1" /> |
692 |
<input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" /> |
664 |
<input type="submit" class="btn btn-danger confirm" value="Confirm" /> |
693 |
</form> |
665 |
[% ELSE %] |
694 |
[% END %] |
666 |
<input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" /> |
695 |
</td> |
667 |
[% END %] |
696 |
</tr> |
668 |
</form> |
|
|
669 |
[% IF Koha.Preference('OpacAllowSharingPrivateLists') %] |
670 |
<a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelveslooppri.shelf |html %]" class="">Share</a> |
671 |
[% END %] |
672 |
[% ELSE # not shelveslooppri.mine, so shared %] |
673 |
[% INCLUDE remove_share # if pref is off, you should still be able to remove shares %] |
674 |
<input type="hidden" name="shelfoff" value="[% shelfoff |html %]" /> |
675 |
<input type="hidden" name="REMSHR-[% shelveslooppri.shelf |html %]" value="1" /> |
676 |
</form> |
677 |
[% END %] |
678 |
</td> |
679 |
</tr> |
680 |
[% END # / FOREACH shelveslooppri %] |
681 |
</tbody> |
682 |
</table> |
683 |
<div class="pages">[% pagination_bar %]</div> |
684 |
[% ELSE %] |
685 |
<p>No private lists.</p> |
686 |
[% END # / IF shelveslooppriv %] |
687 |
[% END # / IF showprivateshelves %] |
688 |
[% ELSE %] |
689 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
690 |
<div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div> |
691 |
[% END %] |
692 |
[% END # IF loggedinusername %] |
693 |
</div><!-- / #privateshelves --> |
694 |
[% END # / IF showprivateshelves %] |
695 |
[% IF ( showpublicshelves ) %] |
696 |
<div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> |
697 |
|
698 |
[% IF ( loggedinusername ) %] |
699 |
<div id="toolbar" class="toolbar"> <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New list</a></div> |
700 |
[% ELSE %] |
701 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
702 |
<div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div> |
703 |
[% END %] |
704 |
[% END # / IF loggedinusername %] |
705 |
|
706 |
[% IF ( shelvesloop ) %] |
707 |
<table class="table"> |
708 |
<thead> |
709 |
<tr> |
710 |
<th>List name</th> |
711 |
<th>Contents</th> |
712 |
<th>Type</th><th> </th> |
713 |
</tr> |
714 |
</thead> |
715 |
<tbody> |
716 |
[% FOREACH shelvesloo IN shelvesloop %] |
717 |
<tr> |
718 |
<td><a class="title" href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelvesloo.shelf %]&sortfield=[% shelvesloo.sortfield %]">[% shelvesloo.shelfname |html %]</a></td> |
719 |
<td>[% shelvesloo.count %] [% IF shelvesloo.count == 1 %]item[% ELSE %]item(s)[% END %]</td> |
720 |
<td> |
721 |
[% IF ( shelvesloo.viewcategory2 ) %]Public[% END %] |
722 |
</td> |
723 |
<td> |
724 |
[% IF ( shelvesloo.mine ) %] |
725 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline"> |
726 |
<input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" /> |
727 |
<input type="hidden" name="op" value="modif" /> |
728 |
<input type="hidden" name="display" value="publicshelves" /> |
729 |
<input type="submit" class="editshelf" value="Edit" /> |
730 |
</form> |
731 |
<form action="opac-shelves.pl" method="post" class="form-inline"> |
732 |
<input type="hidden" name="shelves" value="1" /> |
733 |
<input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" /> |
734 |
[% IF ( shelvesloo.confirm ) %] |
735 |
<input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" /> |
736 |
<input type="submit" class="btn btn-danger confirm" value="Confirm" /> |
737 |
[% ELSE %] |
738 |
<input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" /> |
739 |
[% END %] |
740 |
</form> |
741 |
[% END %] |
742 |
</td> |
743 |
</tr> |
744 |
[% END # / FOREACH shelvesloop %] |
745 |
</tbody> |
746 |
</table> |
747 |
[% IF ( pagination_bar ) %]<div class="pages">[% pagination_bar %]</div>[% END %] |
748 |
[% ELSE %] |
749 |
[% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %] |
750 |
[% END # / IF shelvesloop %] |
751 |
|
752 |
</div><!-- / # publicshelves --> |
753 |
[% END # / IF showprivateshelves %] |
754 |
</div> <!-- / .ui-tabs-panel --> |
755 |
[% END # / UNLESS shelves %] |
756 |
[% END # / UNLESS viewshelf %] |
757 |
[% END # / UNLESS edit %] |
758 |
|
759 |
[% IF ( shelves ) %] |
760 |
<div id="addshelf"> |
761 |
<form method="post" action="/cgi-bin/koha/opac-shelves.pl"> |
762 |
<fieldset class="rows"> |
763 |
<legend>Create a new list</legend> |
764 |
<input type="hidden" name="shelves" value="1" /> |
765 |
<ol> |
766 |
<li> |
767 |
<label class="required" for="addshelf">List name:</label> |
768 |
[% IF shelfname %] |
769 |
<input id="addshelf" type="text" name="addshelf" value="[% shelfname %]" maxlength="255" class="input-fluid" /> |
770 |
[% ELSE %] |
771 |
<input id="addshelf" type="text" name="addshelf" maxlength="255" class="input-fluid" /> |
772 |
[% END %] |
773 |
<input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" /> |
774 |
</li> |
775 |
<li> |
776 |
<label for="sortfield" >Sort this list by: </label> |
777 |
<select name="sortfield" id="sortfield"> |
778 |
<option value="title">Title</option> |
779 |
<option value="author">Author</option> |
780 |
<option value="copyrightdate">Year</option> |
781 |
<option value="itemcallnumber">Call number</option> |
782 |
</select> |
783 |
</li> |
784 |
[% IF (OpacAllowPublicListCreation) %] |
785 |
<li> |
786 |
<label for="category">Category:</label> |
787 |
<select name="category" id="category"> |
788 |
<option value="1">Private</option> |
789 |
<option value="2">Public</option> |
790 |
</select> |
791 |
</li> |
792 |
[% INCLUDE list_permissions %] |
793 |
[% END %] |
697 |
[% END %] |
794 |
</ol> |
698 |
</tbody> |
795 |
[% UNLESS (OpacAllowPublicListCreation) %] |
699 |
</table> |
796 |
<input type="hidden" name="category" value="1" /> |
700 |
<div class="pages">[% pagination_bar %]</div> |
797 |
[% END %] |
701 |
[% ELSE %] |
798 |
</fieldset> |
702 |
[% IF category == PUBLIC %] |
799 |
<fieldset class="action"> |
703 |
<p>No public lists.</p> |
800 |
<input type="submit" onclick="Check(this.form); return false;" value="Save" class="btn" /> |
704 |
[% ELSE %] |
801 |
<a class="cancel" href="/cgi-bin/koha/opac-shelves.pl">Cancel</a> |
705 |
<p>No private lists.</p> |
802 |
</fieldset> |
706 |
[% END %] |
803 |
</form> |
707 |
[% END %] |
804 |
</div> <!-- / #addshelf --> |
708 |
<div> [%# privateshelves or publicshelves %] |
805 |
[% END # / IF shelves %] |
709 |
</div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %] |
806 |
|
710 |
[% ELSIF NOT loggedinusernumber %] |
|
|
711 |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] |
712 |
<div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div> |
713 |
[% END %] |
714 |
[% END # IF loggedinusername %] |
807 |
</div> <!-- / #usershelves --> |
715 |
</div> <!-- / #usershelves --> |
808 |
</div> <!-- / .span10/12 --> |
716 |
</div> <!-- / .span10/12 --> |
809 |
</div> <!-- / .row-fluid --> |
717 |
</div> <!-- / .row-fluid --> |
Lines 987-1001
$(function() {
Link Here
|
987 |
}); |
895 |
}); |
988 |
[% END %] |
896 |
[% END %] |
989 |
|
897 |
|
990 |
[% IF ( loggedinusername && allowremovingitems ) %] |
898 |
[% IF loggedinusername && can_remove_biblios %] |
991 |
var removeFromListLinks = $(".removefromlist"); |
899 |
$(".removefromlist").on("click", function(e){ |
992 |
removeFromListLinks.removeClass("hidden"); |
900 |
return confirmDelete(MSG_REMOVE_ONE_FROM_LIST); |
993 |
// "remove from list" appearing on each line of the list output |
|
|
994 |
removeFromListLinks.on("click",function(){ |
995 |
$(".checkboxed").unCheckCheckboxes(); |
996 |
var listitem = $("input[name="+this.id+"]"); |
997 |
listitem.prop("checked",true); |
998 |
$("#myform").submit(); |
999 |
}); |
901 |
}); |
1000 |
|
902 |
|
1001 |
$("#myform").submit(function(){ |
903 |
$("#myform").submit(function(){ |