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