6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › [% IF op == 'view' %]Lists › Contents of [% shelf.shelfname | html %][% ELSE %]Lists[% END %][% IF op == 'add_form' %] › Create new list[% END %][% IF op == 'edit_form' %] › Edit list [% shelf.shelfname | html %][% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
10 <style type="text/css">textarea { width: 100%; }</style>
12 [% BLOCK list_permissions %]
14 <label for="allow_changes_from">Allow changes to contents from: </label>
15 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
17 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
19 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
20 <option value="1" selected="selected">Owner only</option>
22 <option value="1">Owner only</option>
25 [% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %]
28   <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
33 <body id="lists_shelves" class="lists">
34 [% INCLUDE 'header.inc' %]
35 [% INCLUDE 'cat-search.inc' %]
37 <div id="breadcrumbs">
38 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
40 <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
44 [% IF shelf AND shelf.is_private %] ›
45 [% IF op == 'view' OR op == 'edit_form' %]
46 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE %]">Your lists</a>
50 [% ELSIF shelf AND shelf.is_public %] ›
52 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC %]">Public lists</a>
58 [% IF op == 'view' %]› Contents of <i>[% shelf.shelfname | html %]</i>[% END %][% IF op == 'add_form' %] › Create new list[% END %][% IF op == 'edit_form' %] › Edit list <i>[% shelf.shelfname | html %]</i>[% END %]</div>
60 <div id="doc3" class="yui-t2">
65 <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
68 [% FOR m IN messages %]
69 <div class="dialog [% m.type %]">
71 [% CASE 'error_on_update' %]
72 <span>An error occurred when updating this list.</span>
73 [% CASE 'error_on_insert' %]
74 <span>An error occurred when creating this list.</span>
75 [% CASE 'error_on_delete' %]
76 <span>An error occurred when deleting this list.</span>
77 [% CASE 'error_on_add_biblio' %]
78 [% IF m.item_barcode %]
79 <span>The item ([% m.item_barcode %]) has not been added to the list. Please verify it is not already in the list.</span>
81 <span>The record ([% m.bibnum %]) has not been added to the list. Please verify it is not already in the list.</span>
83 [% CASE 'success_on_update' %]
84 <span>List updated.</span>
85 [% CASE 'success_on_insert' %]
86 <span>List created.</span>
87 [% CASE 'success_on_delete' %]
88 <span>List deleted.</span>
89 [% CASE 'success_on_add_biblio' %]
90 [% IF m.item_barcode %]
91 <span>The item ([% m.item_barcode %]) has been added to the list.</span>
93 <span>The record ([% m.bibnum %]) has been added to the list.</span>
95 [% CASE 'success_on_remove_biblios' %]
96 <span>The item has been removed from the list.</span>
97 [% CASE 'does_not_exist' %]
98 <span>This list does not exist.</span>
99 [% CASE 'item_does_not_exist' %]
100 [% IF m.item_barcode %]
101 <span>The item ([% m.item_barcode %]) does not exist.</span>
103 <span>The record ([% m.bibnum %]) does not exist.</span>
105 [% CASE 'unauthorized_on_view' %]
106 <span>You do not have permission to view this list.</span>
107 [% CASE 'unauthorized_on_update' %]
108 <span>You do not have permission to update this list.</span>
109 [% CASE 'unauthorized_on_delete' %]
110 <span>You do not have permission to delete this list.</span>
111 [% CASE 'unauthorized_on_add_biblio' %]
112 <span>You do not have permission to add a record to this list.</span>
113 [% CASE 'no_biblio_removed' %]
114 <span>No record was removed.</span>
115 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
116 <span>An error occurred when creating this list. The name [% shelfname %] already exists.</span>
117 [% CASE 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' %]
118 <span>List could not be created. (Do not use the database administrator account.)</span>
119 [% CASE 'DBIx::Class::Exception' %]
122 [% m.code %] [% m.msg %]
127 [% IF op == 'view' %]
131 <h3>Contents of <i>[% shelf.shelfname | html %]</i></h3>
132 <div class="pages">[% pagination_bar %]</div>
133 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed">
134 <input type="hidden" name="op" value="remove_biblios" />
135 <input type="hidden" name="referer" value="view" />
136 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
138 [% IF direction == 'asc' %]
139 [% SET new_direction = 'desc' %]
141 [% SET direction = 'desc' %]
142 [% SET new_direction = 'asc' %]
145 <div id="searchheader" class="noprint">
147 <div id="selection_ops"><span class="checkall"></span> |
148 <span class="clearall"></span>
150 <span class="addto">| </span>
152 [% IF CAN_user_reserveforothers && Koha.Preference('DisplayMultiPlaceHold') %]
153 <div class="btn-group"><button class="btn btn-default btn-xs placehold"><i class="fa fa-sticky-note-o"></i> Place hold</button></div>
155 [% IF can_remove_biblios %]
156 <div class="btn-group"><button type="submit" class="btn btn-default btn-xs list-remove"><i class="fa fa-trash"></i> Remove selected</button></div>
158 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<div class="btn-group"><button type="submit" class="btn btn-default btn-xs merge-items"><i class="fa fa-compress"></i> Merge selected</button></div>[% END %]
163 <table id="searchresults">
165 [% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %]
167 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
169 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]&sortfield=title&direction=[% IF sortfield != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a>
170 [% IF sortfield == 'title' %]
171 <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
173 <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
177 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]&sortfield=author&direction=[% IF sortfield != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a>
178 [% IF sortfield == 'author' %]
179 <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
181 <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
186 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]&sortfield=itemcallnumber&direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a>
187 [% IF sortfield == 'itemcallnumber' %]
188 <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
190 <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
194 [% FOREACH itemsloo IN itemsloop %]
198 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="biblionumber" />
201 [% UNLESS ( item_level_itypes ) %]<td>
202 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
205 [% IF ( itemsloo.XSLTBloc ) %]
206 [% itemsloo.XSLTBloc %]
208 [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
209 [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
212 [% IF ( itemsloo.notforloan ) %]
213 <span class="noholdstext">No holds allowed</span>
215 [% IF ( itemsloo.ITEM_RESULTS.size ) %]
216 <a id="reserve_[% itemsloo.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
217 [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]&findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
219 <span class="noholdstext">No holds allowed</span>
222 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
223 | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber %]">Edit record</a>
225 [% IF ( CAN_user_editcatalogue_edit_items ) %]
226 | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber %]">Edit items</a>
230 <td>[% itemsloo.author %]</td>
231 <td>[% itemsloo.dateadded | $KohaDates%]</td>
234 [% FOREACH result IN itemsloo.ITEM_RESULTS %]
235 <li>[% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %]
236 [% IF ( result.itemcallnumber ) %]
237 [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% result.itemcallnumber |uri %]%22">[% result.itemcallnumber %]</a>]
244 [% END %]<!-- /itemsloop -->
246 <div class="pages">[% pagination_bar %]</div>
253 [% IF op == 'add_form' OR op == 'edit_form' %]
255 <div class="yui-u first">
256 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated">
257 <fieldset class="rows">
259 [% IF op == 'add_form' %]
260 <legend>Create a new list</legend>
261 <input type="hidden" name="op" value="add" />
263 <legend>Edit list <i>[% shelf.shelfname | html %]</i></legend>
264 <input type="hidden" name="op" value="edit" />
266 <input type="hidden" name="referer" value="[% referer | html %]" />
267 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
270 <label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname |html %]" required="required" class="required" />
271 <span class="required">Required</span>
274 <span class="label">Owner: </span>
275 [% IF op == 'add_form' %]
276 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" />[% loggedinusername %]</li>
279 <input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber %]" />[% owner.firstname _ ' ' _ owner.surname %]
281 <input type="hidden" id="owner" name="owner" value="[% loggedinusernumber %]" />[% loggedinusername %]
285 <li><label for="sortfield" >Sort this list by: </label>
286 <select name="sortfield">
287 [% IF shelf.sortfield == "title" %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
288 [% IF shelf.sortfield == "author" %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
289 [% IF shelf.sortfield == "copyrightdate" %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
290 [% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
292 <li><label for="category">Category: </label>
293 <select id="category" name="category" onchange="AdjustRemark()">
294 [% IF shelf.is_private %]
295 <option value="1" selected="selected">Private</option>
297 <option value="1">Private</option>
299 [% IF shelf.is_public %]
300 <option value="2" selected="selected">Public</option>
302 <option value="2">Public</option>
306 [% INCLUDE list_permissions %]
311 <fieldset class="action">
312 <input type="submit" value="Save" class="submit" />
313 [% IF referer == 'view' %]
314 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a>
316 [% IF category == PUBLIC %]
317 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC %]" class="cancel">Cancel</a>
319 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE %]" class="cancel">Cancel</a>
328 [% IF op == 'list' %]
330 <div id="tabs" class="toptabs">
332 <li id="privateshelves_tab" class="active"><a href="#tab_content">Your lists</a></li>
333 <li id="publicshelves_tab" class="active"><a href="#tab_content">Public lists</a></li>
336 <div id="tab_content">
337 <table id="listresultst">
340 <th class="NoVisible">Type</th>
346 <th>Creation date</th>
347 <th>Modification date</th>
350 <tr class="filters_row">
352 <th><input class="filter text_filter" id="searchshelfname_filter" placeholder="List name"></th>
355 <th><input class="filter text_filter" id="searchowner_filter" placeholder="Owner"></th>
357 <select class="filter text_filter" id="searchsortby_filter">
358 <option value=""></option>
359 <option value="title">Title</option>
360 <option value="author">Author</option>
361 <option value="copyrightdate">Copyrightdate</option>
362 <option value="itemcallnumber">Call number</option>
376 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
377 <!-- Value will be set here by placeHold() -->
378 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
379 <input type="hidden" name="multi_hold" value="1"/>
385 [% IF ( can_add_biblios ) %]
387 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
388 <fieldset class="brief noprint">
392 <label for="barcodes">Barcodes:</label>
393 <textarea name="barcodes" id="barcodes" class="focus" autocomplete="off" rows="5"></textarea>
394 <input type="hidden" name="op" value="add_biblio" />
395 <input type="hidden" name="referer" value="view" />
396 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
399 <label for="biblionumbers">Biblio numbers:</label>
400 <textarea name="biblionumbers" id="biblionumbers" class="focus" autocomplete="off" rows="5"></textarea>
401 <input type="hidden" name="op" value="add_biblio" />
402 <input type="hidden" name="referer" value="view" />
403 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
406 <fieldset class="action">
407 <input type="submit" value="Add" />
416 [% MACRO jsinclude BLOCK %]
417 [% INCLUDE 'datatables.inc' %]
418 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
420 <script type="text/javascript">
421 $( document ).ready(function() {
423 setTimeout('window.close()', 1);
428 [% IF op == 'view' %]
429 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
430 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
432 <script type="text/javascript">
433 var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
434 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
435 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
437 [% IF op == 'list' %]
438 $(document).ready(function(){
439 [% IF category == PUBLIC %]
440 var type = [% PUBLIC %];
442 var type = [% PRIVATE %];
444 var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
446 "aaSorting": [[ 5, "asc" ]],
448 'sAjaxSource': "/cgi-bin/koha/svc/virtualshelves/search",
449 'fnServerData': function(sSource, aoData, fnCallback) {
455 'value': $("#searchshelfname_filter").val(),
458 'value': $("#searchowner_filter").val(),
461 'value': $("#searchsortby_filter").val(),
463 'name': 'template_path',
464 'value': 'virtualshelves/tables/shelves_results.tt',
471 'success': function(json){
477 { 'mDataProp': 'dt_type' },
478 { 'mDataProp': 'dt_shelfname' },
479 { 'mDataProp': 'dt_count' },
480 { 'mDataProp': 'dt_is_shared' },
481 { 'mDataProp': 'dt_owner' },
482 { 'mDataProp': 'dt_sortby' },
483 { 'mDataProp': 'dt_created_on' },
484 { 'mDataProp': 'dt_modification_time' },
485 { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
488 { "bVisible": false, "aTargets": [ 'NoVisible' ] }
491 'sPaginationType': 'full_numbers',
494 "bSortCellsTop": true
497 dtListResults.fnAddFilters("filter", 750);
499 var tabs = $("#tabs").tabs({
500 [% IF category == PUBLIC %]
505 activate: function(e, ui) {
506 var active = tabs.tabs("option", "active" );
508 type = [% PRIVATE %];
509 dtListResults.fnDraw();
510 } else if ( active == 1 ) {
512 dtListResults.fnDraw();
516 $("body").on("click", ".deleteshelf", function(){
517 return confirmDelete(MSG_CONFIRM_DELETE_LIST);
522 [% IF shelf AND op == 'view' %]
523 $(document).ready(function(){
524 [% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %]
525 $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-remove\"></i>"+_(" Clear all")+"<\/a>");
526 $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-check\"></i>"+_(" Select all")+"<\/a>");
527 $("#CheckAll").click(function(){
528 $(".checkboxed").checkCheckboxes();
531 $("#CheckNone").click(function(){
532 $(".checkboxed").unCheckCheckboxes();
535 $(".placehold").on("click",function(e){
539 $(".addtocart").show();
540 var param1 = "| <label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
541 [% IF ( intranetbookbag ) %]
542 param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
544 [% IF Koha.Preference('virtualshelves') %]
545 [% IF add_to_some_private_shelves.count %]
546 param1 += "<optgroup label=\""+_("Your lists:")+"\">";
547 [% SET number_of_private_shelves = 0 %]
548 [% FOREACH s IN add_to_some_private_shelves %]
549 [% IF shelfnumber != s.shelfnumber %]
550 param1 += "<option id=\"s[% s.shelfnumber %]\" value=\"addtolist\">[% s.shelfname |html %]<\/option>";
551 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
552 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
555 param1 += "<\/optgroup>";
557 [% IF add_to_some_public_shelves.count %]
558 param1 += "<optgroup label=\""+_("Public lists:")+"\">";
559 [% SET number_of_public_shelves = 0 %]
560 [% FOREACH s IN add_to_some_public_shelves %]
561 [% IF shelfnumber != s.shelfnumber %]
562 param1 += "<option id=\"s[% s.shelfnumber %]\" value=\"addtolist\">[% s.shelfname |html %]<\/option>";
563 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
564 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
567 param1 += "<\/optgroup>";
569 [% IF add_to_some_private_shelves.count > 10 or add_to_some_public_shelves.count > 10 %]
570 param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
572 param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
574 param1 += "<\/select> <button id=\"cartsubmit\" type=\"submit\" class=\"btn btn-default btn-xs\">"+_("Save")+"</button>";
575 $("span.addto").html(param1);
576 $("#cartsubmit").on("click",function(e){
580 $("#addto").change(function(){
583 $(".addto").find("input:submit").click(function(e){
587 $("#selection_ops").show();
588 $(".merge-items").on("click",function(e){
592 $("#listform").on("submit",function(e){
595 $(".list-remove").on("click",function(e){
596 if($(".selection").filter(":checked").length > 0){
597 return confirm(MSG_REMOVE_FROM_LIST);
599 alert(MSG_NO_ITEM_SELECTED);
606 [% IF shelf AND op == 'edit_form' %]
607 $(document).ready(function(){
613 * This function checks if the adequate number of records are checked for merging
615 function MergeItems() {
616 var checkboxes = $("input:checkbox:checked");
617 if (checkboxes.length < 2) {
618 alert(_("At least two records must be selected for merging."));
621 $(checkboxes).each(function() {
622 params.push('biblionumber=' + $(this).val());
624 var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&');
631 * This function checks all checkboxes if all are empty,
632 * or unchecks all if any already checked.
635 var checkboxes = document.getElementsByTagName('input');
636 var nbCheckbox = checkboxes.length;
637 var check = areAllChecked();
638 for(var i=0;i<nbCheckbox;i++){
639 if(checkboxes[i].getAttribute('type') == "checkbox" ){
640 checkboxes[i].checked = (check) ? 0 : 1;
645 * This function returns true if ALL checkboxes are checked
647 function areAllChecked(){
648 var checkboxes = document.getElementsByTagName('input');
649 var nbCheckbox = checkboxes.length;
650 for(var i=0;i<nbCheckbox;i++){
651 if(checkboxes[i].getAttribute('type') == "checkbox" ){
652 if(checkboxes[i].checked == 0){
660 function placeHold () {
661 var checkedItems = $(".selection:checked");
662 if ($(checkedItems).size() == 0) {
663 alert(MSG_NO_ITEM_SELECTED);
667 $(checkedItems).each(function() {
668 bibs += $(this).val() + "/";
670 $("#hold_form_biblios").val(bibs);
671 $("#hold_form").submit();
676 var checkboxes = $("#searchresults").find(":checkbox");
677 var vshelf = vShelfAdd(checkboxes);
678 if($("#addto").find("option:selected").attr("value") == "addtolist"){
679 var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
681 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf,'popup',500,500);
684 } else if($("#addto").find("option:selected").attr("value") == "newlist"){
686 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf,'popup',500,500);
689 } else if($("#addto").find("option:selected").attr("value") == "morelists"){
691 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf,'popup',500,500);
695 if($("#addto").find("option:selected").attr("value") == "addtocart"){
696 addMultiple(checkboxes);
701 function AdjustRemark() {
702 var category = $("#category").val();
703 var perms = $("#allow_changes_from").val();
706 $("#anyone_remark").hide();
707 } else if( category==1 ) {
708 // If we move to Private (without shares), show Anyone remark
709 // Note: the number of shares is not tested real-time
710 [% IF !shelf.is_shared %]
711 $("#anyone_remark").show();
713 $("#anyone_remark").hide();
715 } else { // category==2
716 $("#anyone_remark").hide();
719 [% IF op == 'view' %]
722 open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelf.shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
725 $(document).ready(function() {
726 $("#sendlist").click(function(){
730 $("#deleteshelf").click(function(e){
731 if(confirm(_("Are you sure you want to delete this list?"))){
743 [% INCLUDE 'intranet-bottom.inc' %]