0e1b7137d56f79d202df41e3354436afdd6093e3
[working/Evergreen.git] / Open-ILS / web / templates / default / acq / financial / list_funding_sources.tt2
1 [% WRAPPER 'default/base.tt2' %]
2
3 <!-- load the page-specific JS -->
4 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funding_sources.js'> </script>
5
6 <!-- The main grid lives here -->
7 <script>
8     function getName(rowIndex, item) {
9         if(!item) return '';
10         var name = this.grid.store.getValue(item, 'name');
11         var id = this.grid.store.getValue(item, 'id');
12         return '<a href="[% ctx.base_uri %]/acq/funding_source/view/'+id+'">'+name+'</a>';
13     }
14 </script>
15
16  <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
17         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
18             <div>Funding Sources</div>
19             <div>
20                 <button dojoType='dijit.form.Button' onClick='fsGrid.showCreateDialog()'>New Funding Source</button>
21                 <button dojoType='dijit.form.Button' onClick='fsGrid.deleteSelected()'>Delete Selected</button>
22             </div>
23         </div>
24
25         <table  jsId="fsGrid"
26                 dojoType="openils.widget.AutoGrid"
27                 fieldOrder="['id', 'name', 'owner', 'code', 'currency_type', 'balance']"
28                 query="{name: '*'}"
29                 defaultCellWidth='20'
30                 fmClass='acqfs'
31                 editOnEnter='true'>
32             <thead>
33                 <tr>
34                     <th field="name" get='getName'/>
35                     <th field="owner" get='getOrgInfo'/>
36                     <th field="balance" get='getBalanceInfo'/>
37                 </tr>
38             </thead>
39         </table>
40     </div>
41 </div>
42
43
44
45 [% END %]