]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2
on the hunt for grids that don't need an explicit height. think i've found a way...
[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_path %]/acq/funding_source/view/'+id+'">'+name+'</a>';
13     }
14 </script>
15
16 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
17
18     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
19         <div>Funding Sources</div>
20         <div>
21             <button dojoType='dijit.form.Button' onClick='fsGrid.showCreateDialog()'>New Funding Source</button>
22             <button dojoType='dijit.form.Button' onClick='fsGrid.deleteSelected()'>Delete Selected</button>
23         </div>
24     </div>
25
26     <table  jsId="fsGrid"
27             dojoType="openils.widget.AutoGrid"
28             fieldOrder="['id', 'name', 'owner', 'code', 'currency_type', 'balance']"
29             query="{name: '*'}"
30             defaultCellWidth='"auto"'
31             fmClass='acqfs'
32             editOnEnter='true'>
33         <thead>
34             <tr>
35                 <th field="name" get='getName'/>
36                 <th field="owner" get='getOrgInfo'/>
37                 <th field="balance" get='getBalanceInfo'/>
38             </tr>
39         </thead>
40     </table>
41 </div>
42
43
44
45 [% END %]