1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
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 // #################################################################################
10 // #################################################################################
16 if (!(isNotNull(f.budget_period_startdate,1))) {
17 _alertString += "\n- " + _("Start date missing");
20 if (!(isNotNull(f.budget_period_enddate,1))) {
21 _alertString += "\n- " + _("End date missing");
24 if ( f.budget_period_startdate > f.budget_period_enddate ) {
25 _alertString += "\n- " + _("Start date must be before end date");
28 if (!(isNotNull(f.budget_period_description,1))) {
29 _alertString += "\n- " + _("Description missing");
32 if (!(isNum(f.budget_period_total))) {
33 _alertString += "\n- " + _("Amount must be a valid number, or empty");
41 if (_alertString.length==0) {
44 alertString2 = _("Form not submitted because of the following problem(s)");
45 alertString2 += "\n------------------------------------------------------------------------------------\n";
46 alertString2 += _alertString;
50 $(document).ready(function() {
51 $("#periodsh").tablesorter({
54 headers: {6:{sorter:false}}
60 Koha › Administration › Root Budgets
62 <!-- TMPL_IF name="add_form" -->›
63 <!-- TMPL_IF name="budget_period_id" -->
64 Modify root budget'<!-- TMPL_VAR name="budget_period_id" -->'
70 <!-- TMPL_IF name="delete_confirm" -->›
71 Delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'?
73 <!-- TMPL_IF name="delete_confirmed" -->›
83 <!-- TMPL_INCLUDE NAME="header.inc" -->
84 <!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
86 <!-- ################################################################################# -->
88 <!-- ################################################################################# -->
90 <div id="breadcrumbs">
91 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
92 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
94 <!-- add or modify a budget period -->
95 <!-- ####################################### -->
96 <!-- TMPL_IF name="add_form" -->
97 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root Budget</a> ›
98 <!-- TMPL_IF name="budget_period_id" -->
99 Modify root budget <!-- TMPL_VAR name="budget_period_description" -->
106 <!-- delete a budget period -->
107 <!-- ################################ -->
108 <!-- TMPL_IF name="delete_confirm" -->
109 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root budgets</a> ›
110 <!-- TMPL_IF name="total" -->
111 Cannot delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'
113 Delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'?
117 <!-- display budget periods list -->
118 <!-- ########################################## -->
119 <!-- TMPL_IF name="else" -->
120 Root budgets administration
124 <div id="doc3" class="yui-t2">
129 <!-- TMPL_INCLUDE NAME="budgets-admin-toolbar.inc" -->
131 <!-- TMPL_IF name="add_form" -->
132 <!-- add or modify a budget period -->
134 <!-- TMPL_IF name="budget_period_id" -->
135 <h3>Modify root budget</h3>
137 <h3>Add root budget</h3>
139 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
140 <fieldset class="rows">
141 <!-- ################################################################################# -->
142 <!-- display information about the budget period that must be added or modified -->
143 <!-- ################################################################################# -->
144 <input type="hidden" name="op" value="add_validate" />
145 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name="budget_period_id" -->" />
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">
153 inputField : "budget_period_startdate",
154 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
155 button : "openCalendarFrom",
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" />
167 <script type="text/javascript">
169 inputField : "budget_period_enddate",
170 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
171 button : "openCalendarTo",
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" -->" />
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" -->" />
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-->
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-->
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> -->
221 <!-- ####################################################################### -->
222 <!-- delete a budget period -->
223 <!-- ####################################################################### -->
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>
232 <div class="dialog alert">
233 <h3>Delete root budget '<!-- TMPL_VAR name="budget_period_description" -->'?</h3>
236 <!-- ############################################################# -->
237 <!-- "delete" and "cancel" buttons -->
238 <!-- ############################################################# -->
240 <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
241 <input type="hidden" name="op" value="delete_confirmed" />
242 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name="budget_period_id" -->" />
243 <input type="submit" class="approve" value="Delete" />
246 <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
247 <input type="submit" class="deny" value="Cancel" />
252 <!-- DEFAULT display budget periods list -->
253 <!-- TMPL_IF name="else" -->
254 <h2>Root budgets administration</h2>
255 <p><!-- TMPL_IF name="cur" --><b>Currency = <!-- TMPL_VAR name="cur" --></b><!-- /TMPL_IF --></p>
256 <table id="periodsh">
259 <th>Root Budget Name</th>
269 <!-- TMPL_LOOP name="period_loop" -->
270 <!-- TMPL_IF NAME="__odd__" -->
273 <tr class="highlight">
275 <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR name="budget_period_id" -->" title="View budgets for <!-- TMPL_VAR name="budget_period_description" -->"><!-- TMPL_VAR name="budget_period_description" --></a></td>
276 <td><!-- TMPL_VAR name="budget_period_startdate" --></td>
277 <td><!-- TMPL_VAR name="budget_period_enddate" --></td>
278 <td><!-- TMPL_IF name="budget_period_active" --><span style="color:green;">Active</span> <!-- TMPL_ELSE --><!-- /TMPL_IF --> </td>
279 <td> <!-- TMPL_IF name="budget_period_locked" --><span style="color:green;">Locked</span> <!-- TMPL_ELSE --><!-- /TMPL_IF --> </td>
280 <td align='right'><!-- TMPL_VAR NAME="budget_period_total" --></td>
282 <a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&budget_period_id=<!-- TMPL_VAR name="budget_period_id" escape="HTML" -->">Edit</a>
283 <a href="<!-- TMPL_VAR name="script_name"-->?op=delete_confirm&budget_period_id=<!-- TMPL_VAR name="budget_period_id" -->">Delete</a>
284 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Add Budget</a>
288 <!-- TMPL_UNLESS NAME="period_loop" -->
289 <tr><td colspan="7">No root budget</td></tr>
290 <!-- /TMPL_UNLESS -->
293 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
299 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->