1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › <!-- TMPL_IF NAME="viewshelf" -->Lists › Contents of <!-- TMPL_VAR NAME="shelfname" --><!-- TMPL_ELSE -->Lists<!-- /TMPL_IF --><!-- TMPL_IF NAME="shelves" --> › Create New List<!-- /TMPL_IF --><!-- TMPL_IF NAME="edit" --> › Edit List <!-- TMPL_VAR name="shelfname"--><!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript" src="<!-- TMPL_VAR name="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?<!-- TMPL_IF NAME="showprivateshelves" -->display=privateshelves&<!-- /TMPL_IF -->shelves=1&DEL-<!-- TMPL_VAR NAME="shelfnumber" -->=1";
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(f.addshelf.value.length ==0){
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;
115 <!-- TMPL_INCLUDE NAME="header.inc" -->
116 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
118 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
119 <!-- TMPL_IF NAME="viewshelf" -->› Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i><!-- /TMPL_IF --><!-- TMPL_IF NAME="shelves" --> › Create New List<!-- /TMPL_IF --><!-- TMPL_IF NAME="edit" --> › Edit List <i><!-- TMPL_VAR name="shelfname"--></i><!-- /TMPL_IF --></div>
121 <div id="doc" class="yui-t7">
124 <div class="yui-g"><!-- TMPL_INCLUDE NAME="virtualshelves-toolbar.inc" -->
126 <!-- TMPL_IF NAME="paramsloop" -->
127 <!-- TMPL_LOOP NAME="paramsloop" -->
129 <div class="yui-u first">
130 <!-- TMPL_IF NAME="already" --><div class="dialog alert">A List named <!-- TMPL_VAR NAME="already" --> already exists!</div><!-- /TMPL_IF -->
131 <!-- TMPL_IF NAME="status" --><div class="dialog alert"><!-- TMPL_VAR NAME="string" --></div><!-- /TMPL_IF -->
132 <!-- TMPL_IF NAME="nobarcode" --><div class="dialog alert">ERROR: No barcode given.</div><!-- /TMPL_IF -->
133 <!-- TMPL_IF NAME="noshelfnumber" --><div class="dialog alert">ERROR: No shelfnumber given.</div><!-- /TMPL_IF -->
134 <!-- TMPL_IF NAME="need_confirm" -->
135 <div class="dialog alert">The list <i><!-- TMPL_VAR NAME="need_confirm" --></i> is not empty.
136 <br />It has <b><!-- TMPL_VAR NAME="count" --></b> entries.
137 <br />Use the "Confirm" button below to confirm deletion.
140 <!-- TMPL_IF NAME="nopermission" -->
141 <div class="dialog alert">ERROR: You do not have adequate permission for that action on list <!-- TMPL_VAR NAME="nopermission" -->.</div>
143 <!-- TMPL_IF NAME="failgetitem" -->
144 <div class="dialog alert">ERROR: No item found with barcode <!-- TMPL_VAR NAME="failgetitem" -->.</div>
146 <!-- TMPL_IF NAME="duplicatebiblio" -->
147 <div class="dialog alert">A record matching barcode <b><!-- TMPL_VAR NAME="duplicatebiblio" --></b> has already been added.</div>
154 <!-- TMPL_IF NAME="viewshelf" -->
156 <!-- TMPL_IF NAME="itemsloop" -->
158 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed">
159 <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
160 <input type="hidden" name="modifyshelfcontents" value="1" />
162 <legend>Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i></legend>
164 <!--TMPL_IF NAME="manageshelf" -->
165 <p><span class="checkall"></span> |
166 <span class="clearall"></span></p>
169 <!-- TMPL_VAR name='pagination_bar'-->
172 <!--TMPL_IF NAME="manageshelf" --><th class="checkall"> </th><!-- /TMPL_IF -->
173 <!-- TMPL_UNLESS NAME="item_level_itypes" --><th>Item Type</th><!-- /TMPL_UNLESS -->
179 <!-- TMPL_LOOP NAME="itemsloop" -->
180 <!-- TMPL_UNLESS NAME="__odd__" -->
181 <tr class="highlight">
184 <!-- /TMPL_UNLESS -->
185 <!-- TMPL_IF NAME="manageshelf" -->
187 <!-- TMPL_IF NAME="confirm" -->
188 <input type="hidden" name="CONFIRM-<!-- TMPL_VAR NAME="confirm" -->" />
189 <input type="checkbox" class="selection" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="REM-<!-- TMPL_VAR NAME="biblionumber" -->" checked />
191 <input type="checkbox" class="selection" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="REM-<!-- TMPL_VAR NAME="biblionumber" -->" />
195 <!-- TMPL_UNLESS NAME="item_level_itypes" --><td>
196 <!-- TMPL_UNLESS NAME="noItemTypeImages" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!-- TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->" /><!-- /TMPL_UNLESS --><!-- TMPL_VAR NAME="description" -->
197 </td><!-- /TMPL_UNLESS -->
199 <!-- TMPL_INCLUDE NAME="biblio-default-view.inc" -->
200 <!-- TMPL_VAR NAME="title" escape="html" --><!-- TMPL_LOOP NAME="subtitle" --> <!-- TMPL_VAR NAME="subfield" --><!-- /TMPL_LOOP --></a>
202 <td><!-- TMPL_VAR NAME="author" --></td>
203 <td><!-- TMPL_VAR NAME="dateadded" --></td>
205 <!-- TMPL_UNLESS name="notforloan" -->
206 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Holds</a>
207 <!-- /TMPL_UNLESS -->
210 <!-- /TMPL_LOOP --><!-- /itemsloop -->
211 </table><fieldset class="action">
212 <!-- TMPL_IF name="manageshelf" -->
213 <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place Holds" />
214 <input type="submit" value="Remove selected records" onclick="return confirm(_('Are you sure you want to remove these records from the shelf?'));" />
215 <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
223 <!-- /TMPL_IF --><!-- /viewshelf -->
225 <!-- TMPL_IF name="manageshelf" -->
227 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
228 <fieldset class="brief">
229 <legend>Add an item to <i><!-- TMPL_VAR NAME="shelfname" --></i></legend>
232 <label for="addbarcode">Barcode:</label>
233 <input name="addbarcode" type="text" id="addbarcode" size="14" />
234 <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
235 <input type="hidden" name="modifyshelfcontents" value="1" />
236 <input type="submit" value="Add" />
242 <!-- /TMPL_IF --><!-- /manageshelf -->
244 <!-- TMPL_IF name="debug" -->
245 <!-- TMPL_IF name="edit" --><div>Edit is on (<!-- TMPL_VAR name="shelfname" -->)</div><!-- /TMPL_IF -->
246 <!-- TMPL_IF NAME="seflag" --><div>seflag is on (<!-- TMPL_VAR name="seflag" -->)</div><!-- /TMPL_IF -->
249 <!-- TMPL_IF NAME="seflag" -->
251 <div class="yui-u first">
252 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
253 <fieldset class="rows">
255 <!-- TMPL_IF NAME="shelves" -->
256 <input type="hidden" name="shelves" value="1" />
257 <legend>Create a new List</legend>
259 <li><label class="required" for="addshelf">List Name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
260 <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="<!-- TMPL_VAR name="loggedinuser" -->" /><!-- TMPL_VAR name="loggedinusername" --></li>
261 <li><label for="sortfield" >Sort this list by: </label>
262 <select name="sortfield" id="sortfield">
263 <!-- TMPL_IF NAME="sort_title" --><option value="title" selected="selected">Title</option><!-- TMPL_ELSE --><option value="title">Title</option><!-- /TMPL_IF -->
264 <!-- TMPL_IF NAME="sort_author" --><option value="author" selected="selected">Author</option><!-- TMPL_ELSE --><option value="author">Author</option><!-- /TMPL_IF -->
265 <!-- TMPL_IF NAME="sort_copyrightdate" --><option value="copyrightdate" selected="selected">Copyrightdate</option><!-- TMPL_ELSE --><option value="copyrightdate">Copyrightdate</option><!-- /TMPL_IF -->
267 <li><label for="category">Category: </label>
268 <select name="category" id="category">
269 <option value="1">Private</option>
270 <option value="2">Public</option>
271 <option value="3">Open</option>
275 <!-- TMPL_IF name="edit" -->
276 <input type="hidden" name="op" value="modifsave" />
277 <!-- TMPL_IF NAME="showprivateshelves" --><input type="hidden" name="display" value="privateshelves" /><!-- /TMPL_IF -->
278 <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->" />
279 <legend>Edit List <i><!-- TMPL_VAR name="shelfname" --></i></legend>
281 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value='<!-- TMPL_VAR name="shelfname" ESCAPE="HTML" -->' /></li>
282 <li><label for="owner">Owner: </label><input type="hidden" id="owner" name="owner" value="<!-- TMPL_IF NAME="owner" --><!-- TMPL_VAR NAME="ownername" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="loggedinusername" --><!-- /TMPL_IF -->" /><!-- TMPL_IF NAME="owner" --><!-- TMPL_VAR NAME="ownername" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="loggedinusername" --><!-- /TMPL_IF --></li>
283 <li><label for="sortfield" >Sort this list by: </label>
284 <select name="sortfield">
285 <!-- TMPL_IF NAME="sort_title" --><option value="title" selected="selected">Title</option><!-- TMPL_ELSE --><option value="title">Title</option><!-- /TMPL_IF -->
286 <!-- TMPL_IF NAME="sort_author" --><option value="author" selected="selected">Author</option><!-- TMPL_ELSE --><option value="author">Author</option><!-- /TMPL_IF -->
287 <!-- TMPL_IF NAME="sort_copyrightdate" --><option value="copyrightdate" selected="selected">Copyrightdate</option><!-- TMPL_ELSE --><option value="copyrightdate">Copyrightdate</option><!-- /TMPL_IF -->
289 <li><label for="category">Category: </label>
290 <select id="category" name="category">
291 <!-- TMPL_IF name="category1" -->
292 <option value="1" selected="selected">Private</option>
294 <option value="1">Private</option>
296 <!-- TMPL_IF name="category2" -->
297 <option value="2" selected="selected">Public</option>
299 <option value="2">Public</option>
301 <!-- TMPL_IF NAME="category3" -->
302 <option value="3" selected="selected">Open</option>
304 <option value="3">Open</option>
310 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
311 <!-- TMPL_IF NAME="showprivateshelves" --><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves" class="cancel">Cancel</a><!-- TMPL_ELSE --><a href="/cgi-bin/koha/virtualshelves/shelves.pl" class="cancel">Cancel</a><!-- /TMPL_IF -->
316 <div class="help"><ul>
317 <li>A <b>Private</b> List is managed by you and can be seen only by you.</li>
318 <li> A <b>Public</b> List can be seen by everybody, but managed only by you.</li>
319 <li> A <b>Open</b> List can be seen and managed by everybody.</li>
323 <!-- /TMPL_IF --><!-- /seflag -->
325 <!-- TMPL_UNLESS NAME="vseflag" -->
327 <div class="toptabs">
328 <ul class="ui-tabs-nav">
329 <!-- TMPL_IF NAME="showprivateshelves" -->
330 <li id="privateshelves_tab" class="ui-tabs-selected"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your Lists</a></li>
332 <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your Lists</a></li>
334 <!-- TMPL_IF NAME="showpublicshelves" -->
335 <li id="publicshelves_tab" class="ui-tabs-selected"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public Lists</a></li>
337 <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public Lists</a></li>
340 <!-- TMPL_IF NAME="showprivateshelves" -->
341 <div id="privateshelves" class="ui-tabs-panel" style="display:block;">
343 <div id="privateshelves" class="ui-tabs-panel" style="display:none;">
345 <!-- TMPL_IF NAME="shelveslooppriv" -->
346 <!-- TMPL_VAR name='pagination_bar'-->
348 <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
349 <!-- TMPL_LOOP NAME="shelveslooppriv" -->
350 <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF -->
351 <td><a href="shelves.pl?<!-- TMPL_IF NAME="showprivateshelves" -->display=privateshelves&<!-- /TMPL_IF -->viewshelf=<!-- TMPL_VAR NAME="shelf" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></a></td>
352 <td><!-- TMPL_VAR NAME="count" --> item(s)</td>
353 <td><!-- TMPL_IF NAME="authorsort" -->Author<!-- TMPL_ELSIF NAME="yearsort" -->Year<!-- TMPL_ELSE -->Title<!-- /TMPL_IF --></td>
354 <td><!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF -->
355 <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF -->
356 <!-- TMPL_IF NAME="viewcategory3" -->Open<!-- /TMPL_IF -->
359 <!-- TMPL_IF NAME="mine" -->
360 <form action="merge.pl" method="get">
361 <input type="hidden" name="shelf" value="<!-- TMPL_VAR NAME="shelf" -->" />
363 <form action="shelves.pl" method="get">
364 <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelf" -->" />
365 <input type="hidden" name="op" value="modif" />
366 <input type="hidden" name="display" value="privateshelves" />
367 <input type="submit" class="editshelf" value="Edit" />
369 <form action="shelves.pl" method="post">
370 <input type="hidden" name="shelves" value="1" />
371 <input type="hidden" name="display" value="privateshelves" />
372 <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" value="1" />
373 <!-- TMPL_IF NAME="confirm" -->
374 <input type="hidden" name="CONFIRM-<!-- TMPL_VAR NAME="confirm" -->" value="1" />
375 <input type="submit" class="approve" value="Confirm" />
377 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this List?'));" value="Delete" />
388 <p>No Private Lists.</p>
389 <!-- /TMPL_IF --><!-- /shelveslooppriv -->
390 </div><!-- /privateshelves -->
392 <!-- TMPL_IF NAME="showpublicshelves" -->
393 <div id="publicshelves" class="ui-tabs-panel" style="display:block;">
395 <div id="publicshelves" class="ui-tabs-panel" style="display:none;">
397 <!-- TMPL_IF NAME="shelvesloop" -->
398 <!-- TMPL_VAR name='pagination_bar'-->
400 <tr><th>List Name</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
401 <!-- TMPL_LOOP NAME="shelvesloop" -->
402 <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF -->
403 <td><a href="shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></a></td>
404 <td><!-- TMPL_VAR NAME="count" --> item(s)</td>
405 <td><!-- TMPL_IF NAME="authorsort" -->Author<!-- TMPL_ELSIF NAME="yearsort" -->Year<!-- TMPL_ELSE -->Title<!-- /TMPL_IF --></td>
406 <td><!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF -->
407 <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF -->
408 <!-- TMPL_IF NAME="viewcategory3" -->Open<!-- /TMPL_IF -->
411 <!-- TMPL_IF NAME="manageshelf" -->
412 <form action="shelves.pl" method="get">
413 <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelf" -->" />
414 <input type="hidden" name="op" value="modif" />
415 <input type="submit" class="editshelf" value="Edit" />
417 <form action="shelves.pl" method="post">
418 <input type="hidden" name="shelves" value="1" />
419 <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" value="1" />
420 <!-- TMPL_IF NAME="confirm" -->
421 <input type="hidden" name="CONFIRM-<!-- TMPL_VAR NAME="confirm" -->" value="1" />
422 <input type="submit" class="approve" value="Confirm" />
424 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this List?'));" value="Delete" />
435 <!-- TMPL_IF NAME="showpublicshelves" -->No Public Lists.<!-- /TMPL_IF -->
436 <!-- /TMPL_IF --><!-- /shelvesloop -->
437 </div><!-- /publicshelves -->
439 <!-- /TMPL_UNLESS -->
441 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
442 <!-- Value will be set here by placeHold() -->
443 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
444 <input type="hidden" name="multi_hold" value="1"/>
449 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->