]> git.koha-community.org Git - koha.git/blob - koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
Bug 3963: Additional patch to fix XHTML.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbudgetperiods.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
4
5 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/acq.js"></script>
6 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
7 <script type="text/javascript">
8 // #################################################################################
9 // Javascript
10 // #################################################################################
11     function Check(f) {
12             var ok=1;
13             var _alertString="";
14             var alertString2;
15
16             if (!(isNotNull(f.budget_period_startdate,1))) {
17                     _alertString += "\n- " + _("Start date missing");
18             }
19
20             if (!(isNotNull(f.budget_period_enddate,1))) {
21                     _alertString += "\n- " + _("End date missing");
22             }
23
24             if ( f.budget_period_startdate >   f.budget_period_enddate )  {
25                     _alertString += "\n- " + _("Start date must be before end date");
26             }
27
28             if (!(isNotNull(f.budget_period_description,1))) {
29                     _alertString += "\n- " + _("Description missing");
30             }
31
32             if (!(isNum(f.budget_period_total))) {
33                     _alertString += "\n- " + _("Amount must be a valid number, or empty");
34             }
35
36 /*
37                         checkBudgetTotal(f) {
38                         }
39 */
40
41             if (_alertString.length==0) {
42                     f.submit();
43             } else {
44                     alertString2  = _("Form not submitted because of the following problem(s)");
45                     alertString2 += "\n------------------------------------------------------------------------------------\n";
46                     alertString2 += _alertString;
47                     alert(alertString2);
48             }
49     }
50         $(document).ready(function() { 
51                  $("#periodsh").tablesorter({
52                     widgets : ['zebra'],
53                     sortList: [[0,0]]
54              });
55         });
56 </script>
57
58 <title>
59     Koha &rsaquo; Administration &rsaquo; Budget periods
60
61     <!-- TMPL_IF name="add_form" -->&rsaquo;
62         <!-- TMPL_IF name="budget_period_id" -->
63             Modify root budget'<!-- TMPL_VAR name="budget_period_id" -->'
64         <!-- TMPL_ELSE -->
65             Add root budget
66         <!-- /TMPL_IF -->
67     <!-- /TMPL_IF -->
68
69     <!-- TMPL_IF name="delete_confirm" -->&rsaquo;
70             Delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'?
71     <!-- /TMPL_IF -->
72     <!-- TMPL_IF name="delete_confirmed" -->&rsaquo;
73         Data Deleted
74     <!-- /TMPL_IF -->
75 </title>
76
77
78 </head>
79
80 <body>
81
82 <!-- TMPL_INCLUDE NAME="header.inc" -->
83 <!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
84
85 <!-- ################################################################################# -->
86 <!-- BREADCRUMBS -->
87 <!-- ################################################################################# -->
88
89 <div id="breadcrumbs">
90     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
91     <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
92
93     <!-- add or modify a budget period -->
94     <!-- ####################################### -->
95     <!-- TMPL_IF name="add_form" -->
96         <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget periods</a> &rsaquo;
97         <!-- TMPL_IF name="budget_period_id" -->
98             Modify root budget <!-- TMPL_VAR name="budget_period_description" -->
99
100         <!-- TMPL_ELSE -->
101             Add root budget
102         <!-- /TMPL_IF -->
103     <!-- /TMPL_IF -->
104
105     <!-- delete a budget period -->
106     <!-- ################################ -->
107     <!-- TMPL_IF name="delete_confirm" -->
108         <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root budgets</a> &rsaquo;
109         <!-- TMPL_IF name="total" -->
110             Cannot Delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'
111         <!-- TMPL_ELSE -->
112             Delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'?
113         <!-- /TMPL_IF -->
114     <!-- /TMPL_IF -->
115
116     <!-- display budget periods list -->
117     <!-- ########################################## -->
118     <!-- TMPL_IF name="else" -->
119         Budget periods administration
120     <!-- /TMPL_IF -->
121 </div>
122
123 <div id="doc3" class="yui-t2">
124 <div id="bd">
125 <div id="yui-main">
126 <div class="yui-b">
127
128 <!-- TMPL_INCLUDE NAME="budgets-admin.inc" -->
129
130 <!-- TMPL_IF name="add_form" -->
131     <!--  add or modify a budget period   -->
132 <!--TMPL_IF Name="duplicates"--><!--TMPL_INCLUDE Name="duplicates.inc"--><!--/TMPL_IF-->
133     <!-- TMPL_IF name="budget_period_id" -->
134         <h3>Modify root budget</h3>
135     <!-- TMPL_ELSE -->
136         <h3>Add root budget</h3>
137         <!-- /TMPL_IF -->
138 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
139     <fieldset class="rows">
140     <!-- ################################################################################# -->
141     <!-- display information about the budget period that must be added or modified -->
142     <!-- ################################################################################# -->
143     <input type="hidden" name="op" value="add_validate" />
144     <input type="hidden" name="confirm_not_duplicate" value="<!--TMPL_VAR Name="confirm_not_duplicate"-->" />
145     <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name="budget_period_id" -->" />
146     <ol>
147     <li>
148     <label for="datefrom">Start date</label>
149     <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate"   value="<!-- TMPL_VAR NAME="budget_period_startdate" -->"  />
150     <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" valign="top" />
151     <script type="text/javascript">
152         Calendar.setup({
153         inputField     :    "budget_period_startdate",
154         ifFormat         :    "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
155         button         :    "openCalendarFrom",
156         align          :    "Tl",
157         singleClick    :    false
158         });
159     </script>
160     </li>
161     <li>
162
163     <label for="budget_period_enddate">End date</label>
164     <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="<!-- TMPL_VAR NAME="budget_period_enddate" -->" />
165     <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" valign="top" />
166
167     <script type="text/javascript">
168         Calendar.setup({
169         inputField     :    "budget_period_enddate",
170         ifFormat         :    "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
171         button         :    "openCalendarTo",
172         align          :    "Tl",
173         });
174     </script>
175     </li>
176
177     <li>
178         <!-- DESCRIPTION -->
179         <!-- ############################## -->
180         <label for="budget_period_description">Description</label>
181         <input type="text" id="budget_period_description" name="budget_period_description"
182         size="48" maxlength="80" value="<!-- TMPL_VAR name="budget_period_description" -->" />
183     </li>
184
185     <li>
186         <!-- TOTAL -->
187         <!-- ############################## -->
188         <label for="budget_period_total">Total amount</label>
189         <input type="text" id="budget_period_total" name="budget_period_total"
190         size="10" maxlength="80" value="<!-- TMPL_VAR name="budget_period_total" -->" />
191     </li>
192
193     <li>
194         <!-- ACTIVE -->
195         <!-- ############################## -->
196         <label for="budget_period_active">Make Budget Active</label>
197         <!-- TMPL_IF NAME="budget_period_active" --><input type="checkbox" checked="checked" id="budget_period_active" name="budget_period_active" value="1" /><!--TMPL_ELSE-->  <input type="checkbox" id="budget_period_active" name="budget_period_active" value="1"/> <!--/TMPL_IF-->
198     </li>
199
200     <li>
201         <!-- LOCK  -->
202         <!-- ############################## -->
203         <label for="budget_period_locked">Lock Budget</label>
204         <!-- TMPL_IF NAME="budget_period_locked" --><input type="checkbox" checked="checked" id="budget_period_locked" name="budget_period_locked" value="1" /><!--TMPL_ELSE-->  <input type="checkbox" id="budget_period_locked" name="budget_period_locked" value="1"/> <!--/TMPL_IF-->
205     </li>
206     </ol>
207     </fieldset>
208
209     <fieldset class="action">
210         <!-- "save changes" button -->
211         <!-- ###################################### -->
212         <input type="button" value="Save Changes"  onclick="Check(this.form)"    />
213         <!--             <input type="submit" value="Save Changes"  />  -->
214         <!--            <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl" class="cancel">Cancel</a> -->
215     </fieldset>
216
217 </form>
218
219 <!-- /TMPL_IF -->
220
221 <!-- ####################################################################### -->
222 <!-- delete a budget period -->
223 <!-- ####################################################################### -->
224
225 <!-- TMPL_IF name="delete_confirm" -->
226     <!-- TMPL_IF name="total" -->
227         <div class="dialog message">
228         <h3>Cannot delete root budget</h3>
229         <p><strong>This record is used <!-- TMPL_VAR name="total" --> times</strong>
230         . Deletion is not possible.</p>
231     <!-- TMPL_ELSE -->
232         <div class="dialog alert">
233         <h3>Delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'?</h3>
234     <!-- /TMPL_IF -->
235
236     <!-- ###################################################################### -->
237     <!-- display information about the budget period that must be deleted  -->
238     <!-- ###################################################################### -->
239
240     <table>
241         <tr>
242         <th scope="row">Start date</th>
243         <td><!-- TMPL_VAR name="budget_period_startdate" --></td>
244         </tr>
245
246         <tr>
247         <th scope="row">End date</th>
248         <td><!-- TMPL_VAR name="budget_period_enddate" --></td>
249         </tr>
250
251         <tr>
252         <th scope="row">Total amount</th>
253         <td><!-- TMPL_VAR name="budget_period_total" --></td>
254         </tr>
255     </table>
256
257
258     <!-- ############################################################# -->
259     <!-- "delete" and "quit" buttons    -->
260     <!-- ############################################################# -->
261
262     <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
263         <input type="hidden" name="op" value="delete_confirmed" />
264         <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name="budget_period_id" -->" />
265         <input type="submit" class="approve" value="Delete" />
266     </form>
267
268     <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
269         <input type="submit" class="deny" value="Quit" />
270     </form>
271
272     </div>
273 <!-- /TMPL_IF -->
274 <!--  DEFAULT  display budget periods list -->
275 <!-- TMPL_IF name="else" -->
276     <h2>Root budgets administration</h2>
277     <!-- TMPL_IF name="cur" --><b>Currency = <!-- TMPL_VAR name="cur" --></b><!-- /TMPL_IF -->
278     <table id="periodsh">
279     <thead>
280             <tr>
281                 <th>Root Budget Name</th>
282                 <th>Start Date</th>
283                 <th>End Date</th>
284                 <th>Active</th>
285                 <th>Locked</th>
286                 <th>Total</th>
287                 <th>Actions</th>
288             </tr>
289         </thead>
290         <tbody>
291             <!-- TMPL_LOOP name="period_loop" -->
292                 <!-- TMPL_IF NAME="__odd__" -->
293                     <tr>
294                 <!-- TMPL_ELSE -->
295                     <tr class="highlight">
296                 <!-- /TMPL_IF -->
297                 <td><!-- TMPL_VAR name="budget_period_description" --></td>
298                 <td><!-- TMPL_VAR name="budget_period_startdate" --></td>
299                 <td><!-- TMPL_VAR name="budget_period_enddate" --></td>
300                 <td><!-- TMPL_IF name="budget_period_active" --><font COLOR="#00FF00">✓</font><!-- /TMPL_IF --> </td>
301                 <td> <!-- TMPL_IF name="budget_period_locked" --><font COLOR="red"> X </font><!-- /TMPL_IF --> </td>
302                 <td align='right'><!-- TMPL_VAR NAME="budget_period_total" --></td>
303                 <td>
304                     <a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;budget_period_id=<!-- TMPL_VAR name="budget_period_id" escape="HTML" -->">Edit</a>
305                     <a href="<!-- TMPL_VAR name="script_name"-->?op=delete_confirm&amp;budget_period_id=<!-- TMPL_VAR name="budget_period_id" -->">Delete</a>
306                     <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR name="budget_period_id" -->">Budgets</a>
307                         <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Add Budget</a>
308                 </td>
309                 </tr>
310             <!-- /TMPL_LOOP -->
311             <!-- TMPL_UNLESS NAME="period_loop" -->
312         <tr><td colspan="7">No root budget</td></tr>
313         <!-- /TMPL_UNLESS -->
314     </tbody>
315     </table>
316     <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
317 <!-- /TMPL_IF -->
318
319 </div>
320 </div>
321 <div class="yui-b">
322 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
323 </div>
324 </div>
325 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->