MT 1587 : CSV export for cart and shelves, with the ability to define different expor...
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-shelves.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;   <!-- TMPL_IF NAME="viewshelf" -->Contents of <!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --><!-- TMPL_ELSE -->My Lists<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
3 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
4 <script type="text/JavaScript" language="JavaScript">
5 //<![CDATA[
6 var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
7
8 $.tablesorter.addParser({
9     id: 'articles', 
10     is: function(s) {return false;  }, 
11     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
12     type: 'text' 
13 });
14
15 function holdSelections() {
16     var checkedBoxes = $(":checkbox:checked");
17     if ($(checkedBoxes).size() == 0) {
18         alert(MSG_NO_RECORD_SELECTED);
19     } else {
20         var bibs = "";
21         $(checkedBoxes).each(function(){
22             var name = $(this).attr("name");
23             bib = name.substr(4);
24             bibs += bib + "/";
25         });
26         document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
27     }
28 }
29
30 function tagSelected() {
31     <!-- TMPL_IF NAME="loggedinusername" -->
32     var checkedBoxes = $("input:checkbox:checked");
33     if ($(checkedBoxes).size()) {
34         $("#tagsel_tag").hide();
35         $(".tag_hides").hide();
36         $("#tagsel_form").show();
37     } else {
38         alert(MSG_NO_RECORD_SELECTED);
39     }
40     <!-- TMPL_ELSE -->
41     window.location = "/cgi-bin/koha/opac-user.pl";
42     <!-- /TMPL_IF -->
43 }
44
45 function tagCanceled() {
46     $("#tagsel_form").hide();
47     $("#tagsel_tag").show();
48     $(".tag_hides").show();
49 }
50
51 function tagAdded() {
52     var checkedBoxes = $("input:checkbox:checked");
53     if (!$(checkedBoxes).size()) {
54         alert(MSG_NO_RECORD_SELECTED);
55         return false;
56     }
57
58     var tag = $("#tagsel_new").val();
59     if (!tag || (tag == "")) {
60         alert(MSG_NO_TAG_SPECIFIED);
61         return false;
62     }
63
64     var bibs = [];
65     for (var i = 0; i < $(checkedBoxes).size(); i++) {
66         var box = $(checkedBoxes).get(i);
67         bibs[i] = $(box).val();
68     }
69
70     KOHA.Tags.add_multitags_button(bibs, tag);
71     return false;
72 }
73
74 $(function() {
75     $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear All')+"<\/a>");
76     $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select All')+"<\/a>");
77         $(".sendlist").show();
78     <!-- TMPL_IF NAME="RequestOnOpac" -->$("#placehold").html("<a href=\"#\" class=\"hold tag_hides\">"+_('Place Hold')+"<\/a>");
79         $("a.hold").click(function(){
80                  holdSelections();
81                  return false;
82         });<!-- /TMPL_IF -->
83     $("#listcontents").tablesorter({
84         widgets : ['zebra'],
85         <!-- TMPL_IF NAME="manageshelf" -->
86           <!-- TMPL_IF NAME="authorsort" -->
87           sortList: [[2,0]],
88           <!-- TMPL_ELSIF NAME="yearsort" -->
89           sortList: [[3,1]],
90           <!-- TMPL_ELSE -->
91           sortList: [[1,0]],
92           <!-- /TMPL_IF -->
93           headers: { 0: { sorter: false },1:{sorter: 'articles'}
94         <!-- TMPL_ELSE -->
95           <!-- TMPL_IF NAME="authorsort" -->
96           sortList: [[1,0]],
97           <!-- TMPL_ELSIF NAME="yearsort" -->
98           sortList: [[2,1]],
99           <!-- TMPL_ELSE -->
100           sortList: [[0,0]],
101           <!-- /TMPL_IF -->
102           headers: { 0:{sorter:'articles'}
103         <!-- /TMPL_IF -->
104         }
105     }); 
106     $("#CheckAll").click(function(){
107         $(".checkboxed").checkCheckboxes();
108         return false;
109     });
110     $("#CheckNone").click(function(){
111         $(".checkboxed").unCheckCheckboxes();
112         return false;
113     });
114     <!-- TMPL_IF NAME="TagsEnabled" -->
115         $("#addtags").click(function(){
116                 tagSelected();
117                 return false;
118         });
119         $("#addtags").html("<a id=\"tagsel_tag\" href=\"#\">"+_("Tag")+"<\/a>");
120     $("#tagsel_button").click(function(){
121         tagAdded();
122         return false;
123     });
124     <!-- /TMPL_IF -->
125 });
126 //]]>
127 </script>
128 </head>
129 <!-- TMPL_IF NAME="loggedinusername" --><body id="opac-userlists"><!-- TMPL_ELSE --><body id="opac-lists"><!-- /TMPL_IF -->
130   <!-- TMPL_IF EXPR="OpacNav||loggedinusername" --><div id="doc3" class="yui-t1"><!-- TMPL_ELSE --><div id="doc3" class="yui-t7"><!-- /TMPL_IF -->
131     <div id="bd">
132       <!-- TMPL_INCLUDE NAME="masthead.inc" -->
133       <div id="yui-main">
134         <div class="yui-b">
135           <div class="container">
136           
137             <!-- TMPL_IF NAME="paramsloop" -->
138               <!-- TMPL_LOOP NAME="paramsloop" -->
139                 <div class="yui-ge">
140                   <div class="yui-u first">
141                     <!-- TMPL_IF NAME="already" --><div class="dialog alert">A List named <b><!-- TMPL_VAR NAME="already" --></b> already exists!</div><!-- /TMPL_IF -->
142                     <!-- TMPL_IF NAME="status" --><div class="dialog alert"><!-- TMPL_VAR NAME="string" --></div><!-- /TMPL_IF -->
143                     <!-- TMPL_IF NAME="nobarcode" --><div class="dialog alert">ERROR: No barcode given.</div><!-- /TMPL_IF -->
144                     <!-- TMPL_IF NAME="noshelfnumber" --><div class="dialog alert">ERROR: No shelfnumber given.</div><!-- /TMPL_IF -->
145                     <!-- TMPL_IF NAME="need_confirm" -->
146                       <div class="dialog alert">
147                         The list <i><!-- TMPL_VAR NAME="need_confirm" --></i> is not empty.
148                         <br />It has <b><!-- TMPL_VAR NAME="count" --></b> entries.
149                         <br />Use the "Confirm" button below to confirm deletion.
150                      </div>
151                     <!-- /TMPL_IF -->
152                     <!-- TMPL_IF NAME="nopermission" -->
153                       <div class="dialog alert">ERROR: You do not have adequate permission for that action on list <!-- TMPL_VAR NAME="nopermission" -->.</div>
154                     <!-- /TMPL_IF -->
155                     <!-- TMPL_IF NAME="failgetitem" -->
156                       <div class="dialog alert">ERROR: No item found with barcode <!-- TMPL_VAR NAME="failgetitem" -->.</div>
157                     <!-- /TMPL_IF -->
158                     <!-- TMPL_IF NAME="duplicatebiblio" -->
159                       <div class="dialog alert">A record matching barcode <b><!-- TMPL_VAR NAME="duplicatebiblio" --></b> has already been added.</div>
160                     <!-- /TMPL_IF -->
161                     <!-- TMPL_IF NAME="delete_ok" -->
162                       <div class="dialog message">List <!-- TMPL_VAR NAME="delete_ok" --> Deleted.</div>
163                     <!-- /TMPL_IF -->
164                     <!-- TMPL_IF NAME="delete_fail" -->
165                       <div class="dialog message">ERROR: Database error. Delete (list number <!-- TMPL_VAR NAME="delete_fail" -->) failed.</div>
166                     <!-- /TMPL_IF -->
167                     <!-- TMPL_IF NAME="unrecognized" -->
168                       <div class="dialog message">ERROR: List number <!-- TMPL_VAR NAME="unrecognized" --> unrecognized.</div>
169                     <!-- /TMPL_IF -->
170                   </div>
171                 </div>
172               <!-- /TMPL_LOOP --><!-- /paramsloop -->
173             <!-- /TMPL_IF --> <!-- /paramsloop -->
174
175             <div class="yui-g">
176             
177
178             <!-- TMPL_IF NAME="viewshelf" --><!--  Viewing a particular shelf -->
179               <h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="<!-- TMPL_VAR NAME="themelang" -->/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> <em><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></em></h3>
180               <!-- TMPL_IF NAME="itemsloop" -->
181                 <!-- TMPL_IF NAME="manageshelf" -->
182                   <div>
183                     <span class="checkall"></span>
184                     <span class="clearall"></span>
185                     |
186                                                 <span class="sendlist"><a href="#" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=<!-- TMPL_VAR NAME="shelfnumber" -->','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>
187                       <a href="#" class="download tag_hides" onclick="open(CGIBIN+'opac-downloadshelf.pl?shelfid=<!-- TMPL_VAR NAME="shelfnumber" -->','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100')">Download List</a>
188                       <a class="editshelf tag_hides" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=<!-- TMPL_VAR NAME="shelfnumber" -->&amp;op=modif">Edit List</a>
189                       <form method="post" action="opac-shelves.pl" class="tag_hides">
190                         <input type="hidden" value="1" name="shelves"/>
191                     <!-- TMPL_IF NAME="showprivateshelves" -->
192                          <input type="hidden" name="display" value="privateshelves" />
193                     <!-- /TMPL_IF -->
194                          <input type="hidden" value="1" name="DEL-<!-- TMPL_VAR NAME="shelfnumber" -->"/>
195                          <input type="submit" class="deleteshelf" value="Delete List" onclick="return confirmDelete(_('Are you sure you want to remove this List?'));"/>
196                       </form>
197 <!-- TMPL_IF NAME="RequestOnOpac" -->
198                       <span id="placehold"></span>
199 <!-- /TMPL_IF -->
200     <!-- TMPL_IF NAME="TagsEnabled" -->
201                     <span id="addtags"></span>               
202                     <span id="tagsel_form" style="display:none">
203                       <label for="tagsel_new" style="display:inline">New&nbsp;Tag:</label>
204                       <input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/>
205                       <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button"
206                              type="submit" value="Add" style="display:inline" />
207                       <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
208                     </span>
209     <!-- /TMPL_IF -->
210                   </div>
211                                 <!-- TMPL_ELSE -->
212                                 <div style="margin-left:1em;"><span class="sendlist"><a href="#" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=<!-- TMPL_VAR NAME="shelfnumber" -->','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span> | <span><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to place holds or add tags</span></div>
213                 <!-- /TMPL_IF -->
214                 <!-- TMPL_IF NAME="manageshelf" -->
215                   <form action="/cgi-bin/koha/opac-shelves.pl" method="post" name="myform" class="checkboxed">
216                     <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
217                     <input type="hidden" name="modifyshelfcontents" value="1" />
218                 <!-- /TMPL_IF -->
219                 <!-- TMPL_VAR name='pagination_bar'-->
220                 <table id="listcontents">
221                   <thead><tr>
222                     <!-- TMPL_IF NAME="manageshelf" --><th>&nbsp;</th><!-- /TMPL_IF -->
223                     <!-- TMPL_UNLESS NAME="item-level_itypes" --><th>Item Type</th><!-- /TMPL_UNLESS -->
224                     <th>Title</th>
225                     <th>Author</th>
226                     <th>Year</th>
227                   </tr></thead>
228                   <tbody>
229                   <!-- TMPL_LOOP NAME="itemsloop" -->
230                     <!-- TMPL_UNLESS NAME="__odd__" -->
231                       <tr class="highlight">
232                     <!-- TMPL_ELSE -->
233                       <tr>
234                     <!-- /TMPL_UNLESS -->
235                     <!-- TMPL_IF NAME="manageshelf" -->
236                         <td><input type="checkbox" name="REM-<!-- TMPL_VAR NAME="biblionumber" -->"
237                                    value="<!-- TMPL_VAR NAME="biblionumber">" /></td>
238                     <!-- /TMPL_IF -->
239                     <!-- TMPL_UNLESS NAME="item-level_itypes" -->
240                         <td>
241                           <img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!-- TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->" /><!-- TMPL_VAR NAME="description" -->
242                         </td>
243                     <!-- /TMPL_UNLESS -->
244                         <td>
245                     <!-- TMPL_IF NAME="BiblioDefaultViewmarc" -->
246                           <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" --></a>
247                     <!-- TMPL_ELSE -->
248                       <!-- TMPL_IF NAME="BiblioDefaultViewisbd" -->
249                           <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" --></a>
250                       <!-- TMPL_ELSE -->
251                           <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" --></a>
252                       <!-- /TMPL_IF -->
253                     <!-- /TMPL_IF -->
254                     <!-- COinS / OpenURL -->
255                           <!-- COinS / OpenURL --><span class="Z3988" title="<!-- TMPL_VAR NAME="coins" -->"></span>
256                           <br/>
257                           <div id="newtag<!-- TMPL_VAR NAME="biblionumber">_status" class="tagstatus results_summary" style="display:none">Tag status here.</div>
258                         </td>
259                         <td><!-- TMPL_VAR NAME="author" --></td>
260                         <td>
261                                         <!-- TMPL_IF NAME="publicationyear" -->
262                                                 <!-- TMPL_VAR NAME="publicationyear" -->
263                                         <!-- TMPL_ELSE -->
264                                                 <!-- TMPL_VAR NAME="copyrightdate" -->
265                                         <!-- /TMPL_IF -->
266                         </td>
267                       </tr>
268                   <!-- /TMPL_LOOP --><!-- /itemsloop -->
269                     </tbody>
270                   </table>
271                 <!-- TMPL_ELSE -->
272                   <div class="dialog message">This List is empty.  You can add to your lists from the results of any <a href="opac-main.pl">search</a>!</div>
273               <!-- /TMPL_IF --><!-- /itemsloop -->
274             <!-- /TMPL_IF --><!-- /viewshelf -->
275
276
277             <!-- TMPL_IF NAME="manageshelf" -->
278               <!-- Editing shelf -->
279               <!-- TMPL_IF NAME="itemsloop" -->
280                 <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
281                 <input type="hidden" name="modifyshelfcontents" value="1" />
282                 <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /><input type="submit" value="Remove Selected Items" class="icon delete" onclick="return confirmDelete(_('Are you sure you want to remove these items from the list?'))" />
283               <!-- TMPL_ELSE -->
284                 <form method="post" action="opac-shelves.pl">
285                   <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelfnumber" -->" value="1" />
286                   <input type="hidden" name="shelves" value="1" />
287                   <input type="submit" class="icon delete" value="Delete this List" onclick="return confirmDelete(_('Are you sure you want to delete this List?'))" />
288               <!-- /TMPL_IF -->
289                 </form>
290             <!-- /TMPL_IF -->
291
292             
293             <!-- TMPL_IF NAME="edit" -->
294                 <h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="<!-- TMPL_VAR NAME="themelang" -->/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->"><em><!-- TMPL_VAR NAME="shelfname" ESCAPE="html" --></em></a> <img src="<!-- TMPL_VAR NAME="themelang" -->/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Editing</h3>
295                 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
296                   <input type="hidden" name="op" value="modifsave" />
297                   <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
298                   <fieldset class="rows">
299                     <ol>
300                       <li><label for="shelfname">List Name: </label><input type="text" id="shelfname" name="shelfname" size="60" value="<!-- TMPL_VAR NAME="shelfname" ESCAPE="html" -->" /></li>
301                       <li>
302                         <label for="sortfield" >Sort this list by: </label>
303                         <select name="sortfield" id="sortfield">
304                           <!-- TMPL_IF NAME="sort_title" --><option value="title" selected="selected">Title</option><!-- TMPL_ELSE --><option value="title">Title</option><!-- /TMPL_IF -->
305                           <!-- TMPL_IF NAME="sort_author" --><option value="author" selected="selected">Author</option><!-- TMPL_ELSE --><option value="author">Author</option><!-- /TMPL_IF -->
306                           <!-- TMPL_IF NAME="sort_year" --><option value="year" selected="selected">Year</option><!-- TMPL_ELSE --><option value="year">Year</option><!-- /TMPL_IF -->
307                         </select>
308                       </li>
309                       <li>
310                         <label for="category">Category: </label>
311                         <select name="category" id="category">
312                           <option value="1">Private</option>
313                           <option value="2">Public</option>
314                         </select>
315                       </li>
316                     </ol>
317                   </fieldset>
318                   <fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=<!-- TMPL_VAR NAME="shelfnumber" -->">Cancel</a></fieldset>
319                 </form>
320             <!-- /TMPL_IF --><!-- /edit -->
321
322
323             <!-- TMPL_UNLESS NAME="edit" -->
324               <!-- TMPL_UNLESS NAME="viewshelf" -->
325                 <!-- TMPL_UNLESS NAME="shelves" -->
326                   <h2>Lists</h2>
327                   <ul class="link-tabs">
328                   <!-- TMPL_IF NAME="showprivateshelves" -->
329                     <li id="privateshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your Lists</a></li>
330                   <!-- TMPL_ELSE -->
331                     <li id="privateshelves_tab" class="off"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your Lists</a></li>
332                   <!-- /TMPL_IF -->
333                   <!-- TMPL_IF NAME="showpublicshelves" -->
334                     <li id="publicshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public Lists</a></li>
335                   <!-- TMPL_ELSE -->
336                     <li id="publicshelves_tab" class="off"><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public Lists</a></li>
337                   <!-- /TMPL_IF -->
338                   </ul>
339                   
340                   <!-- TMPL_IF NAME="showprivateshelves" -->
341                     <div id="privateshelves" class="tab-container" style="display:block;">
342                   <!-- TMPL_ELSE -->
343                     <div id="privateshelves" class="tab-container" style="display:none;">
344                   <!-- /TMPL_IF -->
345         
346                   <!-- TMPL_IF NAME="loggedinusername" -->
347                     <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New List</a>
348                   <!-- TMPL_IF NAME="showprivateshelves" -->
349                     <!-- TMPL_IF NAME="shelveslooppriv" -->
350                       <!-- TMPL_VAR name='pagination_bar'-->
351                       <table>
352                         <tr>
353                           <th>List Name</th>
354                           <th>Contents</th>
355                           <th>Sort by</th>
356                           <th>Type</th>
357                           <th>&nbsp;</th>
358                         </tr>
359                         <!-- TMPL_LOOP NAME="shelveslooppriv" -->
360                           <!-- TMPL_UNLESS NAME="__odd__" -->
361                             <tr class="highlight">
362                           <!--TMPL_ELSE-->
363                             <tr>
364                           <!-- /TMPL_UNLESS -->
365                               <td><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves&amp;viewshelf=<!-- TMPL_VAR NAME="shelf" -->&amp;sortfield=<!-- TMPL_VAR NAME="sortfield" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html"  --></a></td>
366                               <td><!-- TMPL_VAR NAME="count" --> item(s)</td>
367                               <td><!-- TMPL_VAR NAME="sortfield" --></td>
368                               <td>
369                                 <!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF -->
370                                 <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF -->
371                                 <!-- TMPL_IF NAME="viewcategory3" -->Open<!-- /TMPL_IF -->
372                               </td>
373                               <td>
374                               <span class="sendlist"><a href="#" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=<!-- TMPL_VAR NAME="shelf" -->','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>
375                             <!-- TMPL_IF NAME="mine" -->
376                                 <form action="/cgi-bin/koha/opac-shelves.pl" method="get">
377                                   <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelf" -->" />
378                                   <input type="hidden" name="display" value="privateshelves" />
379                                   <input type="hidden" name="op" value="modif" />
380                                   <input type="submit" class="editshelf" value="Edit" />
381                                 </form>
382                                 <form action="opac-shelves.pl" method="post">
383                                   <input type="hidden" name="shelves" value="1" />
384                                   <input type="hidden" name="display" value="privateshelves" />
385                                   <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" value="1" />
386                               <!-- TMPL_IF NAME="confirm" -->
387                                     <input type="hidden" name="CONFIRM-<!-- TMPL_VAR NAME="confirm" -->" value="1" />
388                                     <input type="submit" class="confirm" value="Confirm" />
389                               <!-- TMPL_ELSE -->
390                                     <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this List?'));" value="Delete" />
391                               <!-- /TMPL_IF -->
392                                 </form>
393                             <!-- /TMPL_IF -->&nbsp;
394                             </td>
395                           </tr>
396                         <!-- /TMPL_LOOP -->
397                       </table>
398                     <!-- TMPL_ELSE -->
399                          No Private Lists.
400                     <!-- /TMPL_IF --><!-- /shelveslooppriv -->
401                   <!-- /TMPL_IF --><! -- /showprivateshelves -->
402                   <!-- TMPL_ELSE --><!-- /loggedinusername -->
403                       <div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>
404                   <!-- /TMPL_IF --><!-- /loggedinusername -->
405
406                   
407                             </div><!-- /privateshelves -->
408
409                   <!-- TMPL_IF NAME="showpublicshelves" -->
410                     <div id="publicshelves" class="tab-container" style="display:block;">
411                   <!-- TMPL_ELSE -->
412                     <div id="publicshelves" class="tab-container" style="display:none;">
413                   <!-- /TMPL_IF -->
414                   <!-- TMPL_IF NAME="loggedinusername" -->
415                   <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New List</a>
416                   <!-- TMPL_ELSE -->
417                   <div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>
418                   <!-- /TMPL_IF -->
419                   <!-- TMPL_IF NAME="shelvesloop" -->
420                     <!-- TMPL_VAR name='pagination_bar'-->
421                       <table>
422                         <tr>
423                           <th>List Name</th>
424                           <th>Contents</th>
425                           <th>Sort by</th>
426                           <th>Type</th><th>&nbsp;</th>
427                         </tr>
428                     <!-- TMPL_LOOP NAME="shelvesloop" -->
429                       <!-- TMPL_UNLESS NAME="__odd__" -->
430                         <tr class="highlight">
431                       <!--TMPL_ELSE-->
432                         <tr>
433                       <!-- /TMPL_UNLESS -->
434                           <td><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->&amp;sortfield=<!-- TMPL_VAR NAME="sortfield" -->"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html"  --></a></td>
435                           <td><!-- TMPL_VAR NAME="count" --> item(s)</td>
436                           <td><!-- TMPL_VAR NAME="sortfield" --></td>
437                           <td>
438                             <!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF -->
439                             <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF -->
440                             <!-- TMPL_IF NAME="viewcategory3" -->Open<!-- /TMPL_IF -->
441                               </td>
442                           <td>
443                                                         <span class="sendlist"><a href="#" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=<!-- TMPL_VAR NAME="shelf" -->','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>
444                             <!-- TMPL_IF NAME="mine" -->
445                               <form action="/cgi-bin/koha/opac-shelves.pl" method="get">
446                                 <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelf" -->" />
447                                 <input type="hidden" name="op" value="modif" />
448                                 <input type="submit" class="editshelf" value="Edit" />
449                               </form>
450                               <form action="opac-shelves.pl" method="post">
451                                 <input type="hidden" name="shelves" value="1" />
452                                 <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" value="1" />
453                                 <!-- TMPL_IF NAME="confirm" -->
454                                   <input type="hidden" name="CONFIRM-<!-- TMPL_VAR NAME="confirm" -->" value="1" />
455                                   <input type="submit" class="confirm" value="Confirm" />
456                                 <!-- TMPL_ELSE -->
457                                   <input type="submit" class="deleteshelf" onclick="return confirmDelete(_('Are you sure you want to remove this List?'));" value="Delete" />
458                                 <!-- /TMPL_IF -->
459                               </form>
460                             <!-- /TMPL_IF -->&nbsp;
461                           </td>
462                         </tr>
463                     <!-- /TMPL_LOOP --><!-- /shelvesloop -->
464                       </table>
465                   <!-- TMPL_ELSE --><!-- /shelvesloop -->
466                     <!-- TMPL_IF NAME="showpublicshelves" -->No Public Lists.<!-- /TMPL_IF -->
467                   <!-- /TMPL_IF --><!-- /shelvesloop -->
468                   
469                     </div><!-- /publicshelves -->
470                     
471                 <!-- /TMPL_UNLESS --><!-- /shelves -->
472               <!-- /TMPL_UNLESS --><!-- /viewshelf -->
473             <!-- /TMPL_UNLESS --><!-- /edit -->
474
475             <!-- TMPL_IF NAME="shelves" -->
476               <div id="addshelf">
477                 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
478                   <fieldset class="rows">
479                     <legend>Create a New List</legend>
480                     <input type="hidden" name="shelves" value="1" />
481                     <ol>
482                       <li>
483                         <label for="addshelf">List Name:</label>
484                         <!-- TMPL_IF NAME="already" -->
485                           <input id="addshelf" type="text" name="addshelf" value="<!-- TMPL_VAR NAME="already" -->" size="60" />
486                         <!-- TMPL_ELSE -->
487                           <input id="addshelf" type="text" name="addshelf" size="60" />
488                         <!-- /TMPL_IF -->
489                         <input type="hidden" name="owner" id="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->" />
490                       </li>
491                       <li>
492                         <label for="sortfield" >Sort this list by: </label>
493                         <select name="sortfield" id="sortfield">
494                           <!-- TMPL_IF NAME="sort_title" --><option value="title" selected="selected">Title</option><!-- TMPL_ELSE --><option value="title">Title</option><!-- /TMPL_IF -->
495                           <!-- TMPL_IF NAME="sort_author" --><option value="author" selected="selected">Author</option><!-- TMPL_ELSE --><option value="author">Author</option><!-- /TMPL_IF -->
496                           <!-- TMPL_IF NAME="sort_year" --><option value="year" selected="selected">Year</option><!-- TMPL_ELSE --><option value="year">Year</option><!-- /TMPL_IF -->
497                         </select>
498                       </li>
499                       <li>
500                         <label for="category">Category:</label>
501                         <select name="category" id="category">
502                           <option value="1">Private</option>
503                           <option value="2">Public</option>
504                         </select>
505                       </li>
506                     </ol>
507                   </fieldset>
508                   <fieldset class="action">
509                     <input type="submit" value="Save" class="submit" />
510                     <a class="cancel" href="/cgi-bin/koha/opac-shelves.pl">Cancel</a>
511                   </fieldset>
512                 </form>
513               </div>
514             <!-- /TMPL_IF --><!-- /shelves -->
515
516             
517             </div>
518           </div>
519         </div>
520       </div>
521       <!-- TMPL_IF EXPR="OpacNav||loggedinusername" -->
522         <div class="yui-b">
523           <div class="container">
524             <!-- TMPL_INCLUDE NAME="navigation.inc" -->
525             <!-- TMPL_INCLUDE NAME="usermenu.inc" -->
526           </div>
527         </div>
528       <!-- /TMPL_IF -->
529     </div><!-- /bd -->
530
531 <!-- </div> -->
532 <!-- DEBUG -->
533     <div id="debug"></div>
534
535 <!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->