IMPROVEMENT : reintroducing stopwords management
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbudget.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->Budgets &rsaquo; <!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" -->Budgets &rsaquo; Budget Data Recorded<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Budgets &rsaquo; Budget Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirm" -->Budgets &rsaquo; Delete Book Budget?<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <!-- TMPL_IF name="add_form" -->
6 <script type="text/javascript">
7 //<![CDATA[
8         //
9         function isNotNull(f,noalert) {
10                 if (f.value.length ==0) {
11    return false;
12                 }
13                 return true;
14         }
15         //
16         function toUC(f) {
17                 var x=f.value.toUpperCase();
18                 f.value=x;
19                 return true;
20         }
21         //
22         function isNum(v,maybenull) {
23         var n = new Number(v.value);
24         if (isNaN(n)) {
25                 return false;
26                 }
27         if (maybenull==0 && v.value=='') {
28                 return false;
29         }
30         return true;
31         }
32         //
33         function isDate(f) {
34                 var t = Date.parse(f.value);
35                 if (isNaN(t)) {
36                         return false;
37                 }
38         }
39         //
40         function Check(f) {
41                 var ok=1;
42                 var _alertString="";
43                 var alertString2;
44                 if (f.bookfundid.value.length==0) {
45                         _alertString += "- bookfundid missing\n";
46                 }
47                 if (!(isNotNull(window.document.Aform.budgetamount,1))) {
48                         _alertString += "- Budget missing\n";
49                 }
50                 if (_alertString.length==0) {
51                         document.Aform.submit();
52                 } else {
53                         alertString2 = "Form not submitted because of the following problem(s)\n";
54                         alertString2 += "------------------------------------------------------------------------------------\n\n";
55                         alertString2 += _alertString;
56                         alert(alertString2);
57                 }
58         }
59 //]]>
60 </script>
61 <!-- /TMPL_IF -->
62 </head>
63 <body>
64 <!-- TMPL_INCLUDE NAME="header.inc" -->
65 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
66
67 <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; <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; <!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Budget Data Recorded<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Budget Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirm" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Delete Book Budget?<!-- /TMPL_IF --></div>
68
69 <div id="doc3" class="yui-t2">
70    
71    <div id="bd">
72         <div id="yui-main">
73         <div class="yui-b">
74
75
76 <!-- TMPL_IF NAME="add_validate" -->
77   <ul id="_informations"><li>Budget Data Recorded, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li></ul>
78 <!-- /TMPL_IF --> <!-- add_validate -->
79
80 <!-- TMPL_IF name="delete_confirmed" -->
81   <ul id="_informations"><li>Budget deleted, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li></ul>
82 <!-- /TMPL_IF --> <!-- delete_confirmed -->
83
84
85 <!-- TMPL_IF name="else" -->
86 <h1>Budgets</h1>
87
88 <form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
89 <table>
90   <tr>
91     <th>Book fund</th>
92     <th>Branch</th>
93     <th>Start date</th>
94     <th>End date</th>
95     <th>Budget amount</th>
96     <th>Actions</th>
97   </tr>
98
99   <tr class="filter">
100     <td>
101       <select name="filter_bookfundid">
102         <option value="">----</option>
103     <!-- TMPL_LOOP name="filter_bookfundids" -->
104       <!-- TMPL_IF NAME="selected" -->
105         <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
106       <!-- TMPL_ELSE -->
107         <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
108       <!-- /TMPL_IF -->
109     <!-- /TMPL_LOOP -->
110       </select>
111     </td>
112     <td>
113       <select name="filter_branchcode">
114         <option value="">----</option>
115     <!-- TMPL_LOOP name="filter_branches" -->
116       <!-- TMPL_IF NAME="selected" -->
117         <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
118       <!-- TMPL_ELSE -->
119         <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
120       <!-- /TMPL_IF -->
121     <!-- /TMPL_LOOP -->
122       </select>
123     </td>
124     <td>
125       <select name="filter_startdate_sign">
126     <!-- TMPL_IF NAME="filter_startdate_sign_equal_selected" -->
127         <option value="=" selected="selected">=</option>
128     <!-- TMPL_ELSE -->
129         <option value="=">=</option>
130     <!-- /TMPL_IF -->
131
132     <!-- TMPL_IF NAME="filter_startdate_sign_superior_selected" -->
133         <option value="&gt;=" selected="selected">&gt;=</option>
134     <!-- TMPL_ELSE -->
135         <option value="&gt;=">&gt;=</option>
136     <!-- /TMPL_IF -->
137
138     <!-- TMPL_IF NAME="filter_startdate_sign_inferior_selected" -->
139         <option value="&lt;=" selected="selected">&lt;=</option>
140     <!-- TMPL_ELSE -->
141         <option value="&lt;=">&lt;=</option>
142     <!-- /TMPL_IF -->
143       </select>
144       <input type="text" size="10" id="filter_startdate" name="filter_startdate" value="<!-- TMPL_VAR Name="filter_startdate" -->" />
145       <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_startdate_button" alt="Show Calendar" />
146       <script type="text/javascript">
147 //<![CDATA[
148         Calendar.setup(
149           {
150             inputField : "filter_startdate",
151             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
152             button : "filter_startdate_button"
153           }
154         );
155       //]]>
156 </script>
157     </td>
158     <td>
159       <select name="filter_enddate_sign">
160     <!-- TMPL_IF NAME="filter_enddate_sign_equal_selected" -->
161         <option value="=" selected="selected">=</option>
162     <!-- TMPL_ELSE -->
163         <option value="=">=</option>
164     <!-- /TMPL_IF -->
165
166     <!-- TMPL_IF NAME="filter_enddate_sign_superior_selected" -->
167         <option value="&gt;=" selected="selected">&gt;=</option>
168     <!-- TMPL_ELSE -->
169         <option value="&gt;=">&gt;=</option>
170     <!-- /TMPL_IF -->
171
172     <!-- TMPL_IF NAME="filter_enddate_sign_inferior_selected" -->
173         <option value="&lt;=" selected="selected">&lt;=</option>
174     <!-- TMPL_ELSE -->
175         <option value="&lt;=">&lt;=</option>
176     <!-- /TMPL_IF -->
177       </select>
178       <input type="text" size="8" maxlength="10" id="filter_enddate" name="filter_enddate" value="<!-- TMPL_VAR Name="filter_enddate" -->" />
179       <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_enddate_button" alt="Show Calendar" />
180       <script type="text/javascript">
181 //<![CDATA[
182         Calendar.setup(
183           {
184             inputField : "filter_enddate",
185             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
186             button : "filter_enddate_button"
187           }
188         );
189       //]]>
190 </script>
191     </td>
192     <td>
193       <select name="filter_amount_sign">
194     <!-- TMPL_IF NAME="filter_amount_sign_equal_selected" -->
195         <option value="=" selected="selected">=</option>
196     <!-- TMPL_ELSE -->
197         <option value="=">=</option>
198     <!-- /TMPL_IF -->
199
200     <!-- TMPL_IF NAME="filter_amount_sign_superior_selected" -->
201         <option value="&gt;=" selected="selected">&gt;=</option>
202     <!-- TMPL_ELSE -->
203         <option value="&gt;=">&gt;=</option>
204     <!-- /TMPL_IF -->
205
206     <!-- TMPL_IF NAME="filter_amount_sign_inferior_selected" -->
207         <option value="&lt;=" selected="selected">&lt;=</option>
208     <!-- TMPL_ELSE -->
209         <option value="&lt;=">&lt;=</option>
210     <!-- /TMPL_IF -->
211       </select>
212       <input type="text" name="filter_amount" value="<!-- TMPL_VAR NAME="filter_amount" -->" size="8" />
213     </td>
214     <td>
215       <input type="submit" name="filter" value="Filter" />
216     </td>
217   </tr>
218   
219   <!-- TMPL_LOOP name="budget" -->
220     <!-- TMPL_IF NAME="toggle" -->
221   <tr class="highlight">
222     <!-- TMPL_ELSE -->
223   <tr>
224     <!-- /TMPL_IF -->
225     <td><!-- TMPL_VAR NAME="bookfundid" --></td>
226     <td><!-- TMPL_VAR NAME="branchname" --></td>
227     <td><!-- TMPL_VAR NAME="startdate" --></td>
228     <td><!-- TMPL_VAR NAME="enddate" --></td>
229     <td><!-- TMPL_VAR NAME="budgetamount" --></td>
230     <td>
231       <a href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Edit</a>
232       <a href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Delete</a>
233     </td>
234   </tr>
235   <!-- /TMPL_LOOP --> <!-- budget -->
236 </table>
237 </form>
238
239 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
240 <!-- /TMPL_IF --> <!-- else -->
241
242 <!-- TMPL_IF name="add_form" -->
243
244 <form action="/cgi-bin/koha/admin/aqbudget.pl" name="Aform" method="post">
245   <fieldset>
246     <legend><!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> budget</legend>
247     <input type="hidden" name="op" value="add_validate" />
248     <input type="hidden" name="checked" value="0" />
249
250     <table>
251       <tr>
252         <th>Book fund</th>
253         <td>
254           <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" />
255           <!-- TMPL_VAR NAME="bookfundname" -->
256         </td>
257       </tr>
258
259       <tr>
260         <th>
261           <label for="startdate">Start date (<!-- TMPL_VAR NAME="dateformat" -->)</label>
262         </th>
263         <td>
264           <input type="text" size="8" maxlength="10" id="startdate" name="startdate" value="<!-- TMPL_VAR Name="startdate" -->" />
265           <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="startdate_button" alt="Show Calendar" />
266           <script type="text/javascript">
267 //<![CDATA[
268             Calendar.setup(
269               {
270                 inputField : "startdate",
271                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
272                 button : "startdate_button"
273               }
274             );
275           //]]>
276 </script>
277         </td>
278       </tr>
279       <tr>
280         <th>
281           <label for="enddate">End date (<!-- TMPL_VAR NAME="dateformat" -->)</label>
282         </th>
283         <td>
284           <input type="text" size="8" maxlength="10" id="enddate" name="enddate" value="<!-- TMPL_VAR Name="enddate" -->" />
285           <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="enddate_button" alt="Show Calendar" />
286           <script type="text/javascript">
287 //<![CDATA[
288             Calendar.setup(
289               {
290                 inputField : "enddate",
291                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
292                 button : "enddate_button"
293               }
294             );
295           //]]>
296 </script>
297         </td>
298       </tr>
299       <tr>
300         <th>
301           <label for="budgetamount">Budget amount</label>
302         </th>
303         <td>
304           <input type="text" name="budgetamount" id="budgetamount" value="<!-- TMPL_VAR NAME="budgetamount" -->" size="8" />
305         </td>
306       </tr>
307       <tr>
308         <th>
309           <label for="branch">Branch</label>
310         </th>
311         <td>
312   <!-- TMPL_IF NAME="disable_branchselection" -->
313           <!-- Pierrick's note: I've found that a disabled select was not -->
314           <!-- giving its value to Perl :-/ So I use a hidden field trick -->
315           <input type="hidden" name="branch" id="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
316           <select name="branch" disabled="disabled">
317   <!-- TMPL_ELSE -->
318           <select name="branch">
319   <!-- /TMPL_IF -->
320
321             <option value="">----</option>
322   <!-- TMPL_LOOP NAME="branches" -->
323     <!-- TMPL_IF NAME="selected" -->
324             <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
325     <!-- TMPL_ELSE -->
326             <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
327     <!-- /TMPL_IF -->
328   <!-- /TMPL_LOOP -->
329           </select>
330         </td>
331       </tr>
332     </table>
333
334   <!-- TMPL_IF NAME="aqbudgetid" -->
335     <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
336   <!-- /TMPL_IF -->
337
338     <p id="action">
339       <input type="button" value="Submit" onclick="Check(this.form)" />
340       <input type="submit" value="Cancel" onclick="location.href='/cgi-bin/koha/admin/aqbudget.pl'; return false;" />
341     </p>
342   </fieldset>
343 </form>
344 <!-- /TMPL_IF --> <!-- add_form -->
345
346 <!-- TMPL_IF name="delete_confirm" -->
347 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
348   <fieldset>
349     <legend>Delete Book Budget?</legend>
350
351     <table>
352       <tr>
353         <th>Start date</th>
354         <td><!-- TMPL_VAR NAME="startdate" --></td>
355       </tr>
356       
357       <tr>
358         <th>End date</th>
359         <td><!-- TMPL_VAR NAME="enddate" --></td>
360       </tr>
361       
362       <tr>
363         <th>Budget Amount</th>
364         <td><!-- TMPL_VAR NAME="budgetamount" --></td>
365       </tr>
366     </table>
367
368     <input type="hidden" name="op" value="delete_confirmed" />
369     <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
370
371     <p id="action">
372       <input type="submit" value="Delete this budget" />
373       <input type="submit" value="Do Not Delete" />
374     </p>
375   </fieldset>
376 </form>
377 <!-- /TMPL_IF -->
378
379 </div>
380 </div>
381 <div class="yui-b">
382 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
383 </div>
384 </div>
385 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->