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