Bug 9458 - Add sorting to lists - QA Followup
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / virtualshelves / shelves.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; [% IF ( viewshelf ) %]Lists &rsaquo; Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; 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">
6 //<![CDATA[ 
7
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?");
11
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();
18         return false;
19     });
20     $("#CheckNone").click(function(){
21         $(".checkboxed").unCheckCheckboxes();
22         return false;
23     });
24     $("#placehold").show();
25 });
26
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 %]";
30                 } else { 
31                         return false;
32                 }
33         }
34
35     /**
36      * This function checks if the adequate number of records are checked for merging
37      */
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."));
43         } else {
44             location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&amp;biblionumber=' + checkboxes[1].value;
45         }
46         return false;
47     }
48
49     /**
50      * This function checks all checkboxes if all are empty,
51      * or unchecks all if any already checked.
52      */
53     function CheckAll(){
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;
60             }
61         }
62     }
63     /**
64      * This function returns true if ALL checkboxes are checked
65      */
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){
72                     return false;
73                 }
74             }
75         }
76         return true;
77     }
78     
79 function placeHold () {
80     var checkedItems = $(".selection:checked");
81     if ($(checkedItems).size() == 0) {
82         alert(MSG_NO_ITEM_SELECTED);
83         return false;
84     }
85     var bibs = "";
86     $(checkedItems).each(function() {
87         bibs += $(this).val() + "/";
88     });
89     $("#hold_form_biblios").val(bibs);
90     $("#hold_form").submit();
91     return false;
92 }
93     /**
94      * This function checks to make sure a list title is assigned
95      */
96       function Check(f) {
97                 var _alertString="";
98                 var alertString2;
99
100             if($("#shelfname").val() == ""){
101                         _alertString += _("- You must enter a List Name") + "\n";
102                 }
103
104                 if (_alertString.length==0) {
105             f.submit();
106                 } else {
107                         alertString2 = _("Form not submitted because of the following problem(s)");
108                         alertString2 += "\n------------------------------------------------------------------------------------\n\n";
109                         alertString2 += _alertString;
110                         alert(alertString2);
111                 }
112         }
113 //]]>
114 </script>
115 </head>
116 <body id="lists_shelves" class="lists">
117 [% INCLUDE 'header.inc' %]
118 [% INCLUDE 'cat-search.inc' %]
119
120 [% BLOCK list_permissions %]
121     <li>
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 %]
126         </select>
127         &nbsp;<span>anyone else to add entries.</span>
128     </li>
129     <li>
130         <label>&nbsp;</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 %]
134         </select>
135         &nbsp;<span>anyone to remove his own contributed entries.</span>
136     </li>
137     <li>
138         <label>&nbsp;</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 %]
142         </select>
143         &nbsp;<span>anyone to remove other contributed entries.</span>
144     </li>
145 [% END %]
146 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a> [% IF ( category1 ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( category2 ) %] &rsaquo; [% IF ( viewshelf ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% ELSIF ( showprivateshelves ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( showpublicshelves ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% END %]
147
148 [% IF ( viewshelf ) %]&rsaquo; Contents of <i>[% shelfname | html %]</i>[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; Edit list <i>[% shelfname | html %]</i>[% END %]</div>
149
150 <div id="doc" class="yui-t7">
151  <div id="bd">
152   <div id="yui-main">
153    <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
154    </div>
155 [% IF ( paramsloop ) %]
156 [% FOREACH paramsloo IN paramsloop %]
157 <div class="yui-ge">
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.
167                 </div>
168                 [% END %]
169                 [% IF ( paramsloo.nopermission ) %]
170                 <div class="dialog alert">ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission %].</div>
171                 [% END %]
172                 [% IF ( paramsloo.failgetitem ) %]
173                 <div class="dialog alert">ERROR: No item found with barcode [% paramsloo.failgetitem %].</div>
174                 [% END %] 
175                 [% IF ( paramsloo.duplicatebiblio ) %]
176                 <div class="dialog alert">A record matching barcode <b>[% paramsloo.duplicatebiblio %]</b> has already been added.</div>
177                 [% END %]
178                 [% IF ( paramsloo.nothingdeleted) %]
179                       <div class="dialog message">Warning: You could not delete any selected items from this shelf.</div>
180                 [% END %]
181                 [% IF ( paramsloo.somedeleted) %]
182                       <div class="dialog message">Warning: You could not delete all selected items from this shelf.</div>
183                 [% END %]
184                 [% IF ( paramsloo.modifyfailure) %]
185                       <div class="dialog message">ERROR: List could not be modified.</div>
186                 [% END %]
187         </div>
188 </div>
189 [% END %]
190 [% END %] 
191
192 [% IF ( viewshelf ) %]
193    <div class="yui-g">
194     [% IF ( itemsloop ) %]
195
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" />
199  <fieldset>
200   <legend>Contents of <i>[% shelfname | html %]</i></legend>
201    
202  [% IF ( itemsloop ) %]
203      <p><span class="checkall"></span> |
204      <span class="clearall"></span></p>
205  [% END %]
206         
207  [% IF direction == 'asc' %][% SET new_direction = 'desc' %][% ELSE %][% SET new_direction = 'asc' %][% END %]
208  <div class="pages">[% pagination_bar %]</div>
209     <table>
210             <tr>
211                 [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
212
213                 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
214                 <th>
215                     <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=title&direction=[% new_direction %]">Title</a>
216                     [% IF sort == 'title' %]
217                         [% IF direction == 'asc' %]
218                             <img src="/intranet-tmpl/prog/img/asc.gif" />
219                         [% ELSIF direction == 'desc' %]
220                             <img src="/intranet-tmpl/prog/img/desc.gif" />
221                         [% END %]
222                     [% ELSE %]
223                         <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
224                     [% END %]
225                 </th>
226                 <th>
227                     <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=author&direction=[% new_direction %]">Author</a>
228                    [% IF sort == 'author' %]
229                         [% IF direction == 'asc' %]
230                             <img src="/intranet-tmpl/prog/img/asc.gif" />
231                         [% ELSIF direction == 'desc' %]
232                             <img src="/intranet-tmpl/prog/img/desc.gif" />
233                         [% END %]
234                     [% ELSE %]
235                         <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
236                     [% END %]
237                  </th>
238                 <th>Date added</th>
239                 <th>
240                     <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=itemcallnumber&direction=[% new_direction %]">Call number</a>
241                    [% IF sort == 'itemcallnumber' %]
242                         [% IF direction == 'asc' %]
243                             <img src="/intranet-tmpl/prog/img/asc.gif" />
244                         [% ELSIF direction == 'desc' %]
245                             <img src="/intranet-tmpl/prog/img/desc.gif" />
246                         [% END %]
247                     [% ELSE %]
248                         <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
249                     [% END %]
250                  </th>
251                 <th>&nbsp;</th>
252             </tr>
253                 [% FOREACH itemsloo IN itemsloop %]
254                         [% UNLESS ( loop.odd ) %]
255                         <tr class="highlight">
256                         [% ELSE %]
257                         <tr>
258                         [% END %]
259                         [% IF ( itemsloop ) %]
260                         <td>
261                                 [% IF ( itemsloo.confirm ) %]
262                                 <input type="hidden"   name="CONFIRM-[% itemsloo.confirm %]" />
263                                 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
264                                 [% ELSE %]
265                                 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
266                                 [% END %]
267                         </td>
268                         [% END %]
269                         [% UNLESS ( item_level_itypes ) %]<td>
270                 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
271                         </td>[% END %]
272                         <td>
273                         [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
274                         [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
275                         </td>
276                         <td>[% itemsloo.author %]</td>
277                         <td>[% itemsloo.dateadded %]</td>
278                         <td>
279                 [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
280             </td>
281             <td>
282                         [% UNLESS ( itemsloo.notforloan ) %]
283                         <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
284                         [% END %]
285                         </td>
286                         </tr>
287                 [% END %]<!-- /itemsloop -->
288     </table><fieldset class="action">
289         [% IF ( itemsloop ) %]
290             <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" />
291             [% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" onclick="return confirm(MSG_REMOVE_FROM_LIST);" />[% END %]
292             <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
293         [% END %]
294  </fieldset>
295  </fieldset>
296  
297 </form>
298         [% END %]
299    </div>
300 [% END %]<!-- /viewshelf -->
301
302 [% IF ( allowaddingitem ) %]
303 <div class="yui-g">
304 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
305  <fieldset class="brief">
306     <legend>Add an item to <i>[% shelfname | html %]</i></legend>
307         <ol>
308             <li>
309                 <label for="addbarcode">Barcode:</label>
310                 <input name="addbarcode" type="text" id="addbarcode" size="14" />
311                 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
312                 <input type="hidden" name="modifyshelfcontents" value="1" />
313                 <input type="submit" value="Add" />
314             </li>
315         </ol>
316  </fieldset>
317 </form>
318 </div>
319 [% END %]<!-- /allowaddingitem -->
320
321 [% IF ( debug ) %]
322   [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
323   [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
324 [% END %]
325
326 [% IF ( seflag ) %]
327 <div class="yui-ge">
328     <div class="yui-u first">
329     <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
330         <fieldset class="rows">
331
332     [% IF ( shelves ) %]
333         <input type="hidden" name="shelves" value="1" />
334         <legend>Create a new list</legend>
335         <ol>
336         <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
337         <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
338         <li><label for="sortfield" >Sort this list by: </label>
339         <select name="sortfield" id="sortfield">
340             <option value="title">Title</option>
341             <option value="author">Author</option>
342             <option value="copyrightdate">Copyrightdate</option>
343             <option value="itemcallnumber">Call number</option>
344         </select></li>
345         <li><label for="category">Category: </label>
346             <select name="category" id="category">
347                   <option value="1">Private</option>
348                   <option value="2">Public</option>
349                      </select></li>
350             [% INCLUDE list_permissions %]
351         </ol>
352     [% END %]
353
354     [% IF ( edit ) %]
355                 <input type="hidden" name="op" value="modifsave" />
356         [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
357                 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
358         <legend>Edit list <i>[% shelfname | html %]</i></legend>
359                 <ol>
360                 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
361                 <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>
362                 <li><label for="sortfield" >Sort this list by: </label>
363                 <select name="sortfield">
364         [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
365         [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
366         [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
367         [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
368                 </select></li>
369                 <li><label for="category">Category: </label>
370                         <select id="category" name="category">
371                         [% IF ( category1 ) %]
372                                 <option value="1" selected="selected">Private</option>
373                         [% ELSE %]
374                                 <option value="1">Private</option>
375                         [% END %]
376                         [% IF ( category2 ) %]
377                                 <option value="2" selected="selected">Public</option>
378                         [% ELSE %]
379                                 <option value="2">Public</option>
380                         [% END %]
381                        </select></li>
382             [% INCLUDE list_permissions %]
383             </ol>
384         [% END %]
385
386                 </fieldset>
387                 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
388         [% 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 %]
389     </fieldset>
390     </form>
391     </div>
392     <div class="yui-u">
393         <div class="help"><ul>
394             <li>A <b>Private</b> list is managed by you and can be seen only by you.</li>
395             <li> A <b>Public</b> list can be seen by everybody, but managed only by you.</li>
396             <br/>
397             <li>The owner of a list is always allowed to add entries, but needs permission to remove.</li>
398         </ul>
399         </div>
400     </div>
401 </div>
402 [% END %]<!-- /seflag -->
403
404 [% UNLESS ( vseflag ) %]
405         <h2>Lists</h2>
406         <div class="statictabs">
407         <ul>
408         [% IF ( showprivateshelves ) %]
409             <li id="privateshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
410         [% ELSE %]
411             <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
412         [% END %]
413         [% IF ( showpublicshelves ) %]
414             <li id="publicshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
415         [% ELSE %]
416             <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
417         [% END %]
418         </ul>
419         [% IF ( showprivateshelves ) %]
420         <div id="privateshelves" class="tabs-container" style="display:block;">
421                 [% ELSE %]
422         <div id="privateshelves" class="tabs-container" style="display:none;">
423                 [% END %]
424             [% IF ( shelveslooppriv ) %]
425                         <div class="pages">[% pagination_bar %]</div>
426                         <table>
427                         <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
428                 [% FOREACH shelveslooppri IN shelveslooppriv %]
429                     [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
430         <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&amp;[% END %]viewshelf=[% shelveslooppri.shelf %]&amp;shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
431         <td>[% shelveslooppri.count %] item(s)</td>
432         <td>[% IF ( shelveslooppri.sortfield == "author" ) %]Author[% ELSIF ( shelveslooppri.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelveslooppri.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
433         <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
434                         [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
435                 </td>
436         <td>
437             [% IF ( shelveslooppri.mine ) %]
438                                 <form action="merge.pl" method="get">
439                                         <input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
440                                 </form>
441                                 <form action="shelves.pl" method="get">
442                                         <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
443                                         <input type="hidden" name="op" value="modif" />
444                     <input type="hidden" name="display" value="privateshelves" />
445                                         <input type="submit" class="editshelf" value="Edit" />
446                                 </form>
447                                 <form action="shelves.pl" method="post">
448                                     <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
449                                         <input type="hidden" name="shelves" value="1" />
450                     <input type="hidden" name="display" value="privateshelves" />
451                                         <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
452                                         [% IF ( shelveslooppri.confirm ) %]
453                                         <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
454                                         <input type="submit" class="approve" value="Confirm" />
455                                         [% ELSE %]
456                     <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
457                                         [% END %]
458                                 </form>
459                         [% ELSE %]
460                                 None
461                         [% END %]
462                 </td>
463                 </tr>
464                 [% END %]
465         </table>
466             [% ELSE %]
467             <p>No private lists.</p>
468             [% END %]<!-- /shelveslooppriv -->
469                 </div><!-- /privateshelves -->
470
471         [% IF ( showpublicshelves ) %]
472         <div id="publicshelves" class="tabs-container" style="display:block;">
473                 [% ELSE %]
474         <div id="publicshelves" class="tabs-container" style="display:none;">
475                 [% END %]
476         [% IF ( shelvesloop ) %]
477                 <div class="pages">[% pagination_bar %]</div>
478         <table>
479         <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
480             [% FOREACH shelvesloo IN shelvesloop %]
481                 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
482                 <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
483         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
484                 <td>[% shelvesloo.count %] item(s)</td>
485         <td>[% IF ( shelvesloo.sortfield == "author" ) %]Author[% ELSIF ( shelvesloo.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelvesloo.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
486         <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
487                         [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
488                 </td>
489         <td>
490             [% IF ( shelvesloo.manageshelf ) %]
491                                 <form action="shelves.pl" method="get">
492                                         <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
493                                         <input type="hidden" name="op" value="modif" />
494                                         <input type="submit" class="editshelf" value="Edit" />
495                                 </form>
496                                 <form action="shelves.pl" method="post">
497                                         <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
498                                         <input type="hidden" name="shelves" value="1" />
499                                         <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
500                                         [% IF ( shelvesloo.confirm ) %]
501                                         <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
502                                         <input type="submit" class="approve" value="Confirm" />
503                                         [% ELSE %]
504                     <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
505                                         [% END %]
506                                 </form>
507                         [% ELSE %]
508                                 None
509                         [% END %]
510                 </td>
511                 </tr>
512             [% END %]
513         </table>
514         [% ELSE %]
515             [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
516         [% END %]<!-- /shelvesloop -->
517         </div><!-- /publicshelves -->
518                 </div>
519 [% END %]
520
521 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
522     <!-- Value will be set here by placeHold() -->
523     <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
524     <input type="hidden" name="multi_hold" value="1"/>
525 </form>
526
527 </div>
528 </div>
529 [% INCLUDE 'intranet-bottom.inc' %]