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.");
10 $(document).ready(function(){
11 $("#addbarcode").focus();
12 $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>");
13 $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Select all")+"<\/a>");
14 $("#CheckAll").click(function(){
15 $(".checkboxed").checkCheckboxes();
18 $("#CheckNone").click(function(){
19 $(".checkboxed").unCheckCheckboxes();
22 $("#placehold").show();
25 function confirmDelete(message){
26 if (window.confirm(message)) {
27 location.href="/cgi-bin/koha/virtualshelves/shelves.pl?[% IF ( showprivateshelves ) %]display=privateshelves&[% END %]shelves=1&DEL-[% shelfnumber %]=1&shelfoff=[% shelfoff %]";
34 * This function checks if the adequate number of records are checked for merging
36 function MergeItems() {
37 var checkboxes = $("input:checkbox:checked");
38 var nbCheckbox = checkboxes.length;
39 if (nbCheckbox != 2) {
40 alert(_("Two records must be selected for merging."));
42 location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value;
48 * This function checks all checkboxes if all are empty,
49 * or unchecks all if any already checked.
52 var checkboxes = document.getElementsByTagName('input');
53 var nbCheckbox = checkboxes.length;
54 var check = areAllChecked();
55 for(var i=0;i<nbCheckbox;i++){
56 if(checkboxes[i].getAttribute('type') == "checkbox" ){
57 checkboxes[i].checked = (check) ? 0 : 1;
62 * This function returns true if ALL checkboxes are checked
64 function areAllChecked(){
65 var checkboxes = document.getElementsByTagName('input');
66 var nbCheckbox = checkboxes.length;
67 for(var i=0;i<nbCheckbox;i++){
68 if(checkboxes[i].getAttribute('type') == "checkbox" ){
69 if(checkboxes[i].checked == 0){
77 function placeHold () {
78 var checkedItems = $(".selection:checked");
79 if ($(checkedItems).size() == 0) {
80 alert(MSG_NO_ITEM_SELECTED);
84 $(checkedItems).each(function() {
85 bibs += $(this).val() + "/";
87 $("#hold_form_biblios").val(bibs);
88 $("#hold_form").submit();
92 * This function checks to make sure a list title is assigned
98 if($("#shelfname").val() == ""){
99 _alertString += _("- You must enter a List Name") + "\n";
102 if (_alertString.length==0) {
105 alertString2 = _("Form not submitted because of the following problem(s)");
106 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
107 alertString2 += _alertString;
114 <body id="lists_shelves" class="lists">
115 [% INCLUDE 'header.inc' %]
116 [% INCLUDE 'cat-search.inc' %]
118 [% BLOCK list_permissions %]
120 <label for="permissions">Permissions: </label>
121 <select name="allow_add" id="allow_add">
122 [% IF allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
123 [% IF allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
125 <span>anyone else to add entries.</span>
128 <label> </label>
129 <select name="allow_delete_own" id="allow_delete_own">
130 [% IF allow_delete_own %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
131 [% IF allow_delete_own %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
133 <span>anyone to remove his own contributed entries.</span>
136 <label> </label>
137 <select name="allow_delete_other" id="allow_delete_other">
138 [% IF allow_delete_other %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
139 [% IF allow_delete_other %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
141 <span>anyone to remove other contributed entries.</span>
144 <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 %]
146 [% 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>
148 <div id="doc" class="yui-t7">
151 <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
153 [% IF ( paramsloop ) %]
154 [% FOREACH paramsloo IN paramsloop %]
156 <div class="yui-u first">
157 [% IF ( paramsloo.already ) %]<div class="dialog alert">A List named [% paramsloo.already %] already exists!</div>[% END %]
158 [% IF ( paramsloo.status ) %]<div class="dialog alert">[% paramsloo.string %]</div>[% END %]
159 [% IF ( paramsloo.nobarcode ) %]<div class="dialog alert">ERROR: No barcode given.</div>[% END %]
160 [% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No shelfnumber given.</div>[% END %]
161 [% IF ( paramsloo.need_confirm ) %]
162 <div class="dialog alert">The list <i>[% paramsloo.need_confirm %]</i> is not empty.
163 <br />It has <b>[% paramsloo.count %]</b> entries.
164 <br />Use the "Confirm" button below to confirm deletion.
167 [% IF ( paramsloo.nopermission ) %]
168 <div class="dialog alert">ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission %].</div>
170 [% IF ( paramsloo.failgetitem ) %]
171 <div class="dialog alert">ERROR: No item found with barcode [% paramsloo.failgetitem %].</div>
173 [% IF ( paramsloo.duplicatebiblio ) %]
174 <div class="dialog alert">A record matching barcode <b>[% paramsloo.duplicatebiblio %]</b> has already been added.</div>
176 [% IF ( paramsloo.nothingdeleted) %]
177 <div class="dialog message">Warning: You could not delete any selected items from this shelf.</div>
179 [% IF ( paramsloo.somedeleted) %]
180 <div class="dialog message">Warning: You could not delete all selected items from this shelf.</div>
182 [% IF ( paramsloo.modifyfailure) %]
183 <div class="dialog message">ERROR: List could not be modified.</div>
190 [% IF ( viewshelf ) %]
192 [% IF ( itemsloop ) %]
194 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed">
195 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
196 <input type="hidden" name="modifyshelfcontents" value="1" />
198 <legend>Contents of <i>[% shelfname | html %]</i></legend>
200 [% IF ( itemsloop ) %]
201 <p><span class="checkall"></span> |
202 <span class="clearall"></span></p>
205 <div class="pages">[% pagination_bar %]</div>
208 [% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %]
209 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
216 [% FOREACH itemsloo IN itemsloop %]
217 [% UNLESS ( loop.odd ) %]
218 <tr class="highlight">
222 [% IF ( itemsloop ) %]
224 [% IF ( itemsloo.confirm ) %]
225 <input type="hidden" name="CONFIRM-[% itemsloo.confirm %]" />
226 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
228 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
232 [% UNLESS ( item_level_itypes ) %]<td>
233 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
236 [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
237 [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
239 <td>[% itemsloo.author %]</td>
240 <td>[% itemsloo.dateadded %]</td>
242 [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
245 [% UNLESS ( itemsloo.notforloan ) %]
246 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
250 [% END %]<!-- /itemsloop -->
251 </table><fieldset class="action">
252 [% IF ( itemsloop ) %]
253 <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" />
254 [% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" onclick="return confirm(_('Are you sure you want to remove these records from the shelf?'));" />[% END %]
255 <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
263 [% END %]<!-- /viewshelf -->
265 [% IF ( allowaddingitem ) %]
267 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
268 <fieldset class="brief">
269 <legend>Add an item to <i>[% shelfname | html %]</i></legend>
272 <label for="addbarcode">Barcode:</label>
273 <input name="addbarcode" type="text" id="addbarcode" size="14" />
274 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
275 <input type="hidden" name="modifyshelfcontents" value="1" />
276 <input type="submit" value="Add" />
282 [% END %]<!-- /allowaddingitem -->
285 [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
286 [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
291 <div class="yui-u first">
292 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
293 <fieldset class="rows">
296 <input type="hidden" name="shelves" value="1" />
297 <legend>Create a new list</legend>
299 <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
300 <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
301 <li><label for="sortfield" >Sort this list by: </label>
302 <select name="sortfield" id="sortfield">
303 <option value="title">Title</option>
304 <option value="author">Author</option>
305 <option value="copyrightdate">Copyrightdate</option>
306 <option value="itemcallnumber">Call number</option>
308 <li><label for="category">Category: </label>
309 <select name="category" id="category">
310 <option value="1">Private</option>
311 <option value="2">Public</option>
313 [% INCLUDE list_permissions %]
318 <input type="hidden" name="op" value="modifsave" />
319 [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
320 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
321 <legend>Edit list <i>[% shelfname | html %]</i></legend>
323 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
324 <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>
325 <li><label for="sortfield" >Sort this list by: </label>
326 <select name="sortfield">
327 [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
328 [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
329 [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
330 [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
332 <li><label for="category">Category: </label>
333 <select id="category" name="category">
334 [% IF ( category1 ) %]
335 <option value="1" selected="selected">Private</option>
337 <option value="1">Private</option>
339 [% IF ( category2 ) %]
340 <option value="2" selected="selected">Public</option>
342 <option value="2">Public</option>
345 [% INCLUDE list_permissions %]
350 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
351 [% 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 %]
356 <div class="help"><ul>
357 <li>A <b>Private</b> list is managed by you and can be seen only by you.</li>
358 <li> A <b>Public</b> list can be seen by everybody, but managed only by you.</li>
360 <li>The owner of a list is always allowed to add entries, but needs permission to remove.</li>
365 [% END %]<!-- /seflag -->
367 [% UNLESS ( vseflag ) %]
369 <div class="statictabs">
371 [% IF ( showprivateshelves ) %]
372 <li id="privateshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
374 <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
376 [% IF ( showpublicshelves ) %]
377 <li id="publicshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
379 <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
382 [% IF ( showprivateshelves ) %]
383 <div id="privateshelves" class="tabs-container" style="display:block;">
385 <div id="privateshelves" class="tabs-container" style="display:none;">
387 [% IF ( shelveslooppriv ) %]
388 <div class="pages">[% pagination_bar %]</div>
390 <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
391 [% FOREACH shelveslooppri IN shelveslooppriv %]
392 [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
393 <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
394 <td>[% shelveslooppri.count %] item(s)</td>
395 <td>[% IF ( shelveslooppri.sortfield == "author" ) %]Author[% ELSIF ( shelveslooppri.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelveslooppri.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
396 <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
397 [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
400 [% IF ( shelveslooppri.mine ) %]
401 <form action="merge.pl" method="get">
402 <input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
404 <form action="shelves.pl" method="get">
405 <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
406 <input type="hidden" name="op" value="modif" />
407 <input type="hidden" name="display" value="privateshelves" />
408 <input type="submit" class="editshelf" value="Edit" />
410 <form action="shelves.pl" method="post">
411 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
412 <input type="hidden" name="shelves" value="1" />
413 <input type="hidden" name="display" value="privateshelves" />
414 <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
415 [% IF ( shelveslooppri.confirm ) %]
416 <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
417 <input type="submit" class="approve" value="Confirm" />
419 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this list?'));" value="Delete" />
430 <p>No private lists.</p>
431 [% END %]<!-- /shelveslooppriv -->
432 </div><!-- /privateshelves -->
434 [% IF ( showpublicshelves ) %]
435 <div id="publicshelves" class="tabs-container" style="display:block;">
437 <div id="publicshelves" class="tabs-container" style="display:none;">
439 [% IF ( shelvesloop ) %]
440 <div class="pages">[% pagination_bar %]</div>
442 <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
443 [% FOREACH shelvesloo IN shelvesloop %]
444 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
445 <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
446 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
447 <td>[% shelvesloo.count %] item(s)</td>
448 <td>[% IF ( shelvesloo.sortfield == "author" ) %]Author[% ELSIF ( shelvesloo.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelvesloo.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
449 <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
450 [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
453 [% IF ( shelvesloo.manageshelf ) %]
454 <form action="shelves.pl" method="get">
455 <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
456 <input type="hidden" name="op" value="modif" />
457 <input type="submit" class="editshelf" value="Edit" />
459 <form action="shelves.pl" method="post">
460 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
461 <input type="hidden" name="shelves" value="1" />
462 <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
463 [% IF ( shelvesloo.confirm ) %]
464 <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
465 <input type="submit" class="approve" value="Confirm" />
467 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this list?'));" value="Delete" />
478 [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
479 [% END %]<!-- /shelvesloop -->
480 </div><!-- /publicshelves -->
484 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
485 <!-- Value will be set here by placeHold() -->
486 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
487 <input type="hidden" name="multi_hold" value="1"/>
492 [% INCLUDE 'intranet-bottom.inc' %]