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;
115 [% INCLUDE 'header.inc' %]
116 [% INCLUDE '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> [% 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 %]
120 [% 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>
122 <div id="doc" class="yui-t7">
125 <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
127 [% IF ( paramsloop ) %]
128 [% FOREACH paramsloo IN paramsloop %]
130 <div class="yui-u first">
131 [% IF ( paramsloo.already ) %]<div class="dialog alert">A List named [% paramsloo.already %] already exists!</div>[% END %]
132 [% IF ( paramsloo.status ) %]<div class="dialog alert">[% paramsloo.string %]</div>[% END %]
133 [% IF ( paramsloo.nobarcode ) %]<div class="dialog alert">ERROR: No barcode given.</div>[% END %]
134 [% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No shelfnumber given.</div>[% END %]
135 [% IF ( paramsloo.need_confirm ) %]
136 <div class="dialog alert">The list <i>[% paramsloo.need_confirm %]</i> is not empty.
137 <br />It has <b>[% paramsloo.count %]</b> entries.
138 <br />Use the "Confirm" button below to confirm deletion.
141 [% IF ( paramsloo.nopermission ) %]
142 <div class="dialog alert">ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission %].</div>
144 [% IF ( paramsloo.failgetitem ) %]
145 <div class="dialog alert">ERROR: No item found with barcode [% paramsloo.failgetitem %].</div>
147 [% IF ( paramsloo.duplicatebiblio ) %]
148 <div class="dialog alert">A record matching barcode <b>[% paramsloo.duplicatebiblio %]</b> has already been added.</div>
155 [% IF ( viewshelf ) %]
157 [% IF ( itemsloop ) %]
159 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed">
160 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
161 <input type="hidden" name="modifyshelfcontents" value="1" />
163 <legend>Contents of <i>[% shelfname | html %]</i></legend>
165 [% IF ( manageshelf ) %]
166 <p><span class="checkall"></span> |
167 <span class="clearall"></span></p>
170 <div class="pages">[% pagination_bar %]</div>
173 [% IF ( manageshelf ) %]<th class="checkall"> </th>[% END %]
174 [% UNLESS ( item_level_itypes ) %]<th>Item Type</th>[% END %]
180 [% FOREACH itemsloo IN itemsloop %]
181 [% UNLESS ( loop.odd ) %]
182 <tr class="highlight">
186 [% IF ( manageshelf ) %]
188 [% IF ( itemsloo.confirm ) %]
189 <input type="hidden" name="CONFIRM-[% itemsloo.confirm %]" />
190 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
192 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
196 [% UNLESS ( item_level_itypes ) %]<td>
197 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
200 [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
201 [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
203 <td>[% itemsloo.author %]</td>
204 <td>[% itemsloo.dateadded %]</td>
206 [% UNLESS ( itemsloo.notforloan ) %]
207 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
211 [% END %]<!-- /itemsloop -->
212 </table><fieldset class="action">
213 [% IF ( manageshelf ) %]
214 <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place Holds" />
215 <input type="submit" value="Remove selected records" onclick="return confirm(_('Are you sure you want to remove these records from the shelf?'));" />
216 <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
224 [% END %]<!-- /viewshelf -->
226 [% IF ( manageshelf ) %]
228 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
229 <fieldset class="brief">
230 <legend>Add an item to <i>[% shelfname | html %]</i></legend>
233 <label for="addbarcode">Barcode:</label>
234 <input name="addbarcode" type="text" id="addbarcode" size="14" />
235 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
236 <input type="hidden" name="modifyshelfcontents" value="1" />
237 <input type="submit" value="Add" />
243 [% END %]<!-- /manageshelf -->
246 [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
247 [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
252 <div class="yui-u first">
253 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
254 <fieldset class="rows">
257 <input type="hidden" name="shelves" value="1" />
258 <legend>Create a new List</legend>
260 <li><label class="required" for="addshelf">List Name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
261 <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
262 <li><label for="sortfield" >Sort this list by: </label>
263 <select name="sortfield" id="sortfield">
264 [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
265 [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
266 [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
268 <li><label for="category">Category: </label>
269 <select name="category" id="category">
270 <option value="1">Private</option>
271 <option value="2">Public</option>
272 <option value="3">Open</option>
277 <input type="hidden" name="op" value="modifsave" />
278 [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
279 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
280 <legend>Edit List <i>[% shelfname | html %]</i></legend>
282 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
283 <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>
284 <li><label for="sortfield" >Sort this list by: </label>
285 <select name="sortfield">
286 [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
287 [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
288 [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
290 <li><label for="category">Category: </label>
291 <select id="category" name="category">
292 [% IF ( category1 ) %]
293 <option value="1" selected="selected">Private</option>
295 <option value="1">Private</option>
297 [% IF ( category2 ) %]
298 <option value="2" selected="selected">Public</option>
300 <option value="2">Public</option>
302 [% IF ( category3 ) %]
303 <option value="3" selected="selected">Open</option>
305 <option value="3">Open</option>
311 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
312 [% 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 %]
317 <div class="help"><ul>
318 <li>A <b>Private</b> List is managed by you and can be seen only by you.</li>
319 <li> A <b>Public</b> List can be seen by everybody, but managed only by you.</li>
320 <li> A <b>Open</b> List can be seen and managed by everybody.</li>
324 [% END %]<!-- /seflag -->
326 [% UNLESS ( vseflag ) %]
328 <div class="toptabs">
329 <ul class="ui-tabs-nav">
330 [% IF ( showprivateshelves ) %]
331 <li id="privateshelves_tab" class="ui-tabs-selected"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your Lists</a></li>
333 <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your Lists</a></li>
335 [% IF ( showpublicshelves ) %]
336 <li id="publicshelves_tab" class="ui-tabs-selected"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public Lists</a></li>
338 <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public Lists</a></li>
341 [% IF ( showprivateshelves ) %]
342 <div id="privateshelves" class="ui-tabs-panel" style="display:block;">
344 <div id="privateshelves" class="ui-tabs-panel" style="display:none;">
346 [% IF ( shelveslooppriv ) %]
347 <div class="pages">[% pagination_bar %]</div>
349 <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
350 [% FOREACH shelveslooppri IN shelveslooppriv %]
351 [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
352 <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
353 <td>[% shelveslooppri.count %] item(s)</td>
354 <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
355 <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
356 [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
357 [% IF ( shelveslooppri.viewcategory3 ) %]Open[% END %]
360 [% IF ( shelveslooppri.mine ) %]
361 <form action="merge.pl" method="get">
362 <input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
364 <form action="shelves.pl" method="get">
365 <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
366 <input type="hidden" name="op" value="modif" />
367 <input type="hidden" name="display" value="privateshelves" />
368 <input type="submit" class="editshelf" value="Edit" />
370 <form action="shelves.pl" method="post">
371 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
372 <input type="hidden" name="shelves" value="1" />
373 <input type="hidden" name="display" value="privateshelves" />
374 <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
375 [% IF ( shelveslooppri.confirm ) %]
376 <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
377 <input type="submit" class="approve" value="Confirm" />
379 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this List?'));" value="Delete" />
390 <p>No Private Lists.</p>
391 [% END %]<!-- /shelveslooppriv -->
392 </div><!-- /privateshelves -->
394 [% IF ( showpublicshelves ) %]
395 <div id="publicshelves" class="ui-tabs-panel" style="display:block;">
397 <div id="publicshelves" class="ui-tabs-panel" style="display:none;">
399 [% IF ( shelvesloop ) %]
400 <div class="pages">[% pagination_bar %]</div>
402 <tr><th>List Name</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
403 [% FOREACH shelvesloo IN shelvesloop %]
404 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
405 <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
406 <td>[% shelvesloo.count %] item(s)</td>
407 <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
408 <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
409 [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
410 [% IF ( shelvesloo.viewcategory3 ) %]Open[% END %]
413 [% IF ( shelvesloo.manageshelf ) %]
414 <form action="shelves.pl" method="get">
415 <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
416 <input type="hidden" name="op" value="modif" />
417 <input type="submit" class="editshelf" value="Edit" />
419 <form action="shelves.pl" method="post">
420 <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
421 <input type="hidden" name="shelves" value="1" />
422 <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
423 [% IF ( shelvesloo.confirm ) %]
424 <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
425 <input type="submit" class="approve" value="Confirm" />
427 <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this List?'));" value="Delete" />
438 [% IF ( showpublicshelves ) %]No Public Lists.[% END %]
439 [% END %]<!-- /shelvesloop -->
440 </div><!-- /publicshelves -->
444 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
445 <!-- Value will be set here by placeHold() -->
446 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
447 <input type="hidden" name="multi_hold" value="1"/>
452 [% INCLUDE 'intranet-bottom.inc' %]