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' %]
49 <nav aria-label="Breadcrumb" class="breadcrumb">
52 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
55 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
58 <a href="#" aria-current="page">
59 Item circulation alerts
65 <div class="main container-fluid">
67 <div class="col-sm-10 col-sm-push-2">
70 <div class="col-sm-6">
71 <h1>Item circulation alerts</h1>
72 <h2>Select a library:</h2>
73 <form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
74 <select id="branch" name="branch">
75 <option value="*">Default</option>
76 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
78 <input type="submit" name="pick" value="Pick" />
81 <div class="col-sm-6">
83 <caption>Legend</caption>
92 <td width="100" class="default"> </td>
93 <td class="info">These are disabled for ALL libraries. To change these settings, choose the "Default" library.</td>
96 <td class="disabled"> </td>
97 <td class="info">These are disabled for the current library.</td>
101 <td class="info">These are enabled.</td>
105 </div> <!-- /.col-sm-6 -->
106 </div> <!-- /.row -->
108 <h2>Circulation alerts for [% Branches.GetName( branch ) || 'Default' | html %]</h2>
109 <p>Click on the grid to toggle the settings.</p>
111 <div id="alerttabs" class="toptabs">
113 <li><a href="#checkout">Checkout</a></li>
114 <li><a href="#checkin">Check-in</a></li>
119 <table class="grid active" width="100%">
123 [% FOREACH item_type IN item_types %]
124 <th>[% item_type.description | html %]</th>
129 [% FOREACH grid_checkou IN grid_checkout %]
131 <th>[% grid_checkou.description | html %]</th>
132 [% FOREACH item IN grid_checkou.items %]
133 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
143 <table class="grid active" width="100%">
147 [% FOREACH item_type IN item_types %]
148 <th>[% item_type.description | html %]</th>
153 [% FOREACH grid_checki IN grid_checkin %]
155 <th>[% grid_checki.description | html %]</th>
156 [% FOREACH item IN grid_checki.items %]
157 <td class="[% item.class | html %]" id="[% item.id | html %]">[% item.text | html %]</td>
167 </div> <!-- /.col-sm-10.col-sm-push-2 -->
169 <div class="col-sm-2 col-sm-pull-10">
171 [% INCLUDE 'admin-menu.inc' %]
173 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
174 </div> <!-- /.row -->
176 [% MACRO jsinclude BLOCK %]
177 [% Asset.js("js/admin-menu.js") | $raw %]
179 var $branch = "[% branch | html %]";
181 $('#alerttabs').tabs();
183 var blocked = _("Blocked!");
184 var saving = _("Saving...");
185 var disabledForAll = _("Disabled for all");
186 var disabledForCurrent = _("Disabled for %s").format($branch);
188 $('#branch_selector input:submit').hide();
189 $('#branch').change(function(){
190 $('#branch_selector').submit();
193 $('table.grid.active tbody td').click(function(ev){
196 if (td.hasClass('default') && $branch != '*') {
199 function(){ td.html(disabledForAll) },
205 url : '/cgi-bin/koha/admin/item_circulation_alerts.pl',
208 data : { action: 'toggle', id: id, branch: $branch },
209 success : function(response){
210 if ($branch == '*' && response.classes.match(/default/)) {
211 td.html(disabledForAll);
212 } else if (response.classes.match(/disabled/)) {
213 td.html(disabledForCurrent);
217 td.attr('class', response.classes);
226 [% INCLUDE 'intranet-bottom.inc' %]