5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › Item circulation alerts</title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 vertical-align: bottom;
21 table.grid tbody td.info {
25 table.grid.active tbody td {
35 table.grid td.disabled {
39 table.grid td.default {
45 <body id="admin_item_circulation_alerts" class="admin">
46 [% INCLUDE 'header.inc' %]
47 [% INCLUDE 'prefs-admin-search.inc' %]
48 <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>
50 <div class="main container-fluid">
52 <div class="col-sm-10 col-sm-push-2">
55 <div class="col-sm-6">
56 <h1>Item circulation alerts</h1>
57 <h2>Select a library:</h2>
58 <form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
59 <select id="branch" name="branch">
60 <option value="*">Default</option>
61 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
63 <input type="submit" name="pick" value="Pick" />
66 <div class="col-sm-6">
68 <caption>Legend</caption>
77 <td width="100" class="default"> </td>
78 <td class="info">These are disabled for ALL libraries. To change these settings, choose the "Default" library.</td>
81 <td class="disabled"> </td>
82 <td class="info">These are disabled for the current library.</td>
86 <td class="info">These are enabled.</td>
90 </div> <!-- /.col-sm-6 -->
93 <h2>Circulation alerts for [% Branches.GetName( branch ) || 'Default' | html %]</h2>
94 <p>Click on the grid to toggle the settings.</p>
96 <div id="alerttabs" class="toptabs">
98 <li><a href="#checkout">Checkout</a></li>
99 <li><a href="#checkin">Check-in</a></li>
104 <table class="grid active" width="100%">
108 [% FOREACH item_type IN item_types %]
109 <th>[% item_type.description | html %]</th>
114 [% FOREACH grid_checkou IN grid_checkout %]
116 <th>[% grid_checkou.description | html %]</th>
117 [% FOREACH item IN grid_checkou.items %]
118 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
128 <table class="grid active" width="100%">
132 [% FOREACH item_type IN item_types %]
133 <th>[% item_type.description | html %]</th>
138 [% FOREACH grid_checki IN grid_checkin %]
140 <th>[% grid_checki.description | html %]</th>
141 [% FOREACH item IN grid_checki.items %]
142 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
152 </div> <!-- /.col-sm-10.col-sm-push-2 -->
154 <div class="col-sm-2 col-sm-pull-10">
156 [% INCLUDE 'admin-menu.inc' %]
158 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
159 </div> <!-- /.row -->
161 [% MACRO jsinclude BLOCK %]
162 [% Asset.js("js/admin-menu.js") | $raw %]
164 var $branch = "[% branch | html %]";
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' %]