Merge remote-tracking branch 'kc/new/enh/bug_5922' into kcmaster
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-shelves.tt
1 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog ›   [% IF ( viewshelf ) %]Contents of [% shelfname |html %][% ELSE %]My Lists[% END %][% INCLUDE 'doc-head-close.inc' %]
2 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
3 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
4 <script type="text/javascript">
5 //<![CDATA[
6 var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
7 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
8 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
9
10 [% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
11 function holdSelections() {
12     var checkedBoxes = $(":checkbox:checked");
13     if ($(checkedBoxes).size() == 0) {
14         alert(MSG_NO_RECORD_SELECTED);
15     } else {
16         var bibs = "";
17         $(checkedBoxes).each(function(){
18             var name = $(this).attr("name");
19             bib = name.substr(4);
20             bibs += bib + "/";
21         });
22         document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
23     }
24 }
25 [% END %][% END %]
26 [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]function tagSelected() {
27     var checkedBoxes = $("input:checkbox:checked");
28     if ($(checkedBoxes).size()) {
29         $("#tagsel_tag").hide();
30         $(".tag_hides").hide();
31         $("#tagsel_form").show();
32     } else {
33         alert(MSG_NO_RECORD_SELECTED);
34     }
35 }
36
37 function tagCanceled() {
38     $("#tagsel_form").hide();
39     $("#tagsel_tag").show();
40     $(".tag_hides").show();
41 }
42
43 function tagAdded() {
44     var checkedBoxes = $("input:checkbox:checked");
45     if (!$(checkedBoxes).size()) {
46         alert(MSG_NO_RECORD_SELECTED);
47         return false;
48     }
49
50     var tag = $("#tagsel_new").val();
51     if (!tag || (tag == "")) {
52         alert(MSG_NO_TAG_SPECIFIED);
53         return false;
54     }
55
56     var bibs = [];
57     for (var i = 0; i < $(checkedBoxes).size(); i++) {
58         var box = $(checkedBoxes).get(i);
59         bibs[i] = $(box).val();
60     }
61
62     KOHA.Tags.add_multitags_button(bibs, tag);
63     return false;
64 }[% END %][% END %][% END %]
65
66 $(function() {
67     [% IF ( opacbookbag ) %]$(".addtocart").show();[% END %]
68     $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear All')+"<\/a>|");
69     $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select All')+"<\/a>");
70   $("a.print").show();
71
72     [% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides\">"+_('Place Hold')+"<\/a>");
73       $("a.hold").click(function(){
74          holdSelections();
75          return false;
76       });[% END %][% END %]
77
78     $("#CheckAll").click(function(){
79         $(".checkboxed").checkCheckboxes();
80         return false;
81     });
82     $("#CheckNone").click(function(){
83         $(".checkboxed").unCheckCheckboxes();
84         return false;
85     });
86
87     [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
88           $("#addtags").click(function(){
89             tagSelected();
90             return false;
91           });
92           $("#addtags").html("<a id=\"tagsel_tag\" href=\"#\">"+_("Tag")+"<\/a> |");
93
94         $(".tagbutton").click(KOHA.Tags.add_tag_button);
95       [% IF ( TagsInputOnList ) %]
96       [% IF ( loggedinusername ) %]
97             $("#tagsel_tag").click(function(){
98                 tagSelected();
99                 return false;
100             });
101             $("#tagsel_cancel").click(function(){
102                 tagCanceled();
103                 return false;
104             });
105             $("#tagsel_button").click(function(){
106                 tagAdded();
107                 return false;
108             });
109         [% ELSE %]
110             $("#tagsel_tag").click(function(){
111                 window.location = "/cgi-bin/koha/opac-user.pl";
112                 return false;
113             });
114         [% END %]
115         [% END %]
116         [% END %][% END %][% END %]
117   [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
118 });
119       function Check(f) {
120                 var _alertString="";
121                 var alertString2;
122
123             if(f.addshelf.value.length ==0){
124                         _alertString += _("- You must enter a List Name") + "\n";
125                 }
126
127                 if (_alertString.length==0) {
128                         f.submit();
129                 } else {
130                         alertString2 = _("Form not submitted because of the following problem(s)");
131                         alertString2 += "\n------------------------------------------------------------------------------------\n\n";
132                         alertString2 += _alertString;
133                         alert(alertString2);
134                 }
135         }
136 //]]>
137 </script>
138 </head>
139 [% IF ( loggedinusername ) %]<body id="opac-userlists">[% ELSE %]<body id="opac-lists">[% END %]
140 [% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSIF ( loggedinusername ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
141     <div id="bd">
142       [% INCLUDE 'masthead.inc' %]
143       <div id="yui-main">
144         <div class="yui-b">
145           <div id="usershelves" class="container">
146           
147             [% IF ( paramsloop ) %]
148               [% FOREACH paramsloo IN paramsloop %]
149                 <div class="yui-ge">
150                   <div class="yui-u first">
151                     [% IF ( paramsloo.already ) %]<div class="dialog alert">A List named <b>[% paramsloo.already %]</b> already exists!</div>[% END %]
152                     [% IF ( paramsloo.status ) %]<div class="dialog alert">[% paramsloo.string %]</div>[% END %]
153                     [% IF ( paramsloo.nobarcode ) %]<div class="dialog alert">ERROR: No barcode given.</div>[% END %]
154                     [% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No shelfnumber given.</div>[% END %]
155                     [% IF ( paramsloo.need_confirm ) %]
156                       <div class="dialog alert">
157                         The list <i>[% paramsloo.need_confirm %]</i> is not empty.
158                         <br />It has <b>[% paramsloo.count %]</b> [% IF ( paramsloo.single ) %]entry[% ELSE %]entries[% END %].
159                         <br />Use the "Confirm" button below to confirm deletion.
160                      </div>
161                     [% END %]
162                     [% IF ( paramsloo.nopermission ) %]
163                       <div class="dialog alert">ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission %].</div>
164                     [% END %]
165                     [% IF ( paramsloo.failgetitem ) %]
166                       <div class="dialog alert">ERROR: No item found with barcode [% paramsloo.failgetitem %].</div>
167                     [% END %]
168                     [% IF ( paramsloo.duplicatebiblio ) %]
169                       <div class="dialog alert">A record matching barcode <b>[% paramsloo.duplicatebiblio %]</b> has already been added.</div>
170                     [% END %]
171                     [% IF ( paramsloo.delete_ok ) %]
172                       <div class="dialog message">List [% paramsloo.delete_ok %] Deleted.</div>
173                     [% END %]
174                     [% IF ( paramsloo.delete_fail ) %]
175                       <div class="dialog message">ERROR: Database error. Delete (list number [% paramsloo.delete_fail %]) failed.</div>
176                     [% END %]
177                     [% IF ( paramsloo.unrecognized ) %]
178                       <div class="dialog message">ERROR: List number [% paramsloo.unrecognized %] unrecognized.</div>
179                     [% END %]
180                   </div>
181                 </div>
182               [% END %]<!-- /paramsloop -->
183             [% END %] <!-- /paramsloop -->
184
185             <div class="yui-g">
186
187             [% IF ( viewshelf ) %]<!--  Viewing a particular shelf -->
188               <h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> <em>[% shelfname |html %]</em></h3>
189               [% IF ( itemsloop ) %]
190                   <div id="toolbar" class="list-actions"> <span class="checkall"></span>
191                     <span class="clearall"></span>
192
193 [% IF ( RequestOnOpac ) %]
194                       <span id="placehold"></span>[% UNLESS ( TagsEnabled ) %] |[% END %]
195 [% END %]
196 [% IF ( loggedinusername ) %]
197     [% IF ( TagsEnabled ) %]
198                     <span id="addtags"></span>
199                     <span id="tagsel_form" style="display:none">
200                       <label for="tagsel_new" style="display:inline">New&nbsp;Tag:</label>
201                       <input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/>
202                       <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button"
203                              type="submit" value="Add" style="display:inline" />
204                       <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
205                   </span>
206     [% END %][% END %]
207
208                       <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfid=[% shelfnumber %]" class="download tag_hides" onclick="open(CGIBIN+'opac-downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false;">Download List</a>
209
210 <span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber %]" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>
211
212 <a class="print tag_hides" href="opac-shelves.pl" onclick="print(); return false;">Print List</a>
213
214                 [% IF ( manageshelf ) %] | <form method="get" action="opac-shelves.pl" class="tag_hides"><input type="hidden" name="op" value="modif" />[% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %] <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> <input type="submit" class="editshelf tag_hides" value="Edit List" /></form>
215                       <form method="post" action="opac-shelves.pl" class="tag_hides">
216                         <input type="hidden" value="1" name="shelves"/>
217                     [% IF ( showprivateshelves ) %]
218                          <input type="hidden" name="display" value="privateshelves" />
219                     [% END %]
220                          <input type="hidden" value="1" name="DEL-[% shelfnumber %]"/>
221                          <input type="submit" class="deleteshelf" value="Delete List" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
222                       </form> [% END %]
223
224
225                   </div>
226
227                   <form action="/cgi-bin/koha/opac-shelves.pl" method="post" name="myform" class="checkboxed">
228                 [% IF ( manageshelf ) %]
229                     <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
230                     <input type="hidden" name="modifyshelfcontents" value="1" />
231                 [% END %]
232                 <div class="searchresults">
233                 <table id="listcontents">
234                   <tbody>
235                   [% FOREACH itemsloo IN itemsloop %]
236                     [% UNLESS ( loop.odd ) %]
237                       <tr class="highlight">
238                     [% ELSE %]
239                       <tr>
240                     [% END %]
241                         <td><input type="checkbox" name="REM-[% itemsloo.biblionumber %]"
242                                    value="[% itemsloo.biblionumber %]" /></td>
243                     [% UNLESS ( item_level_itypes ) %]
244                         <td>
245                           [% UNLESS ( noItemTypeImages ) %]
246                           <img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />
247                           [% END %]
248                           [% itemsloo.description %]
249                         </td>
250                     [% END %]
251                         <td>
252                         [% IF ( itemsloo.XSLTBloc ) %]
253                          [% itemsloo.XSLTBloc %]
254                         [% ELSE %]
255
256                                 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
257                                 [% ELSE %]
258                                 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
259                                 [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
260                                 [% END %]
261                                 [% END %]
262                 [% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield %][% END %]</a>
263                                 [% IF ( itemsloo.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author %]</a>
264                                 [% ELSE %]&nbsp;
265                                 [% END %]
266         <span class="results_summary"><span class="label">Publication:</span>
267                         [% IF ( itemsloo.place ) %][% itemsloo.place %] [% END %][% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %][% IF ( itemsloo.publicationyear ) %] [% itemsloo.publicationyear %]
268                     [% ELSE %][% IF ( itemsloo.copyrightdate ) %] [% itemsloo.copyrightdate %][% END %][% END %]
269                         [% IF ( itemsloo.pages ) %]. [% itemsloo.pages %][% END %]
270                         [% IF ( itemsloo.notes ) %], [% itemsloo.notes %][% END %]
271                         [% IF ( itemsloo.size ) %] [% itemsloo.size %][% END %]
272                 </span>
273                 <span class="results_summary"><span class="label">Holdings:</span>[% IF ( itemsloo.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
274           [% ITEM_RESULT.homebranch %][% IF ( ITEM_RESULT.location_opac ) %], [% ITEM_RESULT.location_opac %][% END %]
275           [% IF ( ITEM_RESULT.itemcallnumber ) %]
276         ([% ITEM_RESULT.itemcallnumber %])[% IF ( loop.last ) %].[% ELSE %],[% END %]
277           [% END %]
278           [% END %][% ELSE %]This record has no items.[% END %]</span>
279             [% END %]
280         [% IF ( TagsEnabled ) %]
281                 [% IF ( TagsShowOnList ) %]
282                 [% IF ( itemsloo.TagLoop ) %]
283           <div class="results_summary">
284                         <span class="label">Tags:</span>
285                         <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN itemsloo.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&amp;q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
286                             [% END %]
287                         </ul>
288                 [% END %]
289                 [% IF ( TagsInputOnList ) %]
290           [% IF ( loggedinusername ) %]
291                     <form name="tagform[% itemsloo.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl">
292                         <label for="newtag[% itemsloo.biblionumber %]">New tag:</label>
293                         <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
294                         <input name="tagbutton" class="tagbutton" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
295                     </form>
296                     <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
297                         Tag status here.
298                     </span>
299                     [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span>
300                   [% END %]
301                 [% END %]
302                   [% IF ( itemsloo.TagLoop ) %]
303           </div>[% END %]
304         [% END %]
305                 [% END %]
306
307 <span class="results_summary actions"><span class="label">Actions:</span>
308       [% IF ( RequestOnOpac ) %]
309           [% UNLESS ( itemsloo.norequests ) %]
310             [% IF ( opacuserlogin ) %]
311               [% IF ( AllowOnShelfHolds ) %]
312                 <a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
313               [% ELSE %]
314                 [% IF ( itemsloo.itemsissued ) %]
315                   <a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
316                 [% END %]
317               [% END %]
318             [% END %]
319           [% END %]
320         [% END %]
321
322         [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( virtualshelves ) %]<a class="addtolist" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a>
323           [% END %][% END %][% END %]
324
325             [% IF ( opacbookbag ) %]<a class="addtocart" href="#" onclick="addRecord('[% itemsloo.biblionumber %]'); return false;">Add to Cart</a>[% ELSE %]nocart[% END %]
326         </span>
327
328
329
330                     <!-- COinS / Openurl -->
331                           <!-- COinS / Openurl --><span class="Z3988" title="[% itemsloo.coins %]"></span>
332                           [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<br/>
333                           <div id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</div>[% END %][% END %][% END %]
334                         </td>
335           <td>
336           <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber %]">
337                     [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( itemsloo.normalized_isbn ) %]<img src="http://images.amazon.com/images/P/[% itemsloo.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %][% END %]
338
339           [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %]
340                 <img src="https://secure.syndetics.com/index.aspx?isbn=[% itemsloo.normalized_isbn %]/SC.GIF&amp;client=[% itemsloo.SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% itemsloo.normalized_upc %]&amp;oclc=[% itemsloo.normalized_oclc %]" alt="" class="thumbnail" />
341                 [% ELSE %]
342                 <img src="http://www.syndetics.com/index.aspx?isbn=[% itemsloo.normalized_isbn %]/SC.GIF&amp;client=[% itemsloo.SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% itemsloo.normalized_upc %]&amp;oclc=[% itemsloo.normalized_oclc %]" alt="" class="thumbnail" />[% END %][% END %][% END %]
343
344                 [% IF ( GoogleJackets ) %][% IF ( itemsloo.normalized_isbn ) %]<div style="block" title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
345                 </a>
346                 [% IF ( BakerTaylorEnabled ) %][% IF ( itemsloo.normalized_isbn ) %]<a href="https://[% BakerTaylorBookstoreURL |html %][% itemsloo.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% itemsloo.normalized_isbn %]" /></a>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
347         </td>
348                       </tr>
349                   [% END %]<!-- /itemsloop -->
350                     </tbody>
351                   </table>
352                   </div>
353                   [% IF ( pagination_bar ) %]<div class="pages">[% pagination_bar %]</div>[% END %]
354                 [% ELSE %]
355                   <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>
356               [% END %]<!-- /itemsloop -->
357             [% END %]<!-- /viewshelf -->
358
359
360             [% IF ( manageshelf ) %]
361               <!-- Editing shelf -->
362               [% IF ( itemsloop ) %]
363                 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
364                 <input type="hidden" name="modifyshelfcontents" value="1" />
365                 <input type="hidden" name="viewshelf" value="[% shelfnumber %]" /><input type="submit" value="Remove Selected Items" class="icon delete" onclick="return confirmDelete(MSG_REMOVE_FROM_LIST)" />
366               [% ELSE %]
367                 <form method="post" action="opac-shelves.pl">
368                   <input type="hidden" name="DEL-[% shelfnumber %]" value="1" />
369                   <input type="hidden" name="shelves" value="1" />
370                   <input type="submit" class="icon delete" value="Delete this List" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
371               [% END %]
372             [% END %]
373                 </form>
374
375             
376             [% IF ( edit ) %]
377                 <h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelfnumber %]"><em>[% shelfname |html %]</em></a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Editing</h3>
378                 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
379                   <input type="hidden" name="op" value="modifsave" />
380                    [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
381                   <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
382                   <fieldset class="rows">
383                     <ol>
384                       <li><label for="shelfname">List Name: </label><input type="text" id="shelfname" name="shelfname" size="60" value="[% shelfname |html %]" /></li>
385                       <li>
386                         <label for="sortfield" >Sort this list by: </label>
387                         <select name="sortfield" id="sortfield">
388                           [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
389                           [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
390                           [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
391                         </select>
392                       </li>
393                       <li>
394                         <label for="category">Category:</label>
395                         <select name="category" id="category">
396                           [% IF ( category1 ) %]<option value="1" selected="selected">Private</option>[% ELSE %]<option value="1">Private</option>[% END %]
397                           [% IF ( category2 ) %]<option value="2" selected="selected">Public</option>[% ELSE %]<option value="2">Public</option>[% END %]
398                         </select>
399                       </li>
400                     </ol>
401                   </fieldset>
402                   <fieldset class="action"><input type="submit" value="Save" class="submit" /> [% IF ( showprivateshelves ) %]<a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=[% shelfnumber %]&amp;display=privateshelves">Cancel</a>[% ELSE %]<a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=[% shelfnumber %]">Cancel</a>[% END %]</fieldset>
403                 </form>
404             [% END %]<!-- /edit -->
405
406
407             [% UNLESS ( edit ) %]
408               [% UNLESS ( viewshelf ) %]
409                 [% UNLESS ( shelves ) %]
410                   <h2>Lists</h2>
411                   <ul class="link-tabs">
412                   [% IF ( showprivateshelves ) %]
413                     <li id="privateshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li>
414                   [% ELSE %]
415                     <li id="privateshelves_tab" class="off"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li>
416                   [% END %]
417                   [% IF ( showpublicshelves ) %]
418                     <li id="publicshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public lists</a></li>
419                   [% ELSE %]
420                     <li id="publicshelves_tab" class="off"><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public lists</a></li>
421                   [% END %]
422                   </ul>
423                   
424                   [% IF ( showprivateshelves ) %]
425                     <div id="privateshelves" class="tab-container" style="display:block;">
426                   [% ELSE %]
427                     <div id="privateshelves" class="tab-container" style="display:none;">
428                   [% END %]
429         
430                   [% IF ( loggedinusername ) %]
431                     <div id="toolbar"><a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New List</a></div>
432                   [% IF ( showprivateshelves ) %]
433                     [% IF ( shelveslooppriv ) %]
434                       <table>
435                         <tr>
436                           <th>List Name</th>
437                           <th>Contents</th>
438                           <th>Type</th>
439                           <th>&nbsp;</th>
440                         </tr>
441                         [% FOREACH shelveslooppri IN shelveslooppriv %]
442                           [% UNLESS ( loop.odd ) %]
443                             <tr class="highlight">
444                           [% ELSE %]
445                             <tr>
446                           [% END %]
447                               <td><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves&amp;viewshelf=[% shelveslooppri.shelf %]&amp;sortfield=[% shelveslooppri.sortfield %]">[% shelveslooppri.shelfname |html %]</a></td>
448                               <td>[% IF ( shelveslooppri.count ) %][% shelveslooppri.count %] [% IF ( shelveslooppri.single ) %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
449                               <td>
450                                 [% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
451                                 [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
452                                 [% IF ( shelveslooppri.viewcategory3 ) %]Open[% END %]
453                               </td>
454                               <td>
455                               [% IF ( shelveslooppri.mine ) %]
456                                 <form action="/cgi-bin/koha/opac-shelves.pl" method="get">
457                                   <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
458                                   <input type="hidden" name="display" value="privateshelves" />
459                                   <input type="hidden" name="op" value="modif" />
460                                   <input type="submit" class="editshelf" value="Edit" />
461                                 </form>
462                                 <form action="opac-shelves.pl" method="post">
463                                   <input type="hidden" name="shelves" value="1" />
464                                   <input type="hidden" name="display" value="privateshelves" />
465                                   <input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
466                               [% IF ( shelveslooppri.confirm ) %]
467                                     <input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
468                                     <input type="submit" class="confirm" value="Confirm" />
469                               [% ELSE %]
470                                     <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
471                               [% END %]
472                                 </form>
473                             [% END %]&nbsp;
474                             </td>
475                           </tr>
476                         [% END %]
477                       </table>
478                       <div class="pages">[% pagination_bar %]</div>
479                     [% ELSE %]
480                          <p>No private lists.</p>
481                     [% END %]<!-- /shelveslooppriv -->
482                   [% END %]<!-- /showprivateshelves -->
483                   [% ELSE %]<!-- /loggedinusername -->
484                       <div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>
485                   [% END %]<!-- /loggedinusername -->
486
487                   
488                             </div><!-- /privateshelves -->
489
490                   [% IF ( showpublicshelves ) %]
491                     <div id="publicshelves" class="tab-container" style="display:block;">
492                   [% ELSE %]
493                     <div id="publicshelves" class="tab-container" style="display:none;">
494                   [% END %]
495                   [% IF ( loggedinusername ) %]
496                  <div id="toolbar"> <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New List</a></div>
497                   [% ELSE %]
498                   <div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>
499                   [% END %]
500                   [% IF ( shelvesloop ) %]
501                       <table>
502                         <tr>
503                           <th>List Name</th>
504                           <th>Contents</th>
505                           <th>Type</th><th>&nbsp;</th>
506                         </tr>
507                     [% FOREACH shelvesloo IN shelvesloop %]
508                       [% UNLESS ( loop.odd ) %]
509                         <tr class="highlight">
510                       [% ELSE %]
511                         <tr>
512                       [% END %]
513                           <td><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelvesloo.shelf %]&amp;sortfield=[% shelvesloo.sortfield %]">[% shelvesloo.shelfname |html %]</a></td>
514                           <td>[% shelvesloo.count %] [% IF ( shelvesloo.single ) %]item[% ELSE %]item(s)[% END %]</td>
515                           <td>
516                             [% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
517                             [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
518                             [% IF ( shelvesloo.viewcategory3 ) %]Open[% END %]
519                               </td>
520                           <td>
521                                                         [% IF ( shelvesloo.mine ) %]
522                               <form action="/cgi-bin/koha/opac-shelves.pl" method="get">
523                                 <input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
524                                 <input type="hidden" name="op" value="modif" />
525                                 <input type="submit" class="editshelf" value="Edit" />
526                               </form>
527                               <form action="opac-shelves.pl" method="post">
528                                 <input type="hidden" name="shelves" value="1" />
529                                 <input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
530                                 [% IF ( shelvesloo.confirm ) %]
531                                   <input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
532                                   <input type="submit" class="confirm" value="Confirm" />
533                                 [% ELSE %]
534                                   <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
535                                 [% END %]
536                               </form>
537                             [% END %]&nbsp;
538                           </td>
539                         </tr>
540                     [% END %]<!-- /shelvesloop -->
541                       </table>
542                   [% IF ( pagination_bar ) %]<div class="pages">[% pagination_bar %]</div>[% END %]
543                   [% ELSE %]<!-- /shelvesloop -->
544                     [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
545                   [% END %]<!-- /shelvesloop -->
546                   
547                     </div><!-- /publicshelves -->
548                     
549                 [% END %]<!-- /shelves -->
550               [% END %]<!-- /viewshelf -->
551             [% END %]<!-- /edit -->
552
553             [% IF ( shelves ) %]
554               <div id="addshelf">
555                 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
556                   <fieldset class="rows">
557                     <legend>Create a New List</legend>
558                     <input type="hidden" name="shelves" value="1" />
559                     <ol>
560                       <li>
561                         <label class="required" for="addshelf">List Name:</label>
562                         [% IF ( already ) %]
563                           <input id="addshelf" type="text" name="addshelf" value="[% already %]" size="60" />
564                         [% ELSE %]
565                           <input id="addshelf" type="text" name="addshelf" size="60" />
566                         [% END %]
567                         <input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />
568                       </li>
569                       <li>
570                         <label for="sortfield" >Sort this list by: </label>
571                         <select name="sortfield" id="sortfield">
572                           [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
573                           [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
574                           [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
575                         </select>
576                       </li>
577                       <li>
578                         <label for="category">Category:</label>
579                         <select name="category" id="category">
580                           <option value="1">Private</option>
581                           <option value="2">Public</option>
582                         </select>
583                       </li>
584                     </ol>
585                   </fieldset>
586                   <fieldset class="action">
587                     <input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
588                     <a class="cancel" href="/cgi-bin/koha/opac-shelves.pl">Cancel</a>
589                   </fieldset>
590                 </form>
591               </div>
592             [% END %]<!-- /shelves -->
593
594             
595             </div>
596           </div>
597         </div>
598       </div>
599       [% IF ( OpacNav||loggedinusername ) %]
600         <div class="yui-b">
601           <div is="leftmenus" class="container">
602             [% INCLUDE 'navigation.inc' %]
603             [% INCLUDE 'usermenu.inc' %]
604           </div>
605         </div>
606       [% END %]
607     </div><!-- /bd -->
608
609 <!-- </div> -->
610 <!-- DEBUG -->
611     <div id="debug"></div>
612
613 [% INCLUDE 'opac-bottom.inc' %]