Brand New UI for Alert Configuration
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / item_circulation_alerts.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Item Circulation Alerts</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <style>
5 div.circulation-alert h2 {
6   margin-top: 1.5em;
7 }
8 div.circulation-alert h3 {
9   margin-top: 1em;
10 }
11
12 table.grid thead th {
13   vertical-align: bottom;
14 }
15
16 table.grid tbody th {
17   text-align: right;
18 }
19
20 table.grid tbody td.info {
21   background: #fff;
22 }
23
24 table.grid.active tbody td {
25   width: 10%;
26   cursor: pointer;
27 }
28
29 table.grid tbody td {
30   background: #cfc;
31   color: #111;
32 }
33
34 table.grid td.disabled {
35   background: #fcc;
36 }
37
38 table.grid td.default {
39   background: #f88;
40 }
41 </style>
42 <script>
43 var $branch = "<!-- TMPL_VAR NAME="branch" -->";
44 $(function(){
45
46     $('#branch_selector input:submit').hide();
47     $('#branch').change(function(){
48         $('#branch_selector').submit();
49     });
50
51     $('table.grid.active tbody td').click(function(ev){
52         var id = this.id;
53         var td = $(this);
54         if (td.hasClass('default') && $branch != '*') {
55             td.html(_('Blocked'));
56         } else {
57             td.html(_('Saving...'));
58             $.ajax({
59                 url      : '/cgi-bin/koha/admin/item_circulation_alerts.pl',
60                 type     : 'POST',
61                 dataType : 'json',
62                 data     : { action: 'toggle', id: id, branch: $branch },
63                 success  : function(response){
64                     td.html(' ');
65                     td.attr('class', response.class);
66                 }
67             });
68         }
69     });
70
71 });
72 </script>
73 </head>
74 <body>
75 <!-- TMPL_INCLUDE NAME="header.inc" -->
76 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
77 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Item Circulation Alerts </div>
78
79 <div id="doc3" class="yui-t1">
80
81 <div id="bd">
82
83 <div id="yui-main" class="circulation-alert">
84 <div class="yui-b">
85 <h1>Item Circulation Alerts</h1>
86
87
88 <h2>Select a library:</h2>
89 <form id="branch_selector" method="GET">
90 <select id="branch" name="branch">
91 <!-- TMPL_LOOP NAME="branches" -->
92 <!-- TMPL_IF NAME="selected" -->
93 <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
94 <!-- TMPL_ELSE -->
95 <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
96 <!-- /TMPL_IF -->
97 <!-- /TMPL_LOOP -->
98 </select>
99 <input type="submit" name="pick" value="Pick" />
100 </form>
101
102
103 <h2>Circulation Alerts for <!-- TMPL_VAR NAME="branch_name" --></h2>
104 <p>Click on the grid to toggle the settings.</p>
105
106 <h3>Checkout</h3>
107 <table class="grid active" width="100%">
108 <thead>
109 <tr>
110   <th>&nbsp;</th>
111   <!-- TMPL_LOOP NAME="item_types" -->
112   <th><!-- TMPL_VAR NAME="br_description" --></th>
113   <!-- /TMPL_LOOP -->
114 </tr>
115 </thead>
116 <tbody>
117 <!-- TMPL_LOOP NAME="grid_checkout" -->
118 <tr>
119   <th><!-- TMPL_VAR NAME="description" --></th>
120   <!-- TMPL_LOOP NAME="items" -->
121   <td class="<!-- TMPL_VAR NAME="class" -->" id="<!-- TMPL_VAR NAME="id" -->">&nbsp;</td>
122   <!-- /TMPL_LOOP -->
123 </tr>
124 <!-- /TMPL_LOOP -->
125 </tbody>
126 </table>
127
128 <h3>Check-in</h3>
129 <table class="grid active" width="100%">
130 <thead>
131 <tr>
132   <th>&nbsp;</th>
133   <!-- TMPL_LOOP NAME="item_types" -->
134   <th><!-- TMPL_VAR NAME="br_description" --></th>
135   <!-- /TMPL_LOOP -->
136 </tr>
137 </thead>
138 <tbody>
139 <!-- TMPL_LOOP NAME="grid_checkin" -->
140 <tr>
141   <th><!-- TMPL_VAR NAME="description" --></th>
142   <!-- TMPL_LOOP NAME="items" -->
143   <td class="<!-- TMPL_VAR NAME="class" -->" id="<!-- TMPL_VAR NAME="id" -->">&nbsp;</td>
144   <!-- /TMPL_LOOP -->
145 </tr>
146 <!-- /TMPL_LOOP -->
147 </tbody>
148 </table>
149
150 <h3>Legend</h3>
151 <table class="grid">
152 <thead>
153   <th>Color</th>
154   <th>Meaning</th>
155 </thead>
156 <tbody>
157   <tr>
158     <td width="100" class="default">&nbsp;</td>
159     <td class="info">These are disabled for ALL libraries.  To change these settings, choose the "Default" library.</td>
160   </tr>
161   <tr>
162     <td class="disabled">&nbsp;</td>
163     <td class="info">These are disabled for the current library.</td>
164   </tr>
165   <tr>
166     <td class="">&nbsp;</td>
167     <td class="info">These are enabled.</td>
168   </tr>
169 </tbody>
170 </table>
171
172
173 </div>
174 </div>
175
176 <div class="yui-b">
177 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
178 </div>
179 </div>
180 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->