Lines 222-338
Link Here
|
222 |
<span class="label">Managed by:</span> |
222 |
<span class="label">Managed by:</span> |
223 |
<div style="float:left"> |
223 |
<div style="float:left"> |
224 |
<ul id="users_names" style="padding-left:0"> |
224 |
<ul id="users_names" style="padding-left:0"> |
225 |
[% FOREACH user IN users %] |
225 |
[% FOREACH user IN users %] |
226 |
<li id="user_[% user.borrowernumber %]"> |
226 |
<li id="user_[% user.borrowernumber %]"> |
227 |
[% user.firstname %] [% user.surname %] |
227 |
[% user.firstname %] [% user.surname %] |
228 |
<a href="#" data-borrowernumber="[% user.borrowernumber %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a> |
228 |
<a href="#" data-borrowernumber="[% user.borrowernumber %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a> |
|
|
229 |
</li> |
230 |
[% END %] |
231 |
<li> |
232 |
<a href="#" id="add_user"><i class="fa fa-plus"></i> Add user</a> |
233 |
</li> |
234 |
<li id="add_user_submit" style="display:none;"> |
235 |
<button type="submit" class="btn btn-default btn-xs">Save changes</button> |
229 |
</li> |
236 |
</li> |
230 |
[% END %] |
|
|
231 |
</ul> |
237 |
</ul> |
232 |
<input type="hidden" id="basketno" name="basketno" value="[% basketno %]" /> |
|
|
233 |
<input type="hidden" id="users_ids" name="users_ids" value="[% users_ids %]" /> |
234 |
<input type="hidden" id="op" name="op" value="mod_users" /> |
235 |
<input type="button" id="add_user" value="Add user" /> |
236 |
<input type="submit" value="Save changes" /> |
237 |
</div> |
238 |
</div> |
|
|
239 |
<input type="hidden" id="basketno" name="basketno" value="[% basketno %]" /> |
240 |
<input type="hidden" id="users_ids" name="users_ids" value="[% users_ids %]" /> |
241 |
<input type="hidden" id="op" name="op" value="mod_users" /> |
238 |
</form> |
242 |
</form> |
|
|
243 |
|
239 |
</li> |
244 |
</li> |
240 |
<li id="branch"> |
245 |
<li id="branch"> |
241 |
<span class="label">Library:</span> |
246 |
<span class="label">Managing library:</span> |
242 |
[% IF basketbranchcode %] |
247 |
[% IF basketbranchcode %] |
243 |
[% Branches.GetName( basketbranchcode ) %] |
248 |
[% Branches.GetName( basketbranchcode ) %] |
|
|
249 |
<a href="#" id="set_managing_library"><i class="fa fa-pencil"></i> Change library</a> |
244 |
[% ELSE %] |
250 |
[% ELSE %] |
245 |
No library |
251 |
No library |
|
|
252 |
<a href="#" id="set_managing_library"><i class="fa fa-pencil"></i> Set library</a> |
246 |
[% END %] |
253 |
[% END %] |
247 |
[% IF branches_loop.size %] |
254 |
</li> |
248 |
<form action="" method="post"> |
255 |
[% IF branches_loop.size %] |
249 |
<select id="branch" name="branch"> |
256 |
<li id="managing_library_entry" style="display:none;"> |
250 |
<option value="">(no library)</option> |
257 |
<span class="label"> </span> |
251 |
[% FOREACH branch IN branches_loop %] |
258 |
<div style="float:left"> |
252 |
[% IF (branch.selected) %] |
259 |
<form action="" method="post"> |
253 |
<option selected="selected" value="[% branch.branchcode %]"> [% branch.branchname %]</option> |
260 |
<select id="branch" name="branch" style="max-width:10em;"> |
254 |
[% ELSE %] |
261 |
<option value="">(no library)</option> |
255 |
<option value="[% branch.branchcode %]"> [% branch.branchname %]</option> |
262 |
[% FOREACH branch IN branches_loop %] |
|
|
263 |
[% IF (branch.selected) %] |
264 |
<option selected="selected" value="[% branch.branchcode %]"> [% branch.branchname %]</option> |
265 |
[% ELSE %] |
266 |
<option value="[% branch.branchcode %]"> [% branch.branchname %]</option> |
267 |
[% END %] |
256 |
[% END %] |
268 |
[% END %] |
257 |
[% END %] |
269 |
</select> |
258 |
</select> |
270 |
<input type="hidden" id="basketno" name="basketno" value="[% basketno %]" /> |
259 |
<input type="hidden" id="basketno" name="basketno" value="[% basketno %]" /> |
271 |
<input type="hidden" id="op" name="op" value="mod_branch" /> |
260 |
<input type="hidden" id="op" name="op" value="mod_branch" /> |
272 |
<p> |
261 |
<input type="submit" value="Change" /> |
273 |
<button type="submit" class="btn btn-default btn-xs">Save</button> |
262 |
</form> |
274 |
<a id="library_entry_cancel" href="#" class="cancel">Cancel</a> |
|
|
275 |
</p> |
276 |
</form> |
277 |
</div> |
278 |
</li> |
263 |
[% END %] |
279 |
[% END %] |
264 |
</li> |
280 |
</li> |
265 |
[% IF ( creationdate ) %]<li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>[% END %] |
|
|
266 |
[% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %] |
267 |
[% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>[% END %] |
268 |
<li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li> |
269 |
|
270 |
[% IF basket.create_items %] |
271 |
<li> |
272 |
<span class="label">Create items when:</span> |
273 |
[% SWITCH basket.create_items %] |
274 |
[% CASE 'receiving' %]Receiving items |
275 |
[% CASE 'cataloguing' %]Cataloguing items |
276 |
[% CASE %]Placing orders |
277 |
[% END %] |
278 |
</li> |
279 |
[% END %] |
280 |
|
281 |
</ol> |
281 |
</ol> |
282 |
</div> |
282 |
</div> |
283 |
[% IF ( closedate ) %] |
283 |
|
284 |
<div class="yui-u"> |
284 |
<div class="yui-u"> |
|
|
285 |
<ol> |
286 |
[% IF ( creationdate ) %] |
287 |
<li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li> |
288 |
[% END %] |
289 |
[% IF ( closedate ) %] |
290 |
<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li> |
291 |
[% END %] |
292 |
[% IF ( estimateddeliverydate ) %] |
293 |
<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li> |
294 |
[% END %] |
295 |
<li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li> |
296 |
|
297 |
[% IF basket.create_items %] |
298 |
<li> |
299 |
<span class="label">Create items when:</span> |
300 |
[% SWITCH basket.create_items %] |
301 |
[% CASE 'receiving' %]Receiving items |
302 |
[% CASE 'cataloguing' %]Cataloguing items |
303 |
[% CASE %]Placing orders |
304 |
[% END %] |
305 |
</li> |
306 |
[% END %] |
307 |
</ol> |
308 |
|
309 |
[% IF ( closedate ) %] |
285 |
[% IF ( CAN_user_acquisition_group_manage ) %] |
310 |
[% IF ( CAN_user_acquisition_group_manage ) %] |
286 |
<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post"> |
311 |
<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post"> |
287 |
[% END %] |
312 |
[% END %] |
288 |
<ol> |
313 |
<ol> |
289 |
<li> |
314 |
<li> |
290 |
<span class="label">Basket group:</span> |
315 |
<span class="label">Basket group:</span> |
291 |
[% IF basketgroup.id and not basketgroup.name %] |
316 |
[% IF basketgroup.id and not basketgroup.name %] |
292 |
[% SET basketgroup.name = "Basket group no. " _ basketgroup.id %] |
317 |
[% SET basketgroup.name = "Basket group no. " _ basketgroup.id %] |
293 |
[% END %] |
318 |
[% END %] |
294 |
[% IF basketgroup.closed %] |
319 |
|
295 |
[% IF ( CAN_user_acquisition_group_manage ) %] |
320 |
[% IF basketgroup.closed %] |
296 |
<a href="basketgroup.pl?op=add&booksellerid=[% booksellerid %]&basketgroupid=[% basketgroup.id %]" title="basketgroup">[% basketgroup.name %] (closed)</a> |
321 |
[% IF ( CAN_user_acquisition_group_manage ) %] |
297 |
[% ELSE %] |
322 |
<a href="basketgroup.pl?op=add&booksellerid=[% booksellerid %]&basketgroupid=[% basketgroup.id %]" title="basketgroup">[% basketgroup.name %] (closed)</a> |
298 |
[% basketgroup.name %] (closed) |
323 |
[% ELSE %] |
299 |
[% END %] |
324 |
[% basketgroup.name %] (closed) |
300 |
[% ELSIF ( ! CAN_user_acquisition_group_manage ) %] |
325 |
[% END %] |
301 |
[%- IF basketgroup.id -%] |
326 |
[% ELSIF ( ! CAN_user_acquisition_group_manage ) %] |
302 |
[% basketgroup.name %] |
327 |
[%- IF basketgroup.id -%] |
303 |
[%- ELSE -%] |
328 |
[% basketgroup.name %] |
304 |
No group |
329 |
[%- ELSE -%] |
305 |
[%- END -%] |
330 |
No group |
306 |
[% ELSE %] |
331 |
[%- END -%] |
307 |
<select id="basketgroupid" name="basketgroupid"> |
|
|
308 |
<option value="">No group</option> |
309 |
[% FOREACH bg IN basketgroups %] |
310 |
[% IF ( bg.default ) %] |
311 |
<option value="[% bg.id %]" selected="selected">[% bg.name %]</option> |
312 |
[% ELSE %] |
332 |
[% ELSE %] |
313 |
[% UNLESS bg.closed %] |
333 |
[% IF ( basketgroup.id ) %] |
314 |
<option value="[% bg.id %]">[% bg.name %]</option> |
334 |
[% basketgroup.name %] |
315 |
[% ELSE %] |
335 |
<a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Change basket group</a> |
316 |
<option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option> |
336 |
[% ELSE %] |
317 |
[% END %] |
337 |
No group |
|
|
338 |
<a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Set basket group</a> |
339 |
[% END %] |
340 |
</li> |
341 |
<li id="basket_grouping" style="display:none;"> |
342 |
<span class="label"> </span> |
343 |
<div style="float:left"> |
344 |
<select id="basketgroupid" name="basketgroupid"> |
345 |
<option value="">No group</option> |
346 |
[% FOREACH bg IN basketgroups %] |
347 |
[% IF ( bg.default ) %] |
348 |
<option value="[% bg.id %]" selected="selected">[% bg.name %]</option> |
349 |
[% ELSE %] |
350 |
[% UNLESS bg.closed %] |
351 |
<option value="[% bg.id %]">[% bg.name %]</option> |
352 |
[% ELSE %] |
353 |
<option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option> |
354 |
[% END %] |
355 |
[% END %] |
356 |
[% END %] |
357 |
<option value="new">Add new group</option> |
358 |
</select> |
359 |
<input type="hidden" id="basketno" value="[% basketno %]" name="basketno" /> |
360 |
<input type="hidden" value="mod_basket" name="op" /> |
361 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
362 |
<p> |
363 |
<button type="submit" class="btn btn-default btn-xs">Save</button> |
364 |
<a href="#" id="basket_group_cancel" class="cancel">Cancel</a> |
365 |
</p> |
366 |
</div> |
318 |
[% END %] |
367 |
[% END %] |
319 |
[% END %] |
368 |
</li> |
320 |
<option value="new">Add new group</option> |
|
|
321 |
</select> |
322 |
<input type="hidden" id="basketno" value="[% basketno %]" name="basketno" /> |
323 |
<input type="hidden" value="mod_basket" name="op" /> |
324 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
325 |
<input type="submit" value="Change basket group" /> |
326 |
[% END %] |
327 |
</li> |
328 |
[% IF basketgroup.deliveryplace %]<li><span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) %]</li>[% END %] |
329 |
[% IF basketgroup.billingplace %]<li><span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) %]</li>[% END %] |
330 |
</ol> |
369 |
</ol> |
331 |
[% IF ( CAN_user_acquisition_group_manage ) %] |
370 |
[% IF ( CAN_user_acquisition_group_manage ) %] |
332 |
</form> |
371 |
</form> |
333 |
[% END %] |
372 |
[% END %] |
334 |
</div> |
|
|
335 |
[% END %] |
373 |
[% END %] |
|
|
374 |
</div> |
336 |
</div> |
375 |
</div> |
337 |
</div> |
376 |
</div> |
338 |
[% END %] |
377 |
[% END %] |
Lines 681-687
Link Here
|
681 |
[% END %][%# IF (cannot_manage_basket) %] |
720 |
[% END %][%# IF (cannot_manage_basket) %] |
682 |
</div> |
721 |
</div> |
683 |
<div class="yui-b"> |
722 |
<div class="yui-b"> |
684 |
[% INCLUDE 'acquisitions-menu.inc' %] |
723 |
[% INCLUDE 'vendor-menu.inc' %] |
|
|
724 |
[% INCLUDE 'acquisitions-menu.inc' %] |
685 |
</div> |
725 |
</div> |
686 |
</div> |
726 |
</div> |
687 |
|
727 |
|
Lines 711-719
Link Here
|
711 |
|
751 |
|
712 |
[% MACRO jsinclude BLOCK %] |
752 |
[% MACRO jsinclude BLOCK %] |
713 |
[% Asset.js("js/acquisitions-menu.js") %] |
753 |
[% Asset.js("js/acquisitions-menu.js") %] |
714 |
[% INCLUDE 'datatables.inc' %] |
754 |
[% INCLUDE 'datatables.inc' %] |
715 |
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %] |
755 |
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %] |
716 |
<script type="text/javascript"> |
756 |
<script> |
717 |
function updateColumnsVisibility(visible) { |
757 |
function updateColumnsVisibility(visible) { |
718 |
if ( visible ) { |
758 |
if ( visible ) { |
719 |
$("table .tax_excluded, .tax_included").show(); |
759 |
$("table .tax_excluded, .tax_included").show(); |
Lines 777-787
Link Here
|
777 |
$("#type").val(""); |
817 |
$("#type").val(""); |
778 |
}); |
818 |
}); |
779 |
|
819 |
|
|
|
820 |
$("#set_managing_library").on("click", function(e){ |
821 |
$(this).hide(); |
822 |
$("#managing_library_entry").show(); |
823 |
}); |
824 |
|
825 |
$("#library_entry_cancel").on("click", function(){ |
826 |
$("#managing_library_entry").hide(); |
827 |
$("#set_managing_library").show(); |
828 |
}); |
829 |
|
830 |
$("#set_basket_group").on("click", function(e){ |
831 |
$(this).hide(); |
832 |
$("#basket_grouping").show(); |
833 |
}); |
834 |
|
835 |
$("#basket_group_cancel").on("click", function(){ |
836 |
$("#basket_grouping").hide(); |
837 |
$("#set_basket_group").show(); |
838 |
}); |
839 |
|
780 |
}); |
840 |
}); |
781 |
</script> |
841 |
</script> |
782 |
|
842 |
|
783 |
[% UNLESS ( closedate ) %] |
843 |
[% UNLESS ( closedate ) %] |
784 |
<script type="text/javascript"> |
844 |
<script> |
785 |
function transfer_order_popup(ordernumber) { |
845 |
function transfer_order_popup(ordernumber) { |
786 |
var url = "/cgi-bin/koha/acqui/transferorder.pl?" |
846 |
var url = "/cgi-bin/koha/acqui/transferorder.pl?" |
787 |
+ "ordernumber=" + ordernumber |
847 |
+ "ordernumber=" + ordernumber |
Lines 796-802
Link Here
|
796 |
} |
856 |
} |
797 |
</script> |
857 |
</script> |
798 |
[% ELSE %] |
858 |
[% ELSE %] |
799 |
<script type="text/javascript"> |
859 |
<script> |
800 |
$(document).ready(function(){ |
860 |
$(document).ready(function(){ |
801 |
$("#basketgroupid").change(function(){ |
861 |
$("#basketgroupid").change(function(){ |
802 |
if($(this).val() == "new"){ |
862 |
if($(this).val() == "new"){ |
Lines 806-812
Link Here
|
806 |
}); |
866 |
}); |
807 |
</script> |
867 |
</script> |
808 |
[% UNLESS ( grouped ) %] |
868 |
[% UNLESS ( grouped ) %] |
809 |
<script type="text/javascript"> |
869 |
<script> |
810 |
function confirm_reopen() { |
870 |
function confirm_reopen() { |
811 |
var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; |
871 |
var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; |
812 |
var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); |
872 |
var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); |
Lines 817-823
Link Here
|
817 |
</script> |
877 |
</script> |
818 |
[% END %] |
878 |
[% END %] |
819 |
[% END %] |
879 |
[% END %] |
820 |
<script type="text/javascript"> |
880 |
<script> |
821 |
$(document).ready(function() { |
881 |
$(document).ready(function() { |
822 |
var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { |
882 |
var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { |
823 |
"sPaginationType": "four_button", |
883 |
"sPaginationType": "four_button", |
Lines 872-878
Link Here
|
872 |
var li = '<li id="user_'+borrowernumber+'">'+borrowername |
932 |
var li = '<li id="user_'+borrowernumber+'">'+borrowername |
873 |
+ ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> ' |
933 |
+ ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> ' |
874 |
+ _("Delete user") + '</a></li>'; |
934 |
+ _("Delete user") + '</a></li>'; |
875 |
$("#users_names").append(li); |
935 |
$("#users_names").prepend(li); |
|
|
936 |
$("#add_user_submit").show(); |
876 |
return 0; |
937 |
return 0; |
877 |
} |
938 |
} |
878 |
return -1; |
939 |
return -1; |
Lines 883-888
Link Here
|
883 |
var ids = $("#users_ids").val().split(':'); |
944 |
var ids = $("#users_ids").val().split(':'); |
884 |
ids.splice(ids.indexOf(borrowernumber.toString()), 1); |
945 |
ids.splice(ids.indexOf(borrowernumber.toString()), 1); |
885 |
$("#users_ids").val(ids.join(':')); |
946 |
$("#users_ids").val(ids.join(':')); |
|
|
947 |
$("#add_user_submit").show(); |
886 |
} |
948 |
} |
887 |
</script> |
949 |
</script> |
888 |
[% END %] |
950 |
[% END %] |
889 |
- |
|
|