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