5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Item circulation alerts › Administration › Koha</title>
7 [% INCLUDE 'doc-head-close.inc' %]
11 vertical-align: bottom;
22 table.grid tbody td.info {
23 background-color: #fff !important;
26 table.grid.active tbody td {
32 background-color: #cfc !important;
36 table.grid td.disabled {
37 background-color: #fcc !important;
40 table.grid td.default {
41 background-color: #f88 !important;
47 <body id="admin_item_circulation_alerts" class="admin">
48 [% WRAPPER 'header.inc' %]
49 [% INCLUDE 'prefs-admin-search.inc' %]
52 [% WRAPPER 'sub-header.inc' %]
53 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
56 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
59 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
62 <a href="#" aria-current="page">
63 Item circulation alerts
70 <div class="main container-fluid">
72 <div class="col-sm-10 col-sm-push-2">
75 <div class="col-sm-6">
76 <h1>Item circulation alerts</h1>
77 <h2>Select a library:</h2>
78 <form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
79 <select id="branch" name="branch">
80 <option value="*">Default</option>
81 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
83 <input type="submit" name="pick" value="Pick" />
86 <div class="col-sm-6">
88 <caption>Legend</caption>
97 <td width="100" class="default"> </td>
98 <td class="info">These are disabled for ALL libraries. To change these settings, choose the "Default" library.</td>
101 <td class="disabled"> </td>
102 <td class="info">These are disabled for the current library.</td>
106 <td class="info">These are enabled.</td>
110 </div> <!-- /.col-sm-6 -->
111 </div> <!-- /.row -->
113 <h2>Circulation alerts for [% Branches.GetName( branch ) || 'Default' | html %]</h2>
114 <p>Click on the grid to toggle the settings.</p>
117 <div id="alerttabs" class="toptabs">
119 <ul class="nav nav-tabs" role="tablist">
120 <li role="presentation" class="active"><a href="#checkout" aria-controls="checkout" role="tab" data-toggle="tab">Checkout</a></li>
121 <li role="presentation"><a href="#checkin" aria-controls="checkin" role="tab" data-toggle="tab">Check-in</a></li>
124 <div class="tab-content">
125 <div role="tabpanel" class="tab-pane active" id="checkout">
127 <table class="grid active" width="100%">
131 [% FOREACH item_type IN item_types %]
132 <th>[% item_type.description | html %]</th>
137 [% FOREACH grid_checkou IN grid_checkout %]
139 <th>[% grid_checkou.description | html %]</th>
140 [% FOREACH item IN grid_checkou.items %]
141 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
146 </table> <!-- /.grid.active -->
147 </div> <!-- /#checkout -->
149 <div role="tabpanel" class="tab-pane" id="checkin">
151 <table class="grid active" width="100%">
155 [% FOREACH item_type IN item_types %]
156 <th>[% item_type.description | html %]</th>
161 [% FOREACH grid_checki IN grid_checkin %]
163 <th>[% grid_checki.description | html %]</th>
164 [% FOREACH item IN grid_checki.items %]
165 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
172 </div> <!-- /.tab-content -->
174 </div> <!-- /#alerttabs -->
178 </div> <!-- /.col-sm-10.col-sm-push-2 -->
180 <div class="col-sm-2 col-sm-pull-10">
182 [% INCLUDE 'admin-menu.inc' %]
184 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
185 </div> <!-- /.row -->
187 [% MACRO jsinclude BLOCK %]
188 [% Asset.js("js/admin-menu.js") | $raw %]
190 var $branch = "[% branch | html %]";
193 var blocked = _("Blocked!");
194 var saving = _("Saving...");
195 var disabledForAll = _("Disabled for all");
196 var disabledForCurrent = _("Disabled for %s").format($branch);
198 $('#branch_selector input:submit').hide();
199 $('#branch').change(function(){
200 $('#branch_selector').submit();
203 $('table.grid.active tbody td').click(function(ev){
206 if (td.hasClass('default') && $branch != '*') {
209 function(){ td.html(disabledForAll) },
215 url : '/cgi-bin/koha/admin/item_circulation_alerts.pl',
218 data : { action: 'toggle', id: id, branch: $branch },
219 success : function(response){
220 if ($branch == '*' && response.classes.match(/default/)) {
221 td.html(disabledForAll);
222 } else if (response.classes.match(/disabled/)) {
223 td.html(disabledForCurrent);
227 td.attr('class', response.classes);
236 [% INCLUDE 'intranet-bottom.inc' %]