7 [% INCLUDE 'doc-head-open.inc' %]
8 <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>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") %]
11 <style type="text/css">textarea { width: 100%; }</style>
13 [% BLOCK list_permissions %]
15 <label for="allow_changes_from">Allow changes to contents from: </label>
16 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
18 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
20 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
21 <option value="1" selected="selected">Owner only</option>
23 <option value="1">Owner only</option>
26 [% 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 %]
29   <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
34 <body id="lists_shelves" class="lists">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'cat-search.inc' %]
38 <div id="breadcrumbs">
39 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
41 <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
45 [% IF shelf AND shelf.is_private %] ›
46 [% IF op == 'view' OR op == 'edit_form' %]
47 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE %]">Your lists</a>
51 [% ELSIF shelf AND shelf.is_public %] ›
53 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC %]">Public lists</a>
59 [% 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>
61 <div id="doc3" class="yui-t2">
66 <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
69 [% FOR m IN messages %]
70 <div class="dialog [% m.type %]">
72 [% CASE 'error_on_update' %]
73 <span>An error occurred when updating this list.</span>
74 [% CASE 'error_on_insert' %]
75 <span>An error occurred when creating this list.</span>
76 [% CASE 'error_on_delete' %]
77 <span>An error occurred when deleting this list.</span>
78 [% CASE 'error_on_add_biblio' %]
79 [% IF m.item_barcode %]
80 <span>The item ([% m.item_barcode %]) has not been added to the list. Please verify it is not already in the list.</span>
82 <span>The record ([% m.bibnum %]) has not been added to the list. Please verify it is not already in the list.</span>
84 [% CASE 'success_on_update' %]
85 <span>List updated.</span>
86 [% CASE 'success_on_insert' %]
87 <span>List created.</span>
88 [% CASE 'success_on_delete' %]
89 <span>List deleted.</span>
90 [% CASE 'success_on_add_biblio' %]
91 [% IF m.item_barcode %]
92 <span>The item ([% m.item_barcode %]) has been added to the list.</span>
94 <span>The record ([% m.bibnum %]) has been added to the list.</span>
96 [% CASE 'success_on_remove_biblios' %]
97 <span>The item has been removed from the list.</span>
98 [% CASE 'does_not_exist' %]
99 <span>This list does not exist.</span>
100 [% CASE 'item_does_not_exist' %]
101 [% IF m.item_barcode %]
102 <span>The item ([% m.item_barcode %]) does not exist.</span>
104 <span>The record ([% m.bibnum %]) does not exist.</span>
106 [% CASE 'unauthorized_on_view' %]
107 <span>You do not have permission to view this list.</span>
108 [% CASE 'unauthorized_on_update' %]
109 <span>You do not have permission to update this list.</span>
110 [% CASE 'unauthorized_on_delete' %]
111 <span>You do not have permission to delete this list.</span>
112 [% CASE 'unauthorized_on_add_biblio' %]
113 <span>You do not have permission to add a record to this list.</span>
114 [% CASE 'no_biblio_removed' %]
115 <span>No record was removed.</span>
116 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
117 <span>An error occurred when creating this list. The name [% shelfname %] already exists.</span>
118 [% CASE 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' %]
119 <span>List could not be created. (Do not use the database administrator account.)</span>
120 [% CASE 'DBIx::Class::Exception' %]
123 [% m.code %] [% m.msg %]
128 [% IF op == 'view' %]
132 <h3>Contents of <i>[% shelf.shelfname | html %]</i></h3>
133 <div class="pages">[% pagination_bar %]</div>
134 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed">
135 <input type="hidden" name="op" value="remove_biblios" />
136 <input type="hidden" name="referer" value="view" />
137 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
139 [% IF direction == 'asc' %]
140 [% SET new_direction = 'desc' %]
142 [% SET direction = 'desc' %]
143 [% SET new_direction = 'asc' %]
146 <div id="searchheader" class="noprint">
148 <div id="selection_ops"><span class="checkall"></span> |
149 <span class="clearall"></span>
151 <span class="addto">| </span>
153 [% IF CAN_user_reserveforothers && Koha.Preference('DisplayMultiPlaceHold') %]
154 <div class="btn-group"><button class="btn btn-default btn-xs placehold"><i class="fa fa-sticky-note-o"></i> Place hold</button></div>
156 [% IF can_remove_biblios %]
157 <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>
159 [% 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 %]
164 <table id="searchresults">
166 [% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %]
168 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
170 <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>
171 [% IF sortfield == 'title' %]
172 <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
174 <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
178 <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>
179 [% IF sortfield == 'author' %]
180 <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
182 <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
187 <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>
188 [% IF sortfield == 'itemcallnumber' %]
189 <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
191 <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
195 [% FOREACH itemsloo IN itemsloop %]
199 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="biblionumber" />
202 [% UNLESS ( item_level_itypes ) %]<td>
203 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
206 [% IF ( itemsloo.XSLTBloc ) %]
207 [% itemsloo.XSLTBloc %]
209 [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
210 [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
213 [% IF ( itemsloo.notforloan ) %]
214 <span class="noholdstext">No holds allowed</span>
216 [% IF ( itemsloo.ITEM_RESULTS.size ) %]
217 <a id="reserve_[% itemsloo.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
218 [% 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 %]
220 <span class="noholdstext">No holds allowed</span>
223 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
224 | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber %]">Edit record</a>
226 [% IF ( CAN_user_editcatalogue_edit_items ) %]
227 | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber %]">Edit items</a>
231 <td>[% itemsloo.author %]</td>
232 <td>[% itemsloo.dateadded | $KohaDates%]</td>
235 [% FOREACH result IN itemsloo.ITEM_RESULTS %]
236 <li>[% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %]
237 [% IF ( result.itemcallnumber ) %]
238 [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% result.itemcallnumber |uri %]%22">[% result.itemcallnumber %]</a>]
245 [% END %]<!-- /itemsloop -->
247 <div class="pages">[% pagination_bar %]</div>
254 [% IF op == 'add_form' OR op == 'edit_form' %]
256 <div class="yui-u first">
257 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated">
258 <fieldset class="rows">
260 [% IF op == 'add_form' %]
261 <legend>Create a new list</legend>
262 <input type="hidden" name="op" value="add" />
264 <legend>Edit list <i>[% shelf.shelfname | html %]</i></legend>
265 <input type="hidden" name="op" value="edit" />
267 <input type="hidden" name="referer" value="[% referer | html %]" />
268 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
271 <label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname |html %]" required="required" class="required" />
272 <span class="required">Required</span>
275 <span class="label">Owner: </span>
276 [% IF op == 'add_form' %]
277 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" />[% loggedinusername %]</li>
280 <input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber %]" />[% owner.firstname _ ' ' _ owner.surname %]
282 <input type="hidden" id="owner" name="owner" value="[% loggedinusernumber %]" />[% loggedinusername %]
286 <li><label for="sortfield" >Sort this list by: </label>
287 <select name="sortfield">
288 [% IF shelf.sortfield == "title" %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
289 [% IF shelf.sortfield == "author" %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
290 [% IF shelf.sortfield == "copyrightdate" %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
291 [% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
293 <li><label for="category">Category: </label>
294 <select id="category" name="category" onchange="AdjustRemark()">
295 [% IF shelf.is_private %]
296 <option value="1" selected="selected">Private</option>
298 <option value="1">Private</option>
300 [% IF shelf.is_public %]
301 <option value="2" selected="selected">Public</option>
303 <option value="2">Public</option>
307 [% INCLUDE list_permissions %]
312 <fieldset class="action">
313 <input type="submit" value="Save" class="submit" />
314 [% IF referer == 'view' %]
315 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a>
317 [% IF category == PUBLIC %]
318 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC %]" class="cancel">Cancel</a>
320 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE %]" class="cancel">Cancel</a>
329 [% IF op == 'list' %]
331 <div id="tabs" class="toptabs">
333 <li id="privateshelves_tab" class="active"><a href="#tab_content">Your lists</a></li>
334 <li id="publicshelves_tab" class="active"><a href="#tab_content">Public lists</a></li>
337 <div id="tab_content">
338 <table id="listresultst">
341 <th class="NoVisible">Type</th>
347 <th>Creation date</th>
348 <th>Modification date</th>
351 <tr class="filters_row">
353 <th><input class="filter text_filter" id="searchshelfname_filter" placeholder="List name"></th>
356 <th><input class="filter text_filter" id="searchowner_filter" placeholder="Owner"></th>
358 <select class="filter text_filter" id="searchsortby_filter">
359 <option value=""></option>
360 <option value="title">Title</option>
361 <option value="author">Author</option>
362 <option value="copyrightdate">Copyrightdate</option>
363 <option value="itemcallnumber">Call number</option>
377 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
378 <!-- Value will be set here by placeHold() -->
379 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
380 <input type="hidden" name="multi_hold" value="1"/>
386 [% IF ( can_add_biblios ) %]
388 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
389 <fieldset class="brief noprint">
393 <label for="barcodes">Barcodes:</label>
394 <textarea name="barcodes" id="barcodes" class="focus" autocomplete="off" rows="5"></textarea>
395 <input type="hidden" name="op" value="add_biblio" />
396 <input type="hidden" name="referer" value="view" />
397 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
400 <label for="biblionumbers">Biblio numbers:</label>
401 <textarea name="biblionumbers" id="biblionumbers" class="focus" autocomplete="off" rows="5"></textarea>
402 <input type="hidden" name="op" value="add_biblio" />
403 <input type="hidden" name="referer" value="view" />
404 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
407 <fieldset class="action">
408 <input type="submit" value="Add" />
417 [% MACRO jsinclude BLOCK %]
418 [% INCLUDE 'datatables.inc' %]
419 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
421 <script type="text/javascript">
422 $( document ).ready(function() {
424 setTimeout('window.close()', 1);
429 [% IF op == 'view' %]
430 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
431 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
433 <script type="text/javascript">
434 var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
435 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
436 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
438 [% IF op == 'list' %]
439 $(document).ready(function(){
440 [% IF category == PUBLIC %]
441 var type = [% PUBLIC %];
443 var type = [% PRIVATE %];
445 var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
447 "aaSorting": [[ 5, "asc" ]],
449 'sAjaxSource': "/cgi-bin/koha/svc/virtualshelves/search",
450 'fnServerData': function(sSource, aoData, fnCallback) {
456 'value': $("#searchshelfname_filter").val(),
459 'value': $("#searchowner_filter").val(),
462 'value': $("#searchsortby_filter").val(),
464 'name': 'template_path',
465 'value': 'virtualshelves/tables/shelves_results.tt',
472 'success': function(json){
478 { 'mDataProp': 'dt_type' },
479 { 'mDataProp': 'dt_shelfname' },
480 { 'mDataProp': 'dt_count' },
481 { 'mDataProp': 'dt_is_shared' },
482 { 'mDataProp': 'dt_owner' },
483 { 'mDataProp': 'dt_sortby' },
484 { 'mDataProp': 'dt_created_on' },
485 { 'mDataProp': 'dt_modification_time' },
486 { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
489 { "bVisible": false, "aTargets": [ 'NoVisible' ] }
492 'sPaginationType': 'full_numbers',
495 "bSortCellsTop": true
498 dtListResults.fnAddFilters("filter", 750);
500 var tabs = $("#tabs").tabs({
501 [% IF category == PUBLIC %]
506 activate: function(e, ui) {
507 var active = tabs.tabs("option", "active" );
509 type = [% PRIVATE %];
510 dtListResults.fnDraw();
511 } else if ( active == 1 ) {
513 dtListResults.fnDraw();
517 $("body").on("click", ".deleteshelf", function(){
518 return confirmDelete(MSG_CONFIRM_DELETE_LIST);
523 [% IF shelf AND op == 'view' %]
524 $(document).ready(function(){
525 [% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %]
526 $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-remove\"></i>"+_(" Clear all")+"<\/a>");
527 $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-check\"></i>"+_(" Select all")+"<\/a>");
528 $("#CheckAll").click(function(){
529 $(".checkboxed").checkCheckboxes();
532 $("#CheckNone").click(function(){
533 $(".checkboxed").unCheckCheckboxes();
536 $(".placehold").on("click",function(e){
540 $(".addtocart").show();
541 var param1 = "| <label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
542 [% IF ( intranetbookbag ) %]
543 param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
545 [% IF Koha.Preference('virtualshelves') %]
546 [% IF add_to_some_private_shelves.count %]
547 param1 += "<optgroup label=\""+_("Your lists:")+"\">";
548 [% SET number_of_private_shelves = 0 %]
549 [% FOREACH s IN add_to_some_private_shelves %]
550 [% IF shelfnumber != s.shelfnumber %]
551 param1 += "<option id=\"s[% s.shelfnumber %]\" value=\"addtolist\">[% s.shelfname |html %]<\/option>";
552 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
553 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
556 param1 += "<\/optgroup>";
558 [% IF add_to_some_public_shelves.count %]
559 param1 += "<optgroup label=\""+_("Public lists:")+"\">";
560 [% SET number_of_public_shelves = 0 %]
561 [% FOREACH s IN add_to_some_public_shelves %]
562 [% IF shelfnumber != s.shelfnumber %]
563 param1 += "<option id=\"s[% s.shelfnumber %]\" value=\"addtolist\">[% s.shelfname |html %]<\/option>";
564 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
565 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
568 param1 += "<\/optgroup>";
570 [% IF add_to_some_private_shelves.count > 10 or add_to_some_public_shelves.count > 10 %]
571 param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
573 param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
575 param1 += "<\/select> <button id=\"cartsubmit\" type=\"submit\" class=\"btn btn-default btn-xs\">"+_("Save")+"</button>";
576 $("span.addto").html(param1);
577 $("#cartsubmit").on("click",function(e){
581 $("#addto").change(function(){
584 $(".addto").find("input:submit").click(function(e){
588 $("#selection_ops").show();
589 $(".merge-items").on("click",function(e){
593 $("#listform").on("submit",function(e){
596 $(".list-remove").on("click",function(e){
597 if($(".selection").filter(":checked").length > 0){
598 return confirm(MSG_REMOVE_FROM_LIST);
600 alert(MSG_NO_ITEM_SELECTED);
607 [% IF shelf AND op == 'edit_form' %]
608 $(document).ready(function(){
614 * This function checks if the adequate number of records are checked for merging
616 function MergeItems() {
617 var checkboxes = $("input:checkbox:checked");
618 if (checkboxes.length < 2) {
619 alert(_("At least two records must be selected for merging."));
622 $(checkboxes).each(function() {
623 params.push('biblionumber=' + $(this).val());
625 var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&');
632 * This function checks all checkboxes if all are empty,
633 * or unchecks all if any already checked.
636 var checkboxes = document.getElementsByTagName('input');
637 var nbCheckbox = checkboxes.length;
638 var check = areAllChecked();
639 for(var i=0;i<nbCheckbox;i++){
640 if(checkboxes[i].getAttribute('type') == "checkbox" ){
641 checkboxes[i].checked = (check) ? 0 : 1;
646 * This function returns true if ALL checkboxes are checked
648 function areAllChecked(){
649 var checkboxes = document.getElementsByTagName('input');
650 var nbCheckbox = checkboxes.length;
651 for(var i=0;i<nbCheckbox;i++){
652 if(checkboxes[i].getAttribute('type') == "checkbox" ){
653 if(checkboxes[i].checked == 0){
661 function placeHold () {
662 var checkedItems = $(".selection:checked");
663 if ($(checkedItems).size() == 0) {
664 alert(MSG_NO_ITEM_SELECTED);
668 $(checkedItems).each(function() {
669 bibs += $(this).val() + "/";
671 $("#hold_form_biblios").val(bibs);
672 $("#hold_form").submit();
677 var checkboxes = $("#searchresults").find(":checkbox");
678 var vshelf = vShelfAdd(checkboxes);
679 if($("#addto").find("option:selected").attr("value") == "addtolist"){
680 var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
682 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf,'popup',500,500);
685 } else if($("#addto").find("option:selected").attr("value") == "newlist"){
687 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf,'popup',500,500);
690 } else if($("#addto").find("option:selected").attr("value") == "morelists"){
692 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf,'popup',500,500);
696 if($("#addto").find("option:selected").attr("value") == "addtocart"){
697 addMultiple(checkboxes);
702 function AdjustRemark() {
703 var category = $("#category").val();
704 var perms = $("#allow_changes_from").val();
707 $("#anyone_remark").hide();
708 } else if( category==1 ) {
709 // If we move to Private (without shares), show Anyone remark
710 // Note: the number of shares is not tested real-time
711 [% IF !shelf.is_shared %]
712 $("#anyone_remark").show();
714 $("#anyone_remark").hide();
716 } else { // category==2
717 $("#anyone_remark").hide();
720 [% IF op == 'view' %]
723 open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelf.shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
726 $(document).ready(function() {
727 $("#sendlist").click(function(){
731 $("#deleteshelf").click(function(e){
732 if(confirm(_("Are you sure you want to delete this list?"))){
744 [% INCLUDE 'intranet-bottom.inc' %]