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' %]
208 [% SET new_direction = 'desc' %]
210 [% SET direction = 'desc' %]
211 [% SET new_direction = 'asc' %]
214 <div class="pages">[% pagination_bar %]</div>
217 [% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %]
219 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
221 <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' %]
223 <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
225 <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
229 <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' %]
231 <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
233 <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
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>
239 [% IF sort == 'itemcallnumber' %]
240 <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
242 <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
247 [% FOREACH itemsloo IN itemsloop %]
248 [% UNLESS ( loop.odd ) %]
249 <tr class="highlight">
253 [% IF ( itemsloop ) %]
255 [% IF ( itemsloo.confirm ) %]
256 <input type="hidden" name="CONFIRM-[% itemsloo.confirm %]" />
257 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
259 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
263 [% UNLESS ( item_level_itypes ) %]<td>
264 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
267 [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
268 [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
270 <td>[% itemsloo.author %]</td>
271 <td>[% itemsloo.dateadded %]</td>
273 [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
276 [% UNLESS ( itemsloo.notforloan ) %]
277 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
281 [% END %]<!-- /itemsloop -->
282 </table><fieldset class="action">
283 [% IF ( itemsloop ) %]
284 <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" />
285 [% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" onclick="return confirm(MSG_REMOVE_FROM_LIST);" />[% END %]
286 <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
294 [% END %]<!-- /viewshelf -->
296 [% IF ( allowaddingitem ) %]
298 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
299 <fieldset class="brief">
300 <legend>Add an item to <i>[% shelfname | html %]</i></legend>
303 <label for="addbarcode">Barcode:</label>
304 <input name="addbarcode" type="text" id="addbarcode" size="14" />
305 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
306 <input type="hidden" name="modifyshelfcontents" value="1" />
307 <input type="submit" value="Add" />
313 [% END %]<!-- /allowaddingitem -->
316 [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
317 [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
322 <div class="yui-u first">
323 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
324 <fieldset class="rows">
327 <input type="hidden" name="shelves" value="1" />
328 <legend>Create a new list</legend>
330 <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
331 <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
332 <li><label for="sortfield" >Sort this list by: </label>
333 <select name="sortfield" id="sortfield">
334 <option value="title">Title</option>
335 <option value="author">Author</option>
336 <option value="copyrightdate">Copyrightdate</option>
337 <option value="itemcallnumber">Call number</option>
339 <li><label for="category">Category: </label>
340 <select name="category" id="category">
341 <option value="1">Private</option>
342 <option value="2">Public</option>
344 [% INCLUDE list_permissions %]
349 <input type="hidden" name="op" value="modifsave" />
350 [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
351 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
352 <legend>Edit list <i>[% shelfname | html %]</i></legend>
354 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
355 <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>
356 <li><label for="sortfield" >Sort this list by: </label>
357 <select name="sortfield">
358 [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
359 [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
360 [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
361 [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
363 <li><label for="category">Category: </label>
364 <select id="category" name="category">
365 [% IF ( category1 ) %]
366 <option value="1" selected="selected">Private</option>
368 <option value="1">Private</option>
370 [% IF ( category2 ) %]
371 <option value="2" selected="selected">Public</option>
373 <option value="2">Public</option>
376 [% INCLUDE list_permissions %]
381 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
382 [% 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 %]
387 <div class="help"><ul>
388 <li>A <b>Private</b> list is managed by you and can be seen only by you.</li>
389 <li> A <b>Public</b> list can be seen by everybody, but managed only by you.</li>
391 <li>The owner of a list is always allowed to add entries, but needs permission to remove.</li>
396 [% END %]<!-- /seflag -->
398 [% UNLESS ( vseflag ) %]
400 <div class="statictabs">
402 [% IF ( showprivateshelves ) %]
403 <li id="privateshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
405 <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
407 [% IF ( showpublicshelves ) %]
408 <li id="publicshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
410 <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
413 [% IF ( showprivateshelves ) %]
414 <div id="privateshelves" class="tabs-container" style="display:block;">
416 <div id="privateshelves" class="tabs-container" style="display:none;">
418 [% IF ( shelveslooppriv ) %]
419 <div class="pages">[% pagination_bar %]</div>
421 <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
422 [% FOREACH shelveslooppri IN shelveslooppriv %]
423 [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
424 <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
425 <td>[% shelveslooppri.count %] item(s)</td>
426 <td>[% IF ( shelveslooppri.sortfield == "author" ) %]Author[% ELSIF ( shelveslooppri.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelveslooppri.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
427 <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
428 [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
431 [% IF ( shelveslooppri.mine ) %]
432 <form action="merge.pl" method="get">
433 <input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
435 <form action="shelves.pl" method="get">
436 <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
437 <input type="hidden" name="op" value="modif" />
438 <input type="hidden" name="display" value="privateshelves" />
439 <input type="submit" class="editshelf" value="Edit" />
441 <form action="shelves.pl" method="post">
442 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
443 <input type="hidden" name="shelves" value="1" />
444 <input type="hidden" name="display" value="privateshelves" />
445 <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
446 [% IF ( shelveslooppri.confirm ) %]
447 <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
448 <input type="submit" class="approve" value="Confirm" />
450 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
461 <p>No private lists.</p>
462 [% END %]<!-- /shelveslooppriv -->
463 </div><!-- /privateshelves -->
465 [% IF ( showpublicshelves ) %]
466 <div id="publicshelves" class="tabs-container" style="display:block;">
468 <div id="publicshelves" class="tabs-container" style="display:none;">
470 [% IF ( shelvesloop ) %]
471 <div class="pages">[% pagination_bar %]</div>
473 <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
474 [% FOREACH shelvesloo IN shelvesloop %]
475 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
476 <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
477 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
478 <td>[% shelvesloo.count %] item(s)</td>
479 <td>[% IF ( shelvesloo.sortfield == "author" ) %]Author[% ELSIF ( shelvesloo.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelvesloo.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
480 <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
481 [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
484 [% IF ( shelvesloo.manageshelf ) %]
485 <form action="shelves.pl" method="get">
486 <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
487 <input type="hidden" name="op" value="modif" />
488 <input type="submit" class="editshelf" value="Edit" />
490 <form action="shelves.pl" method="post">
491 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
492 <input type="hidden" name="shelves" value="1" />
493 <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
494 [% IF ( shelvesloo.confirm ) %]
495 <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
496 <input type="submit" class="approve" value="Confirm" />
498 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
509 [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
510 [% END %]<!-- /shelvesloop -->
511 </div><!-- /publicshelves -->
515 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
516 <!-- Value will be set here by placeHold() -->
517 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
518 <input type="hidden" name="multi_hold" value="1"/>
523 [% INCLUDE 'intranet-bottom.inc' %]