Bug 12904: Force browser to load new javascript files after upgrade
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branch_transfer_limits.tt
1 [% USE Branches %]
2 [% SET footerjs = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Administration &rsaquo; Library checkin and transfer policy</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
7 <style type="text/css">td { text-align: center; } .sorted { min-width: 50%; }</style>
8 </head>
9
10 <body id="admin_branch_transfer_limits" class="admin">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'prefs-admin-search.inc' %]
13
14 <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>
15
16 <div id="doc3" class="yui-t1">
17
18 <div id="bd">
19      <div id="yui-main">
20     <div class="yui-b">
21
22 <h1>Library [% branchcode %] - [% Branches.GetName( branchcode ) %] 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 ) %]
27         </select>
28     </form>
29
30 <p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
31 <fieldset>[% IF ( limitType == 'ccode' ) %]<strong>For all collection codes: </strong>[% ELSE %]<strong>For all item types: </strong>[% END %]<a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll" href="#"><i class="fa fa-remove"></i> Clear all</a></fieldset>
32
33
34   <div id="transferlimit_tabs" class="toptabs">
35         <ul class="ui-tabs-nav">
36       [% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code %]set">[% codes_loo.code %]</a></li>[% END %]
37         </ul>
38
39                 <form method="post" action="branch_transfer_limits.pl">
40
41         [% FOREACH codes_loo IN codes_loop %]
42         <div id="[% codes_loo.code %]set">
43                 <h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4>
44     <p><a id="CheckAll[% codes_loo.code %]table" class="checkall" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll[% codes_loo.code %]table" class="uncheckall" href="#"><i class="fa fa-remove"></i> Clear all</a></p>
45         
46                 <table id="[% codes_loo.code %]table" class="sorted">
47                         <thead>
48                                 <tr>
49                                     <th>Library</th>
50                                     <th>Allow transfer?</th>
51                                 </tr>
52                         </thead>
53
54                         <tbody>
55                                         [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
56                         <tr>
57                             <td><label style="min-width:400px;" for="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row">[% to_branch_loo.toBranch %] - [% Branches.GetName( to_branch_loo.toBranch ) %]</label></td>
58                                                         <td>
59                                                         [% IF ( to_branch_loo.isChecked ) %]
60                                                                 <input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" checked="checked" />
61                                                         [% ELSE %]
62                                                                 <input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" />
63                                                         [% END %]
64                                                         </td>
65                                                 </tr>
66                                         [% END %]
67                         </tbody>
68                 </table>
69                 </div>
70                                 [% END %]
71                 
72                 <fieldset class="action">
73                     <input type="hidden" name="updateLimits" value="1" />
74                     <input type="hidden" name="branchcode" value="[% branchcode %]" />
75                     <input type="submit" value="Save" /> 
76                     <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
77                 </fieldset>
78                 </form>
79                 </div>
80   </div>
81 </div>
82 <div class="yui-b">
83   [% INCLUDE 'admin-menu.inc' %]
84 </div>
85 </div>
86
87 [% MACRO jsinclude BLOCK %]
88     <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
89     [% INCLUDE 'datatables.inc' %]
90     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
91     <script type="text/javascript">
92         $(document).ready(function(){
93             $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; });
94             $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes(); return false; });
95             $('#transferlimit_tabs').tabs();
96
97              $('#branchselect').change(function() {
98                 $('#selectlibrary').submit();
99              });
100
101             var checkall = $(".checkall");
102             var uncheckall = $(".uncheckall");
103
104             $(checkall).click(function(){
105                 var tid = $(this).attr("id");
106                 tid = tid.replace("CheckAll","");
107                 $("#"+tid).checkCheckboxes();
108                 return false;
109             });
110
111             $(uncheckall).click(function(){
112                 var tid = $(this).attr("id");
113                 tid = tid.replace("UncheckAll","");
114                 $("#"+tid).unCheckCheckboxes();
115                 return false;
116             });
117             $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
118                 "aoColumnDefs": [
119                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
120                 ],
121                 'bPaginate': false
122             }));
123         });
124     </script>
125 [% END %]
126 [% INCLUDE 'intranet-bottom.inc' %]