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