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 %]
215 [% FOREACH itemsloo IN itemsloop %]
216 [% UNLESS ( loop.odd ) %]
217 <tr class="highlight">
221 [% IF ( itemsloop ) %]
223 [% IF ( itemsloo.confirm ) %]
224 <input type="hidden" name="CONFIRM-[% itemsloo.confirm %]" />
225 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
227 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
231 [% UNLESS ( item_level_itypes ) %]<td>
232 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
235 [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
236 [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
238 <td>[% itemsloo.author %]</td>
239 <td>[% itemsloo.dateadded %]</td>
241 [% UNLESS ( itemsloo.notforloan ) %]
242 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
246 [% END %]<!-- /itemsloop -->
247 </table><fieldset class="action">
248 [% IF ( itemsloop ) %]
249 <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" />
250 [% 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 %]
251 <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
259 [% END %]<!-- /viewshelf -->
261 [% IF ( allowaddingitem ) %]
263 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
264 <fieldset class="brief">
265 <legend>Add an item to <i>[% shelfname | html %]</i></legend>
268 <label for="addbarcode">Barcode:</label>
269 <input name="addbarcode" type="text" id="addbarcode" size="14" />
270 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
271 <input type="hidden" name="modifyshelfcontents" value="1" />
272 <input type="submit" value="Add" />
278 [% END %]<!-- /allowaddingitem -->
281 [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
282 [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
287 <div class="yui-u first">
288 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
289 <fieldset class="rows">
292 <input type="hidden" name="shelves" value="1" />
293 <legend>Create a new list</legend>
295 <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
296 <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
297 <li><label for="sortfield" >Sort this list by: </label>
298 <select name="sortfield" id="sortfield">
299 [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
300 [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
301 [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
303 <li><label for="category">Category: </label>
304 <select name="category" id="category">
305 <option value="1">Private</option>
306 <option value="2">Public</option>
308 [% INCLUDE list_permissions %]
313 <input type="hidden" name="op" value="modifsave" />
314 [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
315 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
316 <legend>Edit list <i>[% shelfname | html %]</i></legend>
318 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
319 <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>
320 <li><label for="sortfield" >Sort this list by: </label>
321 <select name="sortfield">
322 [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
323 [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
324 [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
326 <li><label for="category">Category: </label>
327 <select id="category" name="category">
328 [% IF ( category1 ) %]
329 <option value="1" selected="selected">Private</option>
331 <option value="1">Private</option>
333 [% IF ( category2 ) %]
334 <option value="2" selected="selected">Public</option>
336 <option value="2">Public</option>
339 [% INCLUDE list_permissions %]
344 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
345 [% 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 %]
350 <div class="help"><ul>
351 <li>A <b>Private</b> list is managed by you and can be seen only by you.</li>
352 <li> A <b>Public</b> list can be seen by everybody, but managed only by you.</li>
354 <li>The owner of a list is always allowed to add entries, but needs permission to remove.</li>
359 [% END %]<!-- /seflag -->
361 [% UNLESS ( vseflag ) %]
363 <div class="toptabs">
364 <ul class="ui-tabs-nav">
365 [% IF ( showprivateshelves ) %]
366 <li id="privateshelves_tab" class="ui-tabs-selected"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
368 <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
370 [% IF ( showpublicshelves ) %]
371 <li id="publicshelves_tab" class="ui-tabs-selected"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
373 <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
376 [% IF ( showprivateshelves ) %]
377 <div id="privateshelves" class="ui-tabs-panel" style="display:block;">
379 <div id="privateshelves" class="ui-tabs-panel" style="display:none;">
381 [% IF ( shelveslooppriv ) %]
382 <div class="pages">[% pagination_bar %]</div>
384 <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
385 [% FOREACH shelveslooppri IN shelveslooppriv %]
386 [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
387 <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
388 <td>[% shelveslooppri.count %] item(s)</td>
389 <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
390 <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
391 [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
394 [% IF ( shelveslooppri.mine ) %]
395 <form action="merge.pl" method="get">
396 <input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
398 <form action="shelves.pl" method="get">
399 <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
400 <input type="hidden" name="op" value="modif" />
401 <input type="hidden" name="display" value="privateshelves" />
402 <input type="submit" class="editshelf" value="Edit" />
404 <form action="shelves.pl" method="post">
405 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
406 <input type="hidden" name="shelves" value="1" />
407 <input type="hidden" name="display" value="privateshelves" />
408 <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
409 [% IF ( shelveslooppri.confirm ) %]
410 <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
411 <input type="submit" class="approve" value="Confirm" />
413 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this list?'));" value="Delete" />
424 <p>No private lists.</p>
425 [% END %]<!-- /shelveslooppriv -->
426 </div><!-- /privateshelves -->
428 [% IF ( showpublicshelves ) %]
429 <div id="publicshelves" class="ui-tabs-panel" style="display:block;">
431 <div id="publicshelves" class="ui-tabs-panel" style="display:none;">
433 [% IF ( shelvesloop ) %]
434 <div class="pages">[% pagination_bar %]</div>
436 <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
437 [% FOREACH shelvesloo IN shelvesloop %]
438 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
439 <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
440 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
441 <td>[% shelvesloo.count %] item(s)</td>
442 <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
443 <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
444 [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
447 [% IF ( shelvesloo.manageshelf ) %]
448 <form action="shelves.pl" method="get">
449 <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
450 <input type="hidden" name="op" value="modif" />
451 <input type="submit" class="editshelf" value="Edit" />
453 <form action="shelves.pl" method="post">
454 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
455 <input type="hidden" name="shelves" value="1" />
456 <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
457 [% IF ( shelvesloo.confirm ) %]
458 <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
459 <input type="submit" class="approve" value="Confirm" />
461 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this list?'));" value="Delete" />
472 [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
473 [% END %]<!-- /shelvesloop -->
474 </div><!-- /publicshelves -->
478 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
479 <!-- Value will be set here by placeHold() -->
480 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
481 <input type="hidden" name="multi_hold" value="1"/>
486 [% INCLUDE 'intranet-bottom.inc' %]