[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration › Funds[% IF ( add_form ) %] › [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript">
+//<![CDATA[
+var MSG_BUDGET_PARENT_ALLOCATION = "- " + _("Fund amount exceeds parent allocation") + "\n";
+var MSG_BUDGET_PERIOD_ALLOCATION = "- " + _("Fund amount exceeds period allocation") + "\n";
+var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") + "\n";
+//]]>
+</script>
+
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
[% IF ( add_form ) %]
//]]>
</script>
[% ELSE %]
-<link href="[% themelang %]/lib/jquery/plugins/treetable/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
+ [% IF ( notree ) %]
+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+ <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+ [% INCLUDE 'datatables-strings.inc' %]
+ <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+ [% ELSE %]
+ <link href="[% themelang %]/lib/jquery/plugins/treetable/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
+ <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/treetable/jquery.treeTable.min.js"></script>
+ [% END %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/treetable/jquery.treeTable.min.js"></script>
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.qtip.js"></script>
<script type="text/javascript">
}
});
[% IF ( notree ) %]
- $("#budgeth").tablesorter({
- widgets : ['zebra'],
- sortList: [[0,0]],
- headers: { 7: { sorter: false }}
- });
+ $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "aoColumnDefs": [
+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+ ],
+ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
+ "iDisplayLength": 20,
+ "sPaginationType": "four_button"
+ }));
[% ELSE %]
$("#budgeth").treeTable();
[% END %]
[% IF (error_not_authorised_to_modify) %]
<div class="error">
- <p>You are not authorised to modify this fund</p>
+ <p>You are not authorized to modify this fund</p>
</div>
[% END %]
[% INCLUDE 'budgets-active-currency.inc' %]
+[% IF ( budget ) %]
+
<table id="budgeth">
<thead>
<tr>
</tr>
</tfoot>
<tbody>
- [% IF ( budget ) %]
[% FOREACH budge IN budget %]
[% IF ( budge.toggle ) %]
<tr id="node-[% budge.budget_id %]" class="highlight[% IF ( budge.budget_parent_id ) %] child-of-node-[% budge.budget_parent_id %][% END %] tooltiped">
</td>
[% END %]
</tr>
- [% END %]
- [% ELSE %]
- <tr><td colspan="12">No fund found</td></tr>
[% END %]
</tbody>
</table>
+[% ELSE %]
+ No fund found
+[% END %]
+
[% IF ( pagination_bar ) %]<div class="pages">[% pagination_bar %]</div>[% END %]
[% END %] <!-- else -->
<input type="text" name="budget_amount" id="budget_amount" value="[% budget_amount %]" size="8" />
</li>
- <li>
+ <li style="display:none;">
<label for="budget_encumb">Encumbrance: </label>
<input type="text" name="budget_encumb" id="budget_encumb" value="[% budget_encumb %]" size="8" />
</li>
- <li>
+ <li style="display:none;">
<label for="budget_expend">Expenditure: </label>
<input type="text" name="budget_expend" id="budget_expend" value="[% budget_expend %]" size="8" />
</li>