1 [% WRAPPER 'default/base.tt2' %]
3 <div id='oils-acq-list-header' class='container'>
4 <div id='oils-acq-list-header-label'>Funds</div>
7 <!-- load the page-specific JS -->
8 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funds.js'> </script>
10 <script type="text/javascript">
11 function createFund(fields) {
12 /** Creates a new fund source */
13 openils.acq.Fund.create(
16 var evt = openils.Event.parse(fundId);
21 location.href = /* go to the details page for this fund */
22 '[% ctx.base_uri %]/acq/fund/view/'+fundId;
29 <div class='oils-acq-actions-div'>
30 <div dojoType="dijit.form.DropDownButton">
33 <div dojoType="dijit.TooltipDialog" execute="createFund(arguments[0]);">
34 <script type='dojo/connect' event='onOpen'>
35 openils.acq.CurrencyType.loadSelectWidget(fundCurrencySelector);
36 new openils.User().buildPermOrgSelector('ADMIN_FUND', fundOwnerSelect);
39 <table class='dijitTooltipTable'>
41 <td><label for="name">Name: </label></td>
42 <td><input dojoType="dijit.form.TextBox" name="name"/></td>
45 <td><label for="name">Code: </label></td>
46 <td><input dojoType="dijit.form.TextBox" name="code"/></td>
49 <td><label for="year">Year: </label></td>
50 <td><input dojoType="dijit.form.TextBox" name="year"/></td>
53 <td><label for="currency_type">Currency Type: </label></td>
55 <input jsId='fundCurrencySelector' name="currency_type"
56 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
61 <td valign='top'><label for="org">Owning Location: </label></td>
63 <input dojoType="openils.widget.OrgUnitFilteringSelect" jsId='fundOwnerSelect'
64 searchAttr="shortname" name="org" autocomplete="true" labelAttr='shortname'> </input>
68 <td colspan='2' align='center'>
69 <button dojoType=dijit.form.Button type="submit">Create</button>
76 <button dojoType="dijit.form.Button"
77 onclick="openils.acq.Fund.deleteFromGrid(
78 fundListGrid, function(){location.href = location.href})">
83 <select dojoType='dijit.form.FilteringSelect' onchange='filterGrid();' style='width:100px;'
84 jsId='fundFilterYearSelect' labelAttr='year' searchAttr='year'> </select>
87 <!-- The main grid lives here -->
89 function getName(rowIndex, item) {
91 var name = this.grid.store.getValue(item, 'name');
92 var id = this.grid.store.getValue(item, 'id');
93 return '<a href="[% ctx.base_uri %]/acq/fund/view/'+id+'">'+name+'</a>';
96 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
97 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
98 <table jsId="fundListGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
101 <th field="id">ID</th>
102 <th field="name" width='auto' get='getName'>Name</th>
103 <th field="code">Code</th>
104 <th field="year">Year</th>
105 <th field="org" get='getOrgInfo'>Location</th>
106 <th field="currency_type">Currency Type</th>
107 <th field="combined_balance" get='getBalanceInfo'>Combined Balance</th>