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 [% INCLUDE 'header.inc' %]
49 [% INCLUDE 'prefs-admin-search.inc' %]
51 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
54 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
57 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
60 <a href="#" aria-current="page">
61 Item circulation alerts
67 <div class="main container-fluid">
69 <div class="col-sm-10 col-sm-push-2">
72 <div class="col-sm-6">
73 <h1>Item circulation alerts</h1>
74 <h2>Select a library:</h2>
75 <form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
76 <select id="branch" name="branch">
77 <option value="*">Default</option>
78 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
80 <input type="submit" name="pick" value="Pick" />
83 <div class="col-sm-6">
85 <caption>Legend</caption>
94 <td width="100" class="default"> </td>
95 <td class="info">These are disabled for ALL libraries. To change these settings, choose the "Default" library.</td>
98 <td class="disabled"> </td>
99 <td class="info">These are disabled for the current library.</td>
103 <td class="info">These are enabled.</td>
107 </div> <!-- /.col-sm-6 -->
108 </div> <!-- /.row -->
110 <h2>Circulation alerts for [% Branches.GetName( branch ) || 'Default' | html %]</h2>
111 <p>Click on the grid to toggle the settings.</p>
113 <div id="alerttabs" class="toptabs">
115 <li><a href="#checkout">Checkout</a></li>
116 <li><a href="#checkin">Check-in</a></li>
121 <table class="grid active" width="100%">
125 [% FOREACH item_type IN item_types %]
126 <th>[% item_type.description | html %]</th>
131 [% FOREACH grid_checkou IN grid_checkout %]
133 <th>[% grid_checkou.description | html %]</th>
134 [% FOREACH item IN grid_checkou.items %]
135 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
145 <table class="grid active" width="100%">
149 [% FOREACH item_type IN item_types %]
150 <th>[% item_type.description | html %]</th>
155 [% FOREACH grid_checki IN grid_checkin %]
157 <th>[% grid_checki.description | html %]</th>
158 [% FOREACH item IN grid_checki.items %]
159 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
169 </div> <!-- /.col-sm-10.col-sm-push-2 -->
171 <div class="col-sm-2 col-sm-pull-10">
173 [% INCLUDE 'admin-menu.inc' %]
175 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
176 </div> <!-- /.row -->
178 [% MACRO jsinclude BLOCK %]
179 [% Asset.js("js/admin-menu.js") | $raw %]
181 var $branch = "[% branch | html %]";
183 $('#alerttabs').tabs();
185 var blocked = _("Blocked!");
186 var saving = _("Saving...");
187 var disabledForAll = _("Disabled for all");
188 var disabledForCurrent = _("Disabled for %s").format($branch);
190 $('#branch_selector input:submit').hide();
191 $('#branch').change(function(){
192 $('#branch_selector').submit();
195 $('table.grid.active tbody td').click(function(ev){
198 if (td.hasClass('default') && $branch != '*') {
201 function(){ td.html(disabledForAll) },
207 url : '/cgi-bin/koha/admin/item_circulation_alerts.pl',
210 data : { action: 'toggle', id: id, branch: $branch },
211 success : function(response){
212 if ($branch == '*' && response.classes.match(/default/)) {
213 td.html(disabledForAll);
214 } else if (response.classes.match(/disabled/)) {
215 td.html(disabledForCurrent);
219 td.attr('class', response.classes);
228 [% INCLUDE 'intranet-bottom.inc' %]