1 [% WRAPPER 'base.tt2' %]
3 <!-- The main grid lives here -->
4 <script type="text/javascript">
5 function getName(rowIndex, item) {
7 var name = this.grid.store.getValue(item, 'name');
8 var id = this.grid.store.getValue(item, 'id');
9 // weird hack to pass the data we need to the formatter which is now required for HTML cell values
10 return id + ':' + name;
13 function formatName(value) {
15 var vals = value.split(/:/);
16 return '<a href="[% ctx.base_path %]/acq/funding_source/view/'+vals[0]+'">'+vals[1]+'</a>';
21 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
23 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
24 <div>[% l('Funding Sources') %]</div>
26 <button dojoType='dijit.form.Button' onClick='fsGrid.showCreateDialog()'>[% l('New Funding Source') %]</button>
27 <button dojoType='dijit.form.Button' onClick='fsGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
32 dojoType="openils.widget.AutoGrid"
33 fieldOrder="['id', 'name', 'owner', 'code', 'currency_type', 'balance']"
35 defaultCellWidth='"auto"'
40 <th field="name" get='getName' formatter='formatName'></th>
41 <th field="owner" get='getOrgInfo'></th>
42 <th field="balance" get='getBalanceInfo'></th>
48 <!-- load the page-specific JS -->
49 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funding_sources.js'></script>