4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Administration › Item circulation alerts</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <style type="text/css">
9 vertical-align: bottom;
20 table.grid tbody td.info {
24 table.grid.active tbody td {
34 table.grid td.disabled {
38 table.grid td.default {
44 <body id="admin_item_circulation_alerts" class="admin">
45 [% INCLUDE 'header.inc' %]
46 [% INCLUDE 'prefs-admin-search.inc' %]
47 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Item circulation alerts </div>
49 <div id="doc3" class="yui-t1">
53 <div id="yui-main" class="circulation-alert">
57 <div class="yui-u first">
58 <h1>Item circulation alerts</h1>
59 <h2>Select a library:</h2>
60 <form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
61 <select id="branch" name="branch">
62 <option value="*">Default</option>
63 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
65 <input type="submit" name="pick" value="Pick" />
70 <caption>Legend</caption>
79 <td width="100" class="default"> </td>
80 <td class="info">These are disabled for ALL libraries. To change these settings, choose the "Default" library.</td>
83 <td class="disabled"> </td>
84 <td class="info">These are disabled for the current library.</td>
88 <td class="info">These are enabled.</td>
95 <h2>Circulation alerts for [% Branches.GetName( branch ) || 'Default' %]</h2>
96 <p>Click on the grid to toggle the settings.</p>
98 <div id="alerttabs" class="toptabs">
100 <li><a href="#checkout">Checkout</a></li>
101 <li><a href="#checkin">Check-in</a></li>
106 <table class="grid active" width="100%">
110 [% FOREACH item_type IN item_types %]
111 <th>[% item_type.description %]</th>
116 [% FOREACH grid_checkou IN grid_checkout %]
118 <th>[% grid_checkou.description %]</th>
119 [% FOREACH item IN grid_checkou.items %]
120 <td class="[% item.class %]" id="[% item.id %]">[% item.text %]</td>
130 <table class="grid active" width="100%">
134 [% FOREACH item_type IN item_types %]
135 <th>[% item_type.description %]</th>
140 [% FOREACH grid_checki IN grid_checkin %]
142 <th>[% grid_checki.description %]</th>
143 [% FOREACH item IN grid_checki.items %]
144 <td class="[% item.class %]" id="[% item.id %]">[% item.text %]</td>
157 [% INCLUDE 'admin-menu.inc' %]
161 [% MACRO jsinclude BLOCK %]
162 [% Asset.js("js/admin-menu.js") %]
163 <script type="text/javascript">
164 var $branch = "[% branch %]";
166 $('#alerttabs').tabs();
168 var blocked = _("Blocked!");
169 var saving = _("Saving...");
170 var disabledForAll = _("Disabled for all");
171 var disabledForCurrent = _("Disabled for %s").format($branch);
173 $('#branch_selector input:submit').hide();
174 $('#branch').change(function(){
175 $('#branch_selector').submit();
178 $('table.grid.active tbody td').click(function(ev){
181 if (td.hasClass('default') && $branch != '*') {
184 function(){ td.html(disabledForAll) },
190 url : '/cgi-bin/koha/admin/item_circulation_alerts.pl',
193 data : { action: 'toggle', id: id, branch: $branch },
194 success : function(response){
195 if ($branch == '*' && response.classes.match(/default/)) {
196 td.html(disabledForAll);
197 } else if (response.classes.match(/disabled/)) {
198 td.html(disabledForCurrent);
202 td.attr('class', response.classes);
211 [% INCLUDE 'intranet-bottom.inc' %]