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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
18 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
24 <a href="#" aria-current="page">
25 Set library checkin and transfer policy
31 <div class="main container-fluid">
33 <div class="col-sm-10 col-sm-push-2">
36 <h1>Library [% branchcode | html %] - [% Branches.GetName( branchcode ) | html %] Checkin and transfer policy</h1>
37 <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
38 <label for="branchselect">Select a library :</label>
39 <select name="branchcode" id="branchselect">
40 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
44 <p class="help">Check the boxes for the libraries you allow your items to be transferred to.</p>
46 [% IF ( limitType == 'ccode' ) %]<strong>For all collection codes: </strong>[% ELSE %]<strong>For all item types: </strong>[% END %]
47 <a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a>
49 <a id="UncheckAll" href="#"><i class="fa fa-remove"></i> Clear all</a>
51 <a href="/cgi-bin/koha/admin/transfer_limits.pl">Switch to advanced editor</a>
55 <div id="transferlimit_tabs" class="toptabs">
56 <ul class="ui-tabs-nav">
57 [% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code | uri %]set">[% codes_loo.code | html %]</a></li>[% END %]
60 <form method="post" action="branch_transfer_limits.pl">
62 [% FOREACH codes_loo IN codes_loop %]
63 <div id="[% codes_loo.code | html %]set">
64 <h4>Policy for [% codes_loo.limit_phrase | html %]: [% codes_loo.code | html %]</h4>
66 <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>
68 <table id="[% codes_loo.code | html %]table" class="sorted">
72 <th>Allow transfer?</th>
77 [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
79 <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>
81 [% IF ( to_branch_loo.isChecked ) %]
82 <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" />
84 <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 %]" />
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" value="Save" />
98 <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
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);
131 $('#transferlimit_tabs').tabs();
133 $('#branchselect').change(function() {
134 $('#selectlibrary').submit();
137 var checkall = $(".checkall");
138 var uncheckall = $(".uncheckall");
140 $(checkall).on("click", function(e){
142 var tid = $(this).data("cb");
143 $(".cb" + tid ).each(function(){
144 $(this).prop("checked", true);
148 $(uncheckall).on("click", function(e){
150 var tid = $(this).data("cb");
151 $(".cb" + tid ).each(function(){
152 $(this).prop("checked", false);
156 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
158 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
165 [% INCLUDE 'intranet-bottom.inc' %]