Bug 9458 - Add sorting to lists - QA Followup 4
[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' %]
208      [% SET new_direction = 'desc' %]
209  [% ELSE %]
210      [% SET direction = 'desc' %]
211      [% SET new_direction = 'asc' %]
212  [% END %]
213
214  <div class="pages">[% pagination_bar %]</div>
215     <table>
216             <tr>
217                 [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
218
219                 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
220                 <th>
221                     <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=title&direction=[% IF sort != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a>
222                     [% IF sort == 'title' %]
223                         <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
224                     [% ELSE %]
225                         <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
226                     [% END %]
227                 </th>
228                 <th>
229                     <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=author&direction=[% IF sort != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a>
230                    [% IF sort == 'author' %]
231                         <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
232                    [% ELSE %]
233                        <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
234                    [% END %]
235                  </th>
236                 <th>Date added</th>
237                 <th>
238                     <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=itemcallnumber&direction=[% IF sort != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a>
239                    [% IF sort == 'itemcallnumber' %]
240                         <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
241                    [% ELSE %]
242                        <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
243                    [% END %]
244                  </th>
245                 <th>&nbsp;</th>
246             </tr>
247                 [% FOREACH itemsloo IN itemsloop %]
248                         [% UNLESS ( loop.odd ) %]
249                         <tr class="highlight">
250                         [% ELSE %]
251                         <tr>
252                         [% END %]
253                         [% IF ( itemsloop ) %]
254                         <td>
255                                 [% IF ( itemsloo.confirm ) %]
256                                 <input type="hidden"   name="CONFIRM-[% itemsloo.confirm %]" />
257                                 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
258                                 [% ELSE %]
259                                 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
260                                 [% END %]
261                         </td>
262                         [% END %]
263                         [% UNLESS ( item_level_itypes ) %]<td>
264                 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
265                         </td>[% END %]
266                         <td>
267                         [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
268                         [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
269                         </td>
270                         <td>[% itemsloo.author %]</td>
271                         <td>[% itemsloo.dateadded %]</td>
272                         <td>
273                 [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
274             </td>
275             <td>
276                         [% UNLESS ( itemsloo.notforloan ) %]
277                         <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
278                         [% END %]
279                         </td>
280                         </tr>
281                 [% END %]<!-- /itemsloop -->
282     </table><fieldset class="action">
283         [% IF ( itemsloop ) %]
284             <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" />
285             [% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" onclick="return confirm(MSG_REMOVE_FROM_LIST);" />[% END %]
286             <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
287         [% END %]
288  </fieldset>
289  </fieldset>
290  
291 </form>
292         [% END %]
293    </div>
294 [% END %]<!-- /viewshelf -->
295
296 [% IF ( allowaddingitem ) %]
297 <div class="yui-g">
298 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
299  <fieldset class="brief">
300     <legend>Add an item to <i>[% shelfname | html %]</i></legend>
301         <ol>
302             <li>
303                 <label for="addbarcode">Barcode:</label>
304                 <input name="addbarcode" type="text" id="addbarcode" size="14" />
305                 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
306                 <input type="hidden" name="modifyshelfcontents" value="1" />
307                 <input type="submit" value="Add" />
308             </li>
309         </ol>
310  </fieldset>
311 </form>
312 </div>
313 [% END %]<!-- /allowaddingitem -->
314
315 [% IF ( debug ) %]
316   [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
317   [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
318 [% END %]
319
320 [% IF ( seflag ) %]
321 <div class="yui-ge">
322     <div class="yui-u first">
323     <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
324         <fieldset class="rows">
325
326     [% IF ( shelves ) %]
327         <input type="hidden" name="shelves" value="1" />
328         <legend>Create a new list</legend>
329         <ol>
330         <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
331         <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
332         <li><label for="sortfield" >Sort this list by: </label>
333         <select name="sortfield" id="sortfield">
334             <option value="title">Title</option>
335             <option value="author">Author</option>
336             <option value="copyrightdate">Copyrightdate</option>
337             <option value="itemcallnumber">Call number</option>
338         </select></li>
339         <li><label for="category">Category: </label>
340             <select name="category" id="category">
341                   <option value="1">Private</option>
342                   <option value="2">Public</option>
343                      </select></li>
344             [% INCLUDE list_permissions %]
345         </ol>
346     [% END %]
347
348     [% IF ( edit ) %]
349                 <input type="hidden" name="op" value="modifsave" />
350         [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
351                 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
352         <legend>Edit list <i>[% shelfname | html %]</i></legend>
353                 <ol>
354                 <li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
355                 <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>
356                 <li><label for="sortfield" >Sort this list by: </label>
357                 <select name="sortfield">
358         [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
359         [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
360         [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
361         [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
362                 </select></li>
363                 <li><label for="category">Category: </label>
364                         <select id="category" name="category">
365                         [% IF ( category1 ) %]
366                                 <option value="1" selected="selected">Private</option>
367                         [% ELSE %]
368                                 <option value="1">Private</option>
369                         [% END %]
370                         [% IF ( category2 ) %]
371                                 <option value="2" selected="selected">Public</option>
372                         [% ELSE %]
373                                 <option value="2">Public</option>
374                         [% END %]
375                        </select></li>
376             [% INCLUDE list_permissions %]
377             </ol>
378         [% END %]
379
380                 </fieldset>
381                 <fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
382         [% 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 %]
383     </fieldset>
384     </form>
385     </div>
386     <div class="yui-u">
387         <div class="help"><ul>
388             <li>A <b>Private</b> list is managed by you and can be seen only by you.</li>
389             <li> A <b>Public</b> list can be seen by everybody, but managed only by you.</li>
390             <br/>
391             <li>The owner of a list is always allowed to add entries, but needs permission to remove.</li>
392         </ul>
393         </div>
394     </div>
395 </div>
396 [% END %]<!-- /seflag -->
397
398 [% UNLESS ( vseflag ) %]
399         <h2>Lists</h2>
400         <div class="statictabs">
401         <ul>
402         [% IF ( showprivateshelves ) %]
403             <li id="privateshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
404         [% ELSE %]
405             <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
406         [% END %]
407         [% IF ( showpublicshelves ) %]
408             <li id="publicshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
409         [% ELSE %]
410             <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
411         [% END %]
412         </ul>
413         [% IF ( showprivateshelves ) %]
414         <div id="privateshelves" class="tabs-container" style="display:block;">
415                 [% ELSE %]
416         <div id="privateshelves" class="tabs-container" style="display:none;">
417                 [% END %]
418             [% IF ( shelveslooppriv ) %]
419                         <div class="pages">[% pagination_bar %]</div>
420                         <table>
421                         <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
422                 [% FOREACH shelveslooppri IN shelveslooppriv %]
423                     [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
424         <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&amp;[% END %]viewshelf=[% shelveslooppri.shelf %]&amp;shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
425         <td>[% shelveslooppri.count %] item(s)</td>
426         <td>[% IF ( shelveslooppri.sortfield == "author" ) %]Author[% ELSIF ( shelveslooppri.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelveslooppri.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
427         <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
428                         [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
429                 </td>
430         <td>
431             [% IF ( shelveslooppri.mine ) %]
432                                 <form action="merge.pl" method="get">
433                                         <input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
434                                 </form>
435                                 <form action="shelves.pl" method="get">
436                                         <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
437                                         <input type="hidden" name="op" value="modif" />
438                     <input type="hidden" name="display" value="privateshelves" />
439                                         <input type="submit" class="editshelf" value="Edit" />
440                                 </form>
441                                 <form action="shelves.pl" method="post">
442                                     <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
443                                         <input type="hidden" name="shelves" value="1" />
444                     <input type="hidden" name="display" value="privateshelves" />
445                                         <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
446                                         [% IF ( shelveslooppri.confirm ) %]
447                                         <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
448                                         <input type="submit" class="approve" value="Confirm" />
449                                         [% ELSE %]
450                     <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
451                                         [% END %]
452                                 </form>
453                         [% ELSE %]
454                                 None
455                         [% END %]
456                 </td>
457                 </tr>
458                 [% END %]
459         </table>
460             [% ELSE %]
461             <p>No private lists.</p>
462             [% END %]<!-- /shelveslooppriv -->
463                 </div><!-- /privateshelves -->
464
465         [% IF ( showpublicshelves ) %]
466         <div id="publicshelves" class="tabs-container" style="display:block;">
467                 [% ELSE %]
468         <div id="publicshelves" class="tabs-container" style="display:none;">
469                 [% END %]
470         [% IF ( shelvesloop ) %]
471                 <div class="pages">[% pagination_bar %]</div>
472         <table>
473         <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
474             [% FOREACH shelvesloo IN shelvesloop %]
475                 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
476                 <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
477         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
478                 <td>[% shelvesloo.count %] item(s)</td>
479         <td>[% IF ( shelvesloo.sortfield == "author" ) %]Author[% ELSIF ( shelvesloo.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelvesloo.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
480         <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
481                         [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
482                 </td>
483         <td>
484             [% IF ( shelvesloo.manageshelf ) %]
485                                 <form action="shelves.pl" method="get">
486                                         <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
487                                         <input type="hidden" name="op" value="modif" />
488                                         <input type="submit" class="editshelf" value="Edit" />
489                                 </form>
490                                 <form action="shelves.pl" method="post">
491                                         <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
492                                         <input type="hidden" name="shelves" value="1" />
493                                         <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
494                                         [% IF ( shelvesloo.confirm ) %]
495                                         <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
496                                         <input type="submit" class="approve" value="Confirm" />
497                                         [% ELSE %]
498                     <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
499                                         [% END %]
500                                 </form>
501                         [% ELSE %]
502                                 None
503                         [% END %]
504                 </td>
505                 </tr>
506             [% END %]
507         </table>
508         [% ELSE %]
509             [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
510         [% END %]<!-- /shelvesloop -->
511         </div><!-- /publicshelves -->
512                 </div>
513 [% END %]
514
515 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
516     <!-- Value will be set here by placeHold() -->
517     <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
518     <input type="hidden" name="multi_hold" value="1"/>
519 </form>
520
521 </div>
522 </div>
523 [% INCLUDE 'intranet-bottom.inc' %]