5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › Library checkin and transfer policy</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% Asset.css("css/datatables.css") | $raw %]
9 <style type="text/css">td { text-align: center; } .sorted { min-width: 50%; }</style>
12 <body id="admin_branch_transfer_limits" class="admin">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'prefs-admin-search.inc' %]
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Set library checkin and transfer policy</div>
18 <div class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
23 <h1>Library [% branchcode | html %] - [% Branches.GetName( branchcode ) | html %] Checkin and transfer policy</h1>
24 <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
25 <label for="branchselect">Select a library :</label>
26 <select name="branchcode" id="branchselect">
27 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
31 <p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
32 <fieldset>[% IF ( limitType == 'ccode' ) %]<strong>For all collection codes: </strong>[% ELSE %]<strong>For all item types: </strong>[% END %]<a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll" href="#"><i class="fa fa-remove"></i> Clear all</a></fieldset>
35 <div id="transferlimit_tabs" class="toptabs">
36 <ul class="ui-tabs-nav">
37 [% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code | uri %]set">[% codes_loo.code | html %]</a></li>[% END %]
40 <form method="post" action="branch_transfer_limits.pl">
42 [% FOREACH codes_loo IN codes_loop %]
43 <div id="[% codes_loo.code | html %]set">
44 <h4>Policy for [% codes_loo.limit_phrase | html %]: [% codes_loo.code | html %]</h4>
45 <p><a id="CheckAll[% codes_loo.code | html %]table" class="checkall" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll[% codes_loo.code | html %]table" class="uncheckall" href="#"><i class="fa fa-remove"></i> Clear all</a></p>
47 <table id="[% codes_loo.code | html %]table" class="sorted">
51 <th>Allow transfer?</th>
56 [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
58 <td><label style="min-width:400px;" for="[% to_branch_loo.code | html %][% to_branch_loo.toBranch | html %]row">[% to_branch_loo.toBranch | html %] - [% Branches.GetName( to_branch_loo.toBranch ) | html %]</label></td>
60 [% IF ( to_branch_loo.isChecked ) %]
61 <input type="checkbox" id="[% to_branch_loo.code | html %][% to_branch_loo.toBranch | html %]row" name="[% to_branch_loo.code | html %]_[% to_branch_loo.toBranch | html %]" checked="checked" />
63 <input type="checkbox" id="[% to_branch_loo.code | html %][% to_branch_loo.toBranch | html %]row" name="[% to_branch_loo.code | html %]_[% to_branch_loo.toBranch | html %]" />
73 <fieldset class="action">
74 <input type="hidden" name="updateLimits" value="1" />
75 <input type="hidden" name="branchcode" value="[% branchcode | html %]" />
76 <input type="submit" value="Save" />
77 <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
83 </div> <!-- /.col-sm-10.col-sm-push-2 -->
85 <div class="col-sm-2 col-sm-pull-10">
87 [% INCLUDE 'admin-menu.inc' %]
89 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
92 [% MACRO jsinclude BLOCK %]
93 [% Asset.js("js/admin-menu.js") | $raw %]
94 [% INCLUDE 'datatables.inc' %]
95 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
97 $(document).ready(function(){
98 $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; });
99 $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes(); return false; });
100 $('#transferlimit_tabs').tabs();
102 $('#branchselect').change(function() {
103 $('#selectlibrary').submit();
106 var checkall = $(".checkall");
107 var uncheckall = $(".uncheckall");
109 $(checkall).click(function(){
110 var tid = $(this).attr("id");
111 tid = tid.replace("CheckAll","");
112 $("#"+tid).checkCheckboxes();
116 $(uncheckall).click(function(){
117 var tid = $(this).attr("id");
118 tid = tid.replace("UncheckAll","");
119 $("#"+tid).unCheckCheckboxes();
122 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
124 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
131 [% INCLUDE 'intranet-bottom.inc' %]