Merge branch 'bug_9933' into 3.14-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branch_transfer_limits.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; Library checkin and transfer policy</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6 [% INCLUDE 'datatables-strings.inc' %]
7 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
8 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11         $(document).ready(function(){
12         $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; });
13         $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes(); return false; });
14         $('#transferlimit_tabs').tabs();
15
16                  $('#branchselect').change(function() {
17                     $('#selectlibrary').submit();
18                  });
19
20                 var checkall = $(".checkall");
21                 var uncheckall = $(".uncheckall");
22
23                 $(checkall).click(function(){
24                         var tid = $(this).attr("id");
25                         tid = tid.replace("CheckAll","");
26                         $("#"+tid).checkCheckboxes();
27                         return false;
28                 });
29
30                 $(uncheckall).click(function(){
31                         var tid = $(this).attr("id");
32                         tid = tid.replace("UncheckAll","");
33                         $("#"+tid).unCheckCheckboxes();
34                         return false;
35                 });
36         $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
37             "aoColumnDefs": [
38                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
39             ],
40             "iDisplayLength": 20,
41             "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
42             "sPaginationType": "four_button"
43         }));
44         });
45 //]]>
46 </script>
47 <style type="text/css">td { text-align: center; } .sorted { min-width: 50%; }</style>
48 </head>
49 <body id="admin_branch_transfer_limits" class="admin">
50 [% INCLUDE 'header.inc' %]
51 [% INCLUDE 'cat-search.inc' %]
52
53 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Set library checkin and transfer policy</div>
54
55 <div id="doc3" class="yui-t1">
56
57 <div id="bd">
58      <div id="yui-main">
59     <div class="yui-b">
60
61 <h1>Library [% branchcode %] - [% branchname %] Checkin and transfer policy</h1>
62     <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
63         <label for="branchselect">Select a library :</label>
64             <select name="branchcode" id="branchselect">
65                 [% FOREACH branch_loo IN branch_loop %]
66                         [% IF ( branch_loo.selected ) %]
67                 <option value="[% branch_loo.value %]" selected="selected">[% branch_loo.branchname %]</option>
68             [% ELSE %]
69                 <option value="[% branch_loo.value %]">[% branch_loo.branchname %]</option>
70             [% END %]
71                 [% END %]
72             </select>
73             <input type="submit" value="Choose" />          
74     </form>
75
76 <p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
77 <fieldset>For <strong>all</strong> [% limit_phrase %]s: <a id="CheckAll" href="#">Check all</a> | <a id="UncheckAll" href="#">Uncheck all</a></fieldset>
78
79
80   <div id="transferlimit_tabs" class="toptabs">
81         <ul class="ui-tabs-nav">
82       [% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code %]set">[% codes_loo.code %]</a></li>[% END %]
83         </ul>
84
85                 <form method="post" action="branch_transfer_limits.pl">
86
87         [% FOREACH codes_loo IN codes_loop %]
88         <div id="[% codes_loo.code %]set">
89                 <h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4>
90     <p><a id="CheckAll[% codes_loo.code %]table" class="checkall" href="#">Check all</a> | <a id="UncheckAll[% codes_loo.code %]table" class="uncheckall" href="#">Uncheck all</a></p>
91         
92                 <table id="[% codes_loo.code %]table" class="sorted">
93                         <thead>
94                                 <tr>
95                                     <th>Library</th>
96                                     <th>Allow transfer?</th>
97                                 </tr>
98                         </thead>
99
100                         <tbody>
101                                         [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
102                                                 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
103                                                         <td><label style="min-width:400px;" for="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row">[% to_branch_loo.toBranch %] - [% to_branch_loo.toBranchname %]</label></td>
104                                                         <td>
105                                                         [% IF ( to_branch_loo.isChecked ) %]
106                                                                 <input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" checked="checked" />
107                                                         [% ELSE %]
108                                                                 <input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" />
109                                                         [% END %]
110                                                         </td>
111                                                 </tr>
112                                         [% END %]
113                         </tbody>
114                 </table>
115                 </div>
116                                 [% END %]
117                 
118                 <fieldset class="action">
119                     <input type="hidden" name="updateLimits" value="1" />
120                     <input type="hidden" name="branchcode" value="[% branchcode %]" />
121                     <input type="submit" value="Save" /> 
122                     <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
123                 </fieldset>
124                 </form>
125                 </div>
126   </div>
127 </div>
128 <div class="yui-b">
129   [% INCLUDE 'admin-menu.inc' %]
130 </div>
131 </div>
132 [% INCLUDE 'intranet-bottom.inc' %]