Lines 1-16
Link Here
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
<title>Koha › [% IF ( viewshelf ) %]Lists › Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] › Create new list[% END %][% IF ( edit ) %] › Edit list [% shelfname | html %][% END %]</title> |
2 |
<title>Koha › [% IF ( viewshelf ) %]Lists › Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] › Create new list[% END %][% IF ( edit ) %] › Edit list [% shelfname | html %][% END %]</title> |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
4 |
[% IF ( viewshelf ) %] |
|
|
5 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
6 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
7 |
[% END %] |
5 |
<script type="text/javascript"> |
8 |
<script type="text/javascript"> |
6 |
//<![CDATA[ |
9 |
//<![CDATA[ |
7 |
|
10 |
|
8 |
var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); |
11 |
var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); |
9 |
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these records from the shelf?"); |
12 |
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these records from the shelf?"); |
10 |
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?"); |
13 |
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?"); |
11 |
|
14 |
[% IF ( viewshelf ) %] |
12 |
$(document).ready(function(){ |
15 |
$(document).ready(function(){ |
13 |
$("#addbarcode").focus(); |
16 |
[% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %] |
14 |
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>"); |
17 |
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>"); |
15 |
$("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Select all")+"<\/a>"); |
18 |
$("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Select all")+"<\/a>"); |
16 |
$("#CheckAll").click(function(){ |
19 |
$("#CheckAll").click(function(){ |
Lines 21-28
$(document).ready(function(){
Link Here
|
21 |
$(".checkboxed").unCheckCheckboxes(); |
24 |
$(".checkboxed").unCheckCheckboxes(); |
22 |
return false; |
25 |
return false; |
23 |
}); |
26 |
}); |
24 |
$("#placehold").show(); |
27 |
$(".placehold").on("click",function(e){ |
|
|
28 |
placeHold(); |
29 |
e.preventDefault(); |
30 |
}); |
31 |
|
32 |
$(".addtocart").show(); |
33 |
var param1 = "| <label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>"; |
34 |
[% IF ( intranetbookbag ) %] |
35 |
param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; |
36 |
[% END %] |
37 |
[% IF ( virtualshelves ) %] |
38 |
[% IF ( addbarshelves ) %] |
39 |
param1 += "<optgroup label=\""+_("Your lists:")+"\">"; |
40 |
[% FOREACH addbarshelvesloo IN addbarshelvesloop %] |
41 |
[% IF ( shelfnumber != addbarshelvesloo.shelfnumber ) %] |
42 |
param1 += "<option id=\"s[% addbarshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addbarshelvesloo.shelfname |html %]<\/option>"; |
43 |
[% END %] |
44 |
[% END %] |
45 |
param1 += "<\/optgroup>"; |
46 |
[% END %] |
47 |
[% IF ( addpubshelves ) %] |
48 |
param1 += "<optgroup label=\""+_("Public lists:")+"\">"; |
49 |
[% FOREACH addpubshelvesloo IN addpubshelvesloop %] |
50 |
[% IF ( shelfnumber != addpubshelvesloo.shelfnumber ) %] |
51 |
param1 += "<option id=\"s[% addpubshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addpubshelvesloo.shelfname |html %]<\/option>"; |
52 |
[% END %] |
53 |
[% END %] |
54 |
param1 += "<\/optgroup>"; |
55 |
[% END %] |
56 |
[% IF ( ( addbarshelvesloop && addbarshelvesloop.size > 9 ) || (addpubshelvesloop && addpubshelvesloop.size > 9 )) %] |
57 |
param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>"; |
58 |
[% END %] |
59 |
param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>" |
60 |
[% END %] |
61 |
param1 += "<\/select> <button id=\"cartsubmit\" type=\"submit\" class=\"btn btn-mini\">"+_("Save")+"</button>"; |
62 |
$("span.addto").html(param1); |
63 |
$("#addto").change(function(){ |
64 |
cartList(); |
65 |
}); |
66 |
$(".addto").find("input:submit").click(function(e){ |
67 |
e.preventDefault(); |
68 |
cartList(); |
69 |
}); |
70 |
$("#selection_ops").show(); |
71 |
$(".merge-items").on("click",function(e){ |
72 |
e.preventDefault(); |
73 |
MergeItems(); |
74 |
}); |
75 |
$(".list-remove").on("click",function(e){ |
76 |
if($(".selection").filter(":checked").length > 0){ |
77 |
return confirm(MSG_REMOVE_FROM_LIST); |
78 |
} else { |
79 |
alert(MSG_NO_ITEM_SELECTED); |
80 |
e.preventDefault(); |
81 |
} |
82 |
}); |
25 |
}); |
83 |
}); |
|
|
84 |
[% END %] |
26 |
|
85 |
|
27 |
function confirmDelete(message){ |
86 |
function confirmDelete(message){ |
28 |
if (window.confirm(message)) { |
87 |
if (window.confirm(message)) { |
Lines 75-81
$(document).ready(function(){
Link Here
|
75 |
} |
134 |
} |
76 |
return true; |
135 |
return true; |
77 |
} |
136 |
} |
78 |
|
137 |
|
79 |
function placeHold () { |
138 |
function placeHold () { |
80 |
var checkedItems = $(".selection:checked"); |
139 |
var checkedItems = $(".selection:checked"); |
81 |
if ($(checkedItems).size() == 0) { |
140 |
if ($(checkedItems).size() == 0) { |
Lines 98-104
function placeHold () {
Link Here
|
98 |
var alertString2; |
157 |
var alertString2; |
99 |
|
158 |
|
100 |
if($("#shelfname").val() == ""){ |
159 |
if($("#shelfname").val() == ""){ |
101 |
_alertString += _("- You must enter a List Name") + "\n"; |
160 |
_alertString += "- "+_("You must enter a List Name") + "\n"; |
102 |
} |
161 |
} |
103 |
|
162 |
|
104 |
if (_alertString.length==0) { |
163 |
if (_alertString.length==0) { |
Lines 110-115
function placeHold () {
Link Here
|
110 |
alert(alertString2); |
169 |
alert(alertString2); |
111 |
} |
170 |
} |
112 |
} |
171 |
} |
|
|
172 |
function cartList(){ |
173 |
var checkboxes = $("#searchresults").find(":checkbox"); |
174 |
var vshelf = vShelfAdd(checkboxes); |
175 |
if($("#addto").find("option:selected").attr("value") == "addtolist"){ |
176 |
var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s",""); |
177 |
if (vshelf) { |
178 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf,'popup',500,500); |
179 |
} |
180 |
return false; |
181 |
} else if($("#addto").find("option:selected").attr("value") == "newlist"){ |
182 |
if (vshelf) { |
183 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf,'popup',500,500); |
184 |
} |
185 |
return false; |
186 |
} else if($("#addto").find("option:selected").attr("value") == "morelists"){ |
187 |
if (vshelf) { |
188 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf,'popup',500,500); |
189 |
} |
190 |
return false; |
191 |
} |
192 |
if($("#addto").find("option:selected").attr("value") == "addtocart"){ |
193 |
addMultiple(checkboxes); |
194 |
return false; |
195 |
} |
196 |
} |
113 |
//]]> |
197 |
//]]> |
114 |
</script> |
198 |
</script> |
115 |
</head> |
199 |
</head> |
Lines 147-153
function placeHold () {
Link Here
|
147 |
|
231 |
|
148 |
[% IF ( viewshelf ) %]› Contents of <i>[% shelfname | html %]</i>[% END %][% IF ( shelves ) %] › Create new list[% END %][% IF ( edit ) %] › Edit list <i>[% shelfname | html %]</i>[% END %]</div> |
232 |
[% IF ( viewshelf ) %]› Contents of <i>[% shelfname | html %]</i>[% END %][% IF ( shelves ) %] › Create new list[% END %][% IF ( edit ) %] › Edit list <i>[% shelfname | html %]</i>[% END %]</div> |
149 |
|
233 |
|
150 |
<div id="doc" class="yui-t7"> |
234 |
<div id="doc2" class="yui-t7"> |
151 |
<div id="bd"> |
235 |
<div id="bd"> |
152 |
<div id="yui-main"> |
236 |
<div id="yui-main"> |
153 |
<div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %] |
237 |
<div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %] |
Lines 193-248
function placeHold () {
Link Here
|
193 |
<div class="yui-g"> |
277 |
<div class="yui-g"> |
194 |
[% IF ( itemsloop ) %] |
278 |
[% IF ( itemsloop ) %] |
195 |
|
279 |
|
196 |
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed"> |
280 |
<h3>Contents of <i>[% shelfname | html %]</i></h3> |
|
|
281 |
<div class="pages">[% pagination_bar %]</div> |
282 |
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" name="listform" method="post" class="checkboxed"> |
197 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /> |
283 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /> |
198 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
284 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
199 |
<fieldset> |
|
|
200 |
<legend>Contents of <i>[% shelfname | html %]</i></legend> |
201 |
|
202 |
[% IF ( itemsloop ) %] |
203 |
<p><span class="checkall"></span> | |
204 |
<span class="clearall"></span></p> |
205 |
[% END %] |
206 |
|
207 |
[% IF direction == 'asc' %] |
208 |
[% SET new_direction = 'desc' %] |
209 |
[% ELSE %] |
210 |
[% SET direction = 'desc' %] |
211 |
[% SET new_direction = 'asc' %] |
212 |
[% END %] |
213 |
|
285 |
|
214 |
<div class="pages">[% pagination_bar %]</div> |
286 |
[% IF direction == 'asc' %] |
215 |
<table> |
287 |
[% SET new_direction = 'desc' %] |
|
|
288 |
[% ELSE %] |
289 |
[% SET direction = 'desc' %] |
290 |
[% SET new_direction = 'asc' %] |
291 |
[% END %] |
292 |
|
293 |
<div id="searchheader"> |
294 |
[% IF ( itemsloop ) %] |
295 |
<div id="selection_ops"><span class="checkall"></span> | |
296 |
<span class="clearall"></span> |
297 |
|
298 |
<span class="addto">| </span> |
299 |
|
300 |
[% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %] |
301 |
<div class="btn-group"><button class="btn btn-mini placehold"><i class="icon-hold"></i> Place hold</button></div> |
302 |
[% END %] |
303 |
[% IF ( allowremovingitems ) %] |
304 |
<div class="btn-group"><button type="submit" class="btn btn-mini list-remove"><i class="icon-remove-sign"></i> Remove selected</button></div> |
305 |
[% END %] |
306 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<div class="btn-group"><button type="submit" class="btn btn-mini merge-items"><i class="icon-merge"></i> Merge selected</button></div>[% END %] |
307 |
</div> |
308 |
[% END %] |
309 |
</div> |
310 |
|
311 |
<table id="searchresults"> |
216 |
<tr> |
312 |
<tr> |
217 |
[% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %] |
313 |
[% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %] |
218 |
|
314 |
|
219 |
[% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %] |
315 |
[% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %] |
220 |
<th> |
316 |
<th> |
221 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=title&direction=[% IF sort != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a> |
317 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=title&direction=[% IF sort != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a> |
222 |
[% IF sort == 'title' %] |
318 |
[% IF sort == 'title' %] |
223 |
<img src="/intranet-tmpl/prog/img/[% direction %].gif" /> |
319 |
<img src="/intranet-tmpl/prog/img/[% direction %].gif" alt="[% direction %] sort" /> |
224 |
[% ELSE %] |
320 |
[% ELSE %] |
225 |
<img src="/intranet-tmpl/prog/img/ascdesc.gif" /> |
321 |
<img src="/intranet-tmpl/prog/img/ascdesc.gif" alt="" /> |
226 |
[% END %] |
322 |
[% END %] |
227 |
</th> |
323 |
</th> |
228 |
<th> |
324 |
<th> |
229 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=author&direction=[% IF sort != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a> |
325 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=author&direction=[% IF sort != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a> |
230 |
[% IF sort == 'author' %] |
326 |
[% IF sort == 'author' %] |
231 |
<img src="/intranet-tmpl/prog/img/[% direction %].gif" /> |
327 |
<img src="/intranet-tmpl/prog/img/[% direction %].gif" alt="[% direction %] sort" /> |
232 |
[% ELSE %] |
328 |
[% ELSE %] |
233 |
<img src="/intranet-tmpl/prog/img/ascdesc.gif" /> |
329 |
<img src="/intranet-tmpl/prog/img/ascdesc.gif" alt="" /> |
234 |
[% END %] |
330 |
[% END %] |
235 |
</th> |
331 |
</th> |
236 |
<th>Date added</th> |
332 |
<th>Date added</th> |
237 |
<th> |
333 |
<th> |
238 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=itemcallnumber&direction=[% IF sort != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a> |
334 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=itemcallnumber&direction=[% IF sort != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a> |
239 |
[% IF sort == 'itemcallnumber' %] |
335 |
[% IF sort == 'itemcallnumber' %] |
240 |
<img src="/intranet-tmpl/prog/img/[% direction %].gif" /> |
336 |
<img src="/intranet-tmpl/prog/img/[% direction %].gif" alt="[% direction %] sort" /> |
241 |
[% ELSE %] |
337 |
[% ELSE %] |
242 |
<img src="/intranet-tmpl/prog/img/ascdesc.gif" /> |
338 |
<img src="/intranet-tmpl/prog/img/ascdesc.gif" alt="" /> |
243 |
[% END %] |
339 |
[% END %] |
244 |
</th> |
340 |
</th> |
245 |
<th> </th> |
|
|
246 |
</tr> |
341 |
</tr> |
247 |
[% FOREACH itemsloo IN itemsloop %] |
342 |
[% FOREACH itemsloo IN itemsloop %] |
248 |
[% UNLESS ( loop.odd ) %] |
343 |
[% UNLESS ( loop.odd ) %] |
Lines 264-294
function placeHold () {
Link Here
|
264 |
[% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %] |
359 |
[% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %] |
265 |
</td>[% END %] |
360 |
</td>[% END %] |
266 |
<td> |
361 |
<td> |
267 |
[% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %] |
362 |
[% IF ( itemsloo.XSLTBloc ) %] |
268 |
[% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a> |
363 |
[% itemsloo.XSLTBloc %] |
|
|
364 |
[% ELSE %] |
365 |
[% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %] |
366 |
[% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a> |
367 |
[% END %] |
368 |
<p class="hold"> |
369 |
[% IF ( itemsloo.norequests ) %] |
370 |
<span class="noholdstext">No holds allowed</span> |
371 |
[% ELSE %] |
372 |
<a id="reserve_[% itemsloo.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a> |
373 |
[% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]&findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %] |
374 |
[% END %] |
375 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
376 |
| <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber %]">Edit record</a> |
377 |
[% END %] |
378 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
379 |
| <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber %]">Edit items</a> |
380 |
[% END %] |
381 |
</p> |
269 |
</td> |
382 |
</td> |
270 |
<td>[% itemsloo.author %]</td> |
383 |
<td>[% itemsloo.author %]</td> |
271 |
<td>[% itemsloo.dateadded %]</td> |
384 |
<td>[% itemsloo.dateadded %]</td> |
272 |
<td> |
385 |
<td> |
273 |
[% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %] |
386 |
<ul> |
|
|
387 |
[% FOREACH result IN itemsloo.ITEM_RESULTS %] |
388 |
<li>[% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %] |
389 |
[% IF ( result.itemcallnumber ) %] |
390 |
[<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% result.itemcallnumber |url %]">[% result.itemcallnumber %]</a>] |
391 |
[% END %] |
392 |
</li> |
393 |
[% END %] |
394 |
</ul> |
274 |
</td> |
395 |
</td> |
275 |
<td> |
|
|
276 |
[% UNLESS ( itemsloo.notforloan ) %] |
277 |
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a> |
278 |
[% END %] |
279 |
</td> |
280 |
</tr> |
396 |
</tr> |
281 |
[% END %]<!-- /itemsloop --> |
397 |
[% END %]<!-- /itemsloop --> |
282 |
</table><fieldset class="action"> |
398 |
</table> |
|
|
399 |
<div class="pages">[% pagination_bar %]</div> |
400 |
<fieldset class="action"> |
283 |
[% IF ( itemsloop ) %] |
401 |
[% IF ( itemsloop ) %] |
284 |
<input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" /> |
402 |
[% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %]<input type="button" class="placehold" value="Place hold" />[% END %] |
285 |
[% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" onclick="return confirm(MSG_REMOVE_FROM_LIST);" />[% END %] |
403 |
[% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" class=" |
286 |
<input type="submit" value="Merge selected records" onclick="return MergeItems();" /> |
404 |
list-remove" />[% END %] |
|
|
405 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<input type="submit" value="Merge selected records" class="merge-items" />[% END %] |
287 |
[% END %] |
406 |
[% END %] |
288 |
</fieldset> |
407 |
</fieldset> |
289 |
</fieldset> |
|
|
290 |
|
291 |
</form> |
408 |
</form> |
|
|
409 |
|
292 |
[% END %] |
410 |
[% END %] |
293 |
</div> |
411 |
</div> |
294 |
[% END %]<!-- /viewshelf --> |
412 |
[% END %]<!-- /viewshelf --> |