5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Library checkin and transfer policy › Administration › Koha</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <style>td { text-align: center; } .sorted { min-width: 50%; }</style>
11 <body id="admin_branch_transfer_limits" class="admin">
12 [% WRAPPER 'header.inc' %]
13 [% INCLUDE 'prefs-admin-search.inc' %]
16 [% WRAPPER 'sub-header.inc' %]
17 [% WRAPPER breadcrumbs %]
18 [% WRAPPER breadcrumb_item %]
19 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
21 [% WRAPPER breadcrumb_item bc_active= 1 %]
22 <span>Set library checkin and transfer policy</span>
24 [% END #/ WRAPPER breadcrumbs %]
25 [% END #/ WRAPPER sub-header.inc %]
27 <div class="main container-fluid">
29 <div class="col-sm-10 col-sm-push-2">
32 <h1>Library [% branchcode | html %] - [% Branches.GetName( branchcode ) | html %] Checkin and transfer policy</h1>
33 <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
34 <label for="branchselect">Select a library :</label>
35 <select name="branchcode" id="branchselect">
36 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
40 <p class="help">Check the boxes for the libraries you allow your items to be transferred to.</p>
42 [% IF ( limitType == 'ccode' ) %]<strong>For all collection codes: </strong>[% ELSE %]<strong>For all item types: </strong>[% END %]
43 <a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a>
45 <a id="UncheckAll" href="#"><i class="fa fa-times"></i> Clear all</a>
47 <a href="/cgi-bin/koha/admin/transfer_limits.pl">Switch to advanced editor</a>
50 [% WRAPPER tabs id = "transferlimit_tabs" %]
51 [% WRAPPER tabs_nav %]
52 [% FOREACH codes_loo IN codes_loop %]
53 [% WRAPPER tab_item tabname=codes_loo.code %]
54 [% codes_loo.code | html %]
59 <form method="post" action="branch_transfer_limits.pl">
60 [% WRAPPER tab_panels %]
61 [% FOREACH codes_loo IN codes_loop %]
62 [% WRAPPER tab_panel tabname=codes_loo.code %]
63 <h4>Policy for [% codes_loo.limit_phrase | html %]: [% codes_loo.code | html %]</h4>
65 <p><a id="CheckAll[% codes_loo.code | html %]table" data-cb="[% codes_loo.code | html %]" class="checkall" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll[% codes_loo.code | html %]table" data-cb="[% codes_loo.code | html %]" class="uncheckall" href="#"><i class="fa fa-times"></i> Clear all</a></p>
67 <table id="[% codes_loo.code | html %]table" class="sorted">
71 <th>Allow transfer?</th>
76 [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
78 <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>
80 [% IF ( to_branch_loo.isChecked ) %]
81 <input type="checkbox" class="cb cb[% codes_loo.code | html %]" 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" />
83 <input type="checkbox" class="cb cb[% codes_loo.code | html %]" id="[% to_branch_loo.code | html %][% to_branch_loo.toBranch | html %]row" name="[% to_branch_loo.code | html %]_[% to_branch_loo.toBranch | html %]" />
90 [% END #/WRAPPER tab_panel %]
91 [% END # /FOREACH codes_loo %]
92 [% END # /WRAPPER tab_panels %]
94 <fieldset class="action">
95 <input type="hidden" name="updateLimits" value="1" />
96 <input type="hidden" name="branchcode" value="[% branchcode | html %]" />
97 <input type="submit" class="btn btn-primary" value="Save" />
98 <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
101 [% END # /WRAPPER tabs %]
104 </div> <!-- /.col-sm-10.col-sm-push-2 -->
106 <div class="col-sm-2 col-sm-pull-10">
108 [% INCLUDE 'admin-menu.inc' %]
110 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
111 </div> <!-- /.row -->
113 [% MACRO jsinclude BLOCK %]
114 [% Asset.js("js/admin-menu.js") | $raw %]
115 [% INCLUDE 'datatables.inc' %]
117 $(document).ready(function(){
118 $("#CheckAll").on("click", function(e){
120 $(".cb").each(function(){
121 $(this).prop("checked", true);
125 $("#UncheckAll").on("click", function(e){
127 $(".cb").each(function(){
128 $(this).prop("checked", false);
132 if( $("#transferlimit_tabs .tab-pane.active").length < 1 ){
133 $("#transferlimit_tabs a:first").tab("show");
136 $('#branchselect').change(function() {
137 $('#selectlibrary').submit();
140 var checkall = $(".checkall");
141 var uncheckall = $(".uncheckall");
143 $(checkall).on("click", function(e){
145 var tid = $(this).data("cb");
146 $(".cb" + tid ).each(function(){
147 $(this).prop("checked", true);
151 $(uncheckall).on("click", function(e){
153 var tid = $(this).data("cb");
154 $(".cb" + tid ).each(function(){
155 $(this).prop("checked", false);
159 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
161 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
168 [% INCLUDE 'intranet-bottom.inc' %]