#1546 REPLACE statements (continued)
[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 <form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
88 <fieldset class="rows"><legend>Search Budgets</legend><ol>
89     <li><label for="filter_bookfundid"> Book fund:</label>
90       <select name="filter_bookfundid" id="filter_bookfundid">
91         <option value="">----</option>
92     <!-- TMPL_LOOP name="filter_bookfundids" -->
93       <!-- TMPL_IF NAME="selected" -->
94         <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
95       <!-- TMPL_ELSE -->
96         <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
97       <!-- /TMPL_IF -->
98     <!-- /TMPL_LOOP -->
99       </select>
100     </li>
101     <li><label for="filter_branchcode">Library:</label>
102       <select name="filter_branchcode" id="filter_branchcode">
103         <option value="">----</option>
104     <!-- TMPL_LOOP name="filter_branches" -->
105       <!-- TMPL_IF NAME="selected" -->
106         <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
107       <!-- TMPL_ELSE -->
108         <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
109       <!-- /TMPL_IF -->
110     <!-- /TMPL_LOOP -->
111       </select>
112     </li>
113     <li><label for="filter_startdate_sign"> Start date:</label>
114       <select name="filter_startdate_sign" id="filter_startdate_sign">
115     <!-- TMPL_IF NAME="filter_startdate_sign_equal_selected" -->
116         <option value="=" selected="selected">=</option>
117     <!-- TMPL_ELSE -->
118         <option value="=">=</option>
119     <!-- /TMPL_IF -->
120
121     <!-- TMPL_IF NAME="filter_startdate_sign_superior_selected" -->
122         <option value="&gt;=" selected="selected">&gt;=</option>
123     <!-- TMPL_ELSE -->
124         <option value="&gt;=">&gt;=</option>
125     <!-- /TMPL_IF -->
126
127     <!-- TMPL_IF NAME="filter_startdate_sign_inferior_selected" -->
128         <option value="&lt;=" selected="selected">&lt;=</option>
129     <!-- TMPL_ELSE -->
130         <option value="&lt;=">&lt;=</option>
131     <!-- /TMPL_IF -->
132       </select>
133       <input type="text" size="10" id="filter_startdate" name="filter_startdate" value="<!-- TMPL_VAR Name="filter_startdate" -->" />
134       <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_startdate_button" alt="Show Calendar" />
135       <script type="text/javascript">
136 //<![CDATA[
137         Calendar.setup(
138           {
139             inputField : "filter_startdate",
140             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
141             button : "filter_startdate_button"
142           }
143         );
144       //]]>
145 </script>
146     </li>
147     <li><label for="filter_enddate_sign"> End date:</label>
148       <select name="filter_enddate_sign" id="filter_enddate_sign">
149     <!-- TMPL_IF NAME="filter_enddate_sign_equal_selected" -->
150         <option value="=" selected="selected">=</option>
151     <!-- TMPL_ELSE -->
152         <option value="=">=</option>
153     <!-- /TMPL_IF -->
154
155     <!-- TMPL_IF NAME="filter_enddate_sign_superior_selected" -->
156         <option value="&gt;=" selected="selected">&gt;=</option>
157     <!-- TMPL_ELSE -->
158         <option value="&gt;=">&gt;=</option>
159     <!-- /TMPL_IF -->
160
161     <!-- TMPL_IF NAME="filter_enddate_sign_inferior_selected" -->
162         <option value="&lt;=" selected="selected">&lt;=</option>
163     <!-- TMPL_ELSE -->
164         <option value="&lt;=">&lt;=</option>
165     <!-- /TMPL_IF -->
166       </select>
167       <input type="text" size="10" id="filter_enddate" name="filter_enddate" value="<!-- TMPL_VAR Name="filter_enddate" -->" />
168       <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_enddate_button" alt="Show Calendar" />
169       <script type="text/javascript">
170 //<![CDATA[
171         Calendar.setup(
172           {
173             inputField : "filter_enddate",
174             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
175             button : "filter_enddate_button"
176           }
177         );
178       //]]>
179 </script>
180     </li>
181     <li><label for="filter_amount_sign"> Budget amount:</label>
182       <select name="filter_amount_sign" id="filter_amount_sign">
183     <!-- TMPL_IF NAME="filter_amount_sign_equal_selected" -->
184         <option value="=" selected="selected">=</option>
185     <!-- TMPL_ELSE -->
186         <option value="=">=</option>
187     <!-- /TMPL_IF -->
188
189     <!-- TMPL_IF NAME="filter_amount_sign_superior_selected" -->
190         <option value="&gt;=" selected="selected">&gt;=</option>
191     <!-- TMPL_ELSE -->
192         <option value="&gt;=">&gt;=</option>
193     <!-- /TMPL_IF -->
194
195     <!-- TMPL_IF NAME="filter_amount_sign_inferior_selected" -->
196         <option value="&lt;=" selected="selected">&lt;=</option>
197     <!-- TMPL_ELSE -->
198         <option value="&lt;=">&lt;=</option>
199     <!-- /TMPL_IF -->
200       </select>
201       <input type="text" name="filter_amount" value="<!-- TMPL_VAR NAME="filter_amount" -->" size="8" />
202     </li>
203   </ol></fieldset>
204   <fieldset class="action"><input type="submit" name="filter" value="Search" /></fieldset>
205         </form>
206
207 <table>
208   <tr>
209     <th>Book fund</th>
210     <th>Branch</th>
211     <th>Start date</th>
212     <th>End date</th>
213     <th>Budget amount</th>
214     <th colspan="2">Actions</th>
215   </tr>
216
217   <!-- TMPL_LOOP name="budget" -->
218     <!-- TMPL_IF NAME="toggle" -->
219   <tr class="highlight">
220     <!-- TMPL_ELSE -->
221   <tr>
222     <!-- /TMPL_IF -->
223     <td><!-- TMPL_VAR NAME="bookfundid" --></td>
224     <td><!-- TMPL_VAR NAME="branchname" --></td>
225     <td><!-- TMPL_VAR NAME="startdate" --></td>
226     <td><!-- TMPL_VAR NAME="enddate" --></td>
227     <td><!-- TMPL_VAR NAME="budgetamount" --></td>
228     <td>
229       <a href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Edit</a></td><td>
230       <a href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Delete</a>
231     </td>
232   </tr>
233   <!-- /TMPL_LOOP --> <!-- budget -->
234 </table>
235
236 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
237 <!-- /TMPL_IF --> <!-- else -->
238
239 <!-- TMPL_IF name="add_form" -->
240
241 <form action="/cgi-bin/koha/admin/aqbudget.pl" name="Aform" method="post">
242   <fieldset class="rows">
243     <legend><!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> budget</legend>
244     <input type="hidden" name="op" value="add_validate" />
245     <input type="hidden" name="checked" value="0" />
246
247     
248      <ol> <li>
249         <span class="label">Book fund: </span>
250         <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" />
251           <!-- TMPL_VAR NAME="bookfundname" -->
252       </li>
253
254       <li>
255           <label for="startdate">Start date (<!-- TMPL_VAR NAME="dateformat" -->): </label>
256                         <input type="text" size="8" maxlength="10" id="startdate" name="startdate" value="<!-- TMPL_VAR Name="startdate" -->" />
257           <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="startdate_button" alt="Show Calendar" />
258           <script type="text/javascript">
259 //<![CDATA[
260             Calendar.setup(
261               {
262                 inputField : "startdate",
263                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
264                 button : "startdate_button"
265               }
266             );
267           //]]>
268 </script>
269         
270       </li>
271       <li>
272           <label for="enddate">End date (<!-- TMPL_VAR NAME="dateformat" -->): </label>
273           <input type="text" size="8" maxlength="10" id="enddate" name="enddate" value="<!-- TMPL_VAR Name="enddate" -->" />
274           <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="enddate_button" alt="Show Calendar" />
275           <script type="text/javascript">
276 //<![CDATA[
277             Calendar.setup(
278               {
279                 inputField : "enddate",
280                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
281                 button : "enddate_button"
282               }
283             );
284           //]]>
285 </script>
286         
287       </li>
288       <li>
289           <label for="budgetamount">Budget amount: </label>
290           <input type="text" name="budgetamount" id="budgetamount" value="<!-- TMPL_VAR NAME="budgetamount" -->" size="8" />
291         
292       </li>
293       <li>
294           <label for="branch">Branch: </label>
295         
296   <!-- TMPL_IF NAME="disable_branchselection" -->
297           <!-- Pierrick's note: I've found that a disabled select was not -->
298           <!-- giving its value to Perl :-/ So I use a hidden field trick -->
299           <input type="hidden" name="branch" id="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
300           <select name="branch" disabled="disabled">
301   <!-- TMPL_ELSE -->
302           <select name="branch" id="branch">
303   <!-- /TMPL_IF -->
304
305             <option value="">----</option>
306   <!-- TMPL_LOOP NAME="branches" -->
307     <!-- TMPL_IF NAME="selected" -->
308             <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
309     <!-- TMPL_ELSE -->
310             <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
311     <!-- /TMPL_IF -->
312   <!-- /TMPL_LOOP -->
313           </select>
314         
315       </li></ol>
316     
317
318   <!-- TMPL_IF NAME="aqbudgetid" -->
319     <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
320   <!-- /TMPL_IF -->
321
322   </fieldset>
323     <fieldset class="action">
324       <input type="button" value="Submit" onclick="Check(this.form)" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudget.pl">Cancel</a>
325      </fieldset>
326 </form>
327 <!-- /TMPL_IF --> <!-- add_form -->
328
329 <!-- TMPL_IF name="delete_confirm" -->
330   <fieldset>
331     <legend>Delete Book Budget?</legend>
332
333     <table>
334       <tr>
335         <th>Start date</th>
336         <td><!-- TMPL_VAR NAME="startdate" --></td>
337       </tr>
338       
339       <tr>
340         <th>End date</th>
341         <td><!-- TMPL_VAR NAME="enddate" --></td>
342       </tr>
343       
344       <tr>
345         <th>Budget Amount</th>
346         <td><!-- TMPL_VAR NAME="budgetamount" --></td>
347       </tr>
348     </table>
349
350   </fieldset>
351    <fieldset class="action">
352 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
353     <input type="hidden" name="op" value="delete_confirmed" />
354     <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
355       <input type="submit" value="Delete this budget" />
356           </form>
357         <form action="/cgi-bin/koha/admin/aqbudget.pl" method="get">
358       <input type="submit" value="Do Not Delete" />
359           </form>
360    </fieldset>
361
362 <!-- /TMPL_IF -->
363
364 </div>
365 </div>
366 <div class="yui-b">
367 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
368 </div>
369 </div>
370 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->