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>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
5 <script type="text/javascript">
8 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?");
10 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
12 $(document).ready(function(){
13 $("#addbarcode").focus();
14 $("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>");
16 $("#CheckAll").click(function(){
17 $(".checkboxed").checkCheckboxes();
20 $("#CheckNone").click(function(){
21 $(".checkboxed").unCheckCheckboxes();
24 $("#placehold").show();
27 function confirmDelete(message){
28 if (window.confirm(message)) {
29 location.href="/cgi-bin/koha/virtualshelves/shelves.pl?[% IF ( showprivateshelves ) %]display=privateshelves&[% END %]shelves=1&DEL-[% shelfnumber %]=1&shelfoff=[% shelfoff %]";
36 * This function checks if the adequate number of records are checked for merging
38 function MergeItems() {
39 var checkboxes = $("input:checkbox:checked");
40 var nbCheckbox = checkboxes.length;
41 if (nbCheckbox != 2) {
42 alert(_("Two records must be selected for merging."));
44 location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value;
50 * This function checks all checkboxes if all are empty,
51 * or unchecks all if any already checked.
54 var checkboxes = document.getElementsByTagName('input');
55 var nbCheckbox = checkboxes.length;
56 var check = areAllChecked();
57 for(var i=0;i<nbCheckbox;i++){
58 if(checkboxes[i].getAttribute('type') == "checkbox" ){
59 checkboxes[i].checked = (check) ? 0 : 1;
64 * This function returns true if ALL checkboxes are checked
66 function areAllChecked(){
67 var checkboxes = document.getElementsByTagName('input');
68 var nbCheckbox = checkboxes.length;
69 for(var i=0;i<nbCheckbox;i++){
70 if(checkboxes[i].getAttribute('type') == "checkbox" ){
71 if(checkboxes[i].checked == 0){
79 function placeHold () {
80 var checkedItems = $(".selection:checked");
81 if ($(checkedItems).size() == 0) {
82 alert(MSG_NO_ITEM_SELECTED);
86 $(checkedItems).each(function() {
87 bibs += $(this).val() + "/";
89 $("#hold_form_biblios").val(bibs);
90 $("#hold_form").submit();
94 * This function checks to make sure a list title is assigned
100 if($("#shelfname").val() == ""){
101 _alertString += _("- You must enter a List Name") + "\n";
104 if (_alertString.length==0) {
107 alertString2 = _("Form not submitted because of the following problem(s)");
108 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
109 alertString2 += _alertString;
116 <body id="lists_shelves" class="lists">
117 [% INCLUDE 'header.inc' %]
118 [% INCLUDE 'cat-search.inc' %]
120 [% BLOCK list_permissions %]
122 <label for="permissions">Permissions: </label>
123 <select name="allow_add" id="allow_add">
124 [% IF allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
125 [% IF allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
127 <span>anyone else to add entries.</span>
130 <label> </label>
131 <select name="allow_delete_own" id="allow_delete_own">
132 [% IF allow_delete_own %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
133 [% IF allow_delete_own %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
135 <span>anyone to remove his own contributed entries.</span>
138 <label> </label>
139 <select name="allow_delete_other" id="allow_delete_other">
140 [% IF allow_delete_other %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
141 [% IF allow_delete_other %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
143 <span>anyone to remove other contributed entries.</span>
146 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a> [% IF ( category1 ) %] › [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( category2 ) %] › [% IF ( viewshelf ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% ELSIF ( showprivateshelves ) %] › [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( showpublicshelves ) %] › [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% END %]
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>
150 <div id="doc" class="yui-t7">
153 <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
155 [% IF ( paramsloop ) %]
156 [% FOREACH paramsloo IN paramsloop %]
158 <div class="yui-u first">
159 [% IF ( paramsloo.already ) %]<div class="dialog alert">A List named [% paramsloo.already %] already exists!</div>[% END %]
160 [% IF ( paramsloo.status ) %]<div class="dialog alert">[% paramsloo.string %]</div>[% END %]
161 [% IF ( paramsloo.nobarcode ) %]<div class="dialog alert">ERROR: No barcode given.</div>[% END %]
162 [% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No shelfnumber given.</div>[% END %]
163 [% IF ( paramsloo.need_confirm ) %]
164 <div class="dialog alert">The list <i>[% paramsloo.need_confirm %]</i> is not empty.
165 <br />It has <b>[% paramsloo.count %]</b> entries.
166 <br />Use the "Confirm" button below to confirm deletion.
169 [% IF ( paramsloo.nopermission ) %]
170 <div class="dialog alert">ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission %].</div>
172 [% IF ( paramsloo.failgetitem ) %]
173 <div class="dialog alert">ERROR: No item found with barcode [% paramsloo.failgetitem %].</div>
175 [% IF ( paramsloo.duplicatebiblio ) %]
176 <div class="dialog alert">A record matching barcode <b>[% paramsloo.duplicatebiblio %]</b> has already been added.</div>
178 [% IF ( paramsloo.nothingdeleted) %]
179 <div class="dialog message">Warning: You could not delete any selected items from this shelf.</div>
181 [% IF ( paramsloo.somedeleted) %]
182 <div class="dialog message">Warning: You could not delete all selected items from this shelf.</div>
184 [% IF ( paramsloo.modifyfailure) %]
185 <div class="dialog message">ERROR: List could not be modified.</div>
192 [% IF ( viewshelf ) %]
194 [% IF ( itemsloop ) %]
196 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed">
197 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
198 <input type="hidden" name="modifyshelfcontents" value="1" />
200 <legend>Contents of <i>[% shelfname | html %]</i></legend>
202 [% IF ( itemsloop ) %]
203 <p><span class="checkall"></span> |
204 <span class="clearall"></span></p>
207 [% IF direction == 'asc' %][% SET new_direction = 'desc' %][% ELSE %][% SET new_direction = 'asc' %][% END %]
208 <div class="pages">[% pagination_bar %]</div>
211 [% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %]
213 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
215 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=title&direction=[% new_direction %]">Title</a>
216 [% IF sort == 'title' %]
217 [% IF direction == 'asc' %]
218 <img src="/intranet-tmpl/prog/img/asc.gif" />
219 [% ELSIF direction == 'desc' %]
220 <img src="/intranet-tmpl/prog/img/desc.gif" />
223 <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
227 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=author&direction=[% new_direction %]">Author</a>
228 [% IF sort == 'author' %]
229 [% IF direction == 'asc' %]
230 <img src="/intranet-tmpl/prog/img/asc.gif" />
231 [% ELSIF direction == 'desc' %]
232 <img src="/intranet-tmpl/prog/img/desc.gif" />
235 <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
240 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=itemcallnumber&direction=[% new_direction %]">Call number</a>
241 [% IF sort == 'itemcallnumber' %]
242 [% IF direction == 'asc' %]
243 <img src="/intranet-tmpl/prog/img/asc.gif" />
244 [% ELSIF direction == 'desc' %]
245 <img src="/intranet-tmpl/prog/img/desc.gif" />
248 <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
253 [% FOREACH itemsloo IN itemsloop %]
254 [% UNLESS ( loop.odd ) %]
255 <tr class="highlight">
259 [% IF ( itemsloop ) %]
261 [% IF ( itemsloo.confirm ) %]
262 <input type="hidden" name="CONFIRM-[% itemsloo.confirm %]" />
263 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
265 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
269 [% UNLESS ( item_level_itypes ) %]<td>
270 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
273 [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
274 [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
276 <td>[% itemsloo.author %]</td>
277 <td>[% itemsloo.dateadded %]</td>
279 [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
282 [% UNLESS ( itemsloo.notforloan ) %]
283 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
287 [% END %]<!-- /itemsloop -->
288 </table><fieldset class="action">
289 [% IF ( itemsloop ) %]
290 <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" />
291 [% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" onclick="return confirm(MSG_REMOVE_FROM_LIST);" />[% END %]
292 <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
300 [% END %]<!-- /viewshelf -->
302 [% IF ( allowaddingitem ) %]
304 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
305 <fieldset class="brief">
306 <legend>Add an item to <i>[% shelfname | html %]</i></legend>
309 <label for="addbarcode">Barcode:</label>
310 <input name="addbarcode" type="text" id="addbarcode" size="14" />
311 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
312 <input type="hidden" name="modifyshelfcontents" value="1" />
313 <input type="submit" value="Add" />
319 [% END %]<!-- /allowaddingitem -->
322 [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
323 [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
328 <div class="yui-u first">
329 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
330 <fieldset class="rows">
333 <input type="hidden" name="shelves" value="1" />
334 <legend>Create a new list</legend>
336 <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
337 <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
338 <li><label for="sortfield" >Sort this list by: </label>
339 <select name="sortfield" id="sortfield">
340 <option value="title">Title</option>
341 <option value="author">Author</option>
342 <option value="copyrightdate">Copyrightdate</option>
343 <option value="itemcallnumber">Call number</option>
345 <li><label for="category">Category: </label>
346 <select name="category" id="category">
347 <option value="1">Private</option>
348 <option value="2">Public</option>
350 [% INCLUDE list_permissions %]
355 <input type="hidden" name="op" value="modifsave" />
356 [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
357 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
358 <legend>Edit list <i>[% shelfname | html %]</i></legend>
360 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
361 <li><label for="owner">Owner: </label><input type="hidden" id="owner" name="owner" value="[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]" />[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]</li>
362 <li><label for="sortfield" >Sort this list by: </label>
363 <select name="sortfield">
364 [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
365 [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
366 [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
367 [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
369 <li><label for="category">Category: </label>
370 <select id="category" name="category">
371 [% IF ( category1 ) %]
372 <option value="1" selected="selected">Private</option>
374 <option value="1">Private</option>
376 [% IF ( category2 ) %]
377 <option value="2" selected="selected">Public</option>
379 <option value="2">Public</option>
382 [% INCLUDE list_permissions %]
387 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
388 [% IF ( showprivateshelves ) %]<a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves" class="cancel">Cancel</a>[% ELSE %]<a href="/cgi-bin/koha/virtualshelves/shelves.pl" class="cancel">Cancel</a>[% END %]
393 <div class="help"><ul>
394 <li>A <b>Private</b> list is managed by you and can be seen only by you.</li>
395 <li> A <b>Public</b> list can be seen by everybody, but managed only by you.</li>
397 <li>The owner of a list is always allowed to add entries, but needs permission to remove.</li>
402 [% END %]<!-- /seflag -->
404 [% UNLESS ( vseflag ) %]
406 <div class="statictabs">
408 [% IF ( showprivateshelves ) %]
409 <li id="privateshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
411 <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
413 [% IF ( showpublicshelves ) %]
414 <li id="publicshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
416 <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
419 [% IF ( showprivateshelves ) %]
420 <div id="privateshelves" class="tabs-container" style="display:block;">
422 <div id="privateshelves" class="tabs-container" style="display:none;">
424 [% IF ( shelveslooppriv ) %]
425 <div class="pages">[% pagination_bar %]</div>
427 <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
428 [% FOREACH shelveslooppri IN shelveslooppriv %]
429 [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
430 <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
431 <td>[% shelveslooppri.count %] item(s)</td>
432 <td>[% IF ( shelveslooppri.sortfield == "author" ) %]Author[% ELSIF ( shelveslooppri.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelveslooppri.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
433 <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
434 [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
437 [% IF ( shelveslooppri.mine ) %]
438 <form action="merge.pl" method="get">
439 <input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
441 <form action="shelves.pl" method="get">
442 <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
443 <input type="hidden" name="op" value="modif" />
444 <input type="hidden" name="display" value="privateshelves" />
445 <input type="submit" class="editshelf" value="Edit" />
447 <form action="shelves.pl" method="post">
448 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
449 <input type="hidden" name="shelves" value="1" />
450 <input type="hidden" name="display" value="privateshelves" />
451 <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
452 [% IF ( shelveslooppri.confirm ) %]
453 <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
454 <input type="submit" class="approve" value="Confirm" />
456 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
467 <p>No private lists.</p>
468 [% END %]<!-- /shelveslooppriv -->
469 </div><!-- /privateshelves -->
471 [% IF ( showpublicshelves ) %]
472 <div id="publicshelves" class="tabs-container" style="display:block;">
474 <div id="publicshelves" class="tabs-container" style="display:none;">
476 [% IF ( shelvesloop ) %]
477 <div class="pages">[% pagination_bar %]</div>
479 <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
480 [% FOREACH shelvesloo IN shelvesloop %]
481 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
482 <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
483 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
484 <td>[% shelvesloo.count %] item(s)</td>
485 <td>[% IF ( shelvesloo.sortfield == "author" ) %]Author[% ELSIF ( shelvesloo.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelvesloo.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
486 <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
487 [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
490 [% IF ( shelvesloo.manageshelf ) %]
491 <form action="shelves.pl" method="get">
492 <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
493 <input type="hidden" name="op" value="modif" />
494 <input type="submit" class="editshelf" value="Edit" />
496 <form action="shelves.pl" method="post">
497 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
498 <input type="hidden" name="shelves" value="1" />
499 <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
500 [% IF ( shelvesloo.confirm ) %]
501 <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
502 <input type="submit" class="approve" value="Confirm" />
504 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
515 [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
516 [% END %]<!-- /shelvesloop -->
517 </div><!-- /publicshelves -->
521 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
522 <!-- Value will be set here by placeHold() -->
523 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
524 <input type="hidden" name="multi_hold" value="1"/>
529 [% INCLUDE 'intranet-bottom.inc' %]