5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › Library checkin and transfer policy</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 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'prefs-admin-search.inc' %]
15 <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>
17 <div class="main container-fluid">
19 <div class="col-sm-10 col-sm-push-2">
22 <h1>Library [% branchcode | html %] - [% Branches.GetName( branchcode ) | html %] Checkin and transfer policy</h1>
23 <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
24 <label for="branchselect">Select a library :</label>
25 <select name="branchcode" id="branchselect">
26 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
30 <p class="help">Check the boxes for the libraries you allow your items to be transferred to.</p>
32 [% IF ( limitType == 'ccode' ) %]<strong>For all collection codes: </strong>[% ELSE %]<strong>For all item types: </strong>[% END %]
33 <a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a>
35 <a id="UncheckAll" href="#"><i class="fa fa-remove"></i> Clear all</a>
37 <a href="/cgi-bin/koha/admin/transfer_limits.pl">Switch to advanced editor</a>
41 <div id="transferlimit_tabs" class="toptabs">
42 <ul class="ui-tabs-nav">
43 [% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code | uri %]set">[% codes_loo.code | html %]</a></li>[% END %]
46 <form method="post" action="branch_transfer_limits.pl">
48 [% FOREACH codes_loo IN codes_loop %]
49 <div id="[% codes_loo.code | html %]set">
50 <h4>Policy for [% codes_loo.limit_phrase | html %]: [% codes_loo.code | html %]</h4>
52 <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>
54 <table id="[% codes_loo.code | html %]table" class="sorted">
58 <th>Allow transfer?</th>
63 [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
65 <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>
67 [% IF ( to_branch_loo.isChecked ) %]
68 <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" />
70 <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 %]" />
80 <fieldset class="action">
81 <input type="hidden" name="updateLimits" value="1" />
82 <input type="hidden" name="branchcode" value="[% branchcode | html %]" />
83 <input type="submit" value="Save" />
84 <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
90 </div> <!-- /.col-sm-10.col-sm-push-2 -->
92 <div class="col-sm-2 col-sm-pull-10">
94 [% INCLUDE 'admin-menu.inc' %]
96 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
99 [% MACRO jsinclude BLOCK %]
100 [% Asset.js("js/admin-menu.js") | $raw %]
101 [% INCLUDE 'datatables.inc' %]
103 $(document).ready(function(){
104 $("#CheckAll").on("click", function(e){
106 $(".cb").each(function(){
107 $(this).prop("checked", true);
111 $("#UncheckAll").on("click", function(e){
113 $(".cb").each(function(){
114 $(this).prop("checked", false);
117 $('#transferlimit_tabs').tabs();
119 $('#branchselect').change(function() {
120 $('#selectlibrary').submit();
123 var checkall = $(".checkall");
124 var uncheckall = $(".uncheckall");
126 $(checkall).on("click", function(e){
128 var tid = $(this).data("cb");
129 $(".cb" + tid ).each(function(){
130 $(this).prop("checked", true);
134 $(uncheckall).on("click", function(e){
136 var tid = $(this).data("cb");
137 $(".cb" + tid ).each(function(){
138 $(this).prop("checked", false);
142 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
144 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
151 [% INCLUDE 'intranet-bottom.inc' %]