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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
26 <a href="#" aria-current="page">
27 Set library checkin and transfer policy
34 <div class="main container-fluid">
36 <div class="col-sm-10 col-sm-push-2">
39 <h1>Library [% branchcode | html %] - [% Branches.GetName( branchcode ) | html %] Checkin and transfer policy</h1>
40 <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
41 <label for="branchselect">Select a library :</label>
42 <select name="branchcode" id="branchselect">
43 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
47 <p class="help">Check the boxes for the libraries you allow your items to be transferred to.</p>
49 [% IF ( limitType == 'ccode' ) %]<strong>For all collection codes: </strong>[% ELSE %]<strong>For all item types: </strong>[% END %]
50 <a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a>
52 <a id="UncheckAll" href="#"><i class="fa fa-remove"></i> Clear all</a>
54 <a href="/cgi-bin/koha/admin/transfer_limits.pl">Switch to advanced editor</a>
57 [% WRAPPER tabs id = "transferlimit_tabs" %]
58 [% WRAPPER tabs_nav %]
59 [% FOREACH codes_loo IN codes_loop %]
60 [% WRAPPER tab_item tabname=codes_loo.code %]
61 [% codes_loo.code | html %]
66 <form method="post" action="branch_transfer_limits.pl">
67 [% WRAPPER tab_panels %]
68 [% FOREACH codes_loo IN codes_loop %]
69 [% WRAPPER tab_panel tabname=codes_loo.code %]
70 <h4>Policy for [% codes_loo.limit_phrase | html %]: [% codes_loo.code | html %]</h4>
72 <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-remove"></i> Clear all</a></p>
74 <table id="[% codes_loo.code | html %]table" class="sorted">
78 <th>Allow transfer?</th>
83 [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
85 <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>
87 [% IF ( to_branch_loo.isChecked ) %]
88 <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" />
90 <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 %]" />
97 [% END #/WRAPPER tab_panel %]
98 [% END # /FOREACH codes_loo %]
99 [% END # /WRAPPER tab_panels %]
101 <fieldset class="action">
102 <input type="hidden" name="updateLimits" value="1" />
103 <input type="hidden" name="branchcode" value="[% branchcode | html %]" />
104 <input type="submit" class="btn btn-primary" value="Save" />
105 <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
108 [% END # /WRAPPER tabs %]
111 </div> <!-- /.col-sm-10.col-sm-push-2 -->
113 <div class="col-sm-2 col-sm-pull-10">
115 [% INCLUDE 'admin-menu.inc' %]
117 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
118 </div> <!-- /.row -->
120 [% MACRO jsinclude BLOCK %]
121 [% Asset.js("js/admin-menu.js") | $raw %]
122 [% INCLUDE 'datatables.inc' %]
124 $(document).ready(function(){
125 $("#CheckAll").on("click", function(e){
127 $(".cb").each(function(){
128 $(this).prop("checked", true);
132 $("#UncheckAll").on("click", function(e){
134 $(".cb").each(function(){
135 $(this).prop("checked", false);
139 if( $(".tab-pane.active").length < 1 ){
140 $("#transferlimit_tabs a:first").tab("show");
143 $('#branchselect').change(function() {
144 $('#selectlibrary').submit();
147 var checkall = $(".checkall");
148 var uncheckall = $(".uncheckall");
150 $(checkall).on("click", function(e){
152 var tid = $(this).data("cb");
153 $(".cb" + tid ).each(function(){
154 $(this).prop("checked", true);
158 $(uncheckall).on("click", function(e){
160 var tid = $(this).data("cb");
161 $(".cb" + tid ).each(function(){
162 $(this).prop("checked", false);
166 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
168 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
175 [% INCLUDE 'intranet-bottom.inc' %]