base_uri as a misnomer. changed to base_path. added support for overrideing the...
[working/Evergreen.git] / Open-ILS / web / templates / default / acq / financial / list_providers.tt2
1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_providers.js'> </script>
3
4 <div id='oils-acq-list-header' class='container'>
5     <div id='oils-acq-list-header-label'>Providers</div>
6 </div>
7
8 <div class='oils-acq-actions-div'>
9     <div dojoType="dijit.form.DropDownButton">
10         <span>New Provider</span>
11
12         <div dojoType="dijit.TooltipDialog" execute="createProvider(arguments[0]);">
13             <script type='dojo/connect' event='onOpen'>
14                 openils.acq.CurrencyType.loadSelectWidget(providerCurrencySelector);
15                 new openils.User().buildPermOrgSelector('ADMIN_PROVIDER', providerOwnerSelect);
16             </script>
17
18             <table class='dijitTooltipTable'>
19                 <tr>
20                     <td><label for="name">Name: </label></td>
21                     <td><input dojoType="dijit.form.TextBox" name="name"/></td>
22                 </tr>
23                 <tr>
24                     <td><label for="code">Code: </label></td>
25                     <td><input dojoType="dijit.form.TextBox" name="code"/></td>
26                 </tr>
27                 <tr>
28                     <td><label for="currency_type">Currency Type:</label></td>
29                     <td>
30                         <input jsId='providerCurrencySelector' name="currency_type" 
31                                dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
32                         </input>
33                     </td>
34                 </tr>
35                 <tr>
36                     <td valign='top'><label for="owner">Owning Location:</label></td>
37                     <td>
38                         <input dojoType="openils.widget.OrgUnitFilteringSelect" jsId='providerOwnerSelect'
39                                searchAttr="shortname" name="owner" autocomplete="true" labelAttr='shortname'> </input>
40                     </td>
41                 </tr>
42                 <tr>
43                     <td colspan='2' align='center'>
44                         <button dojoType=dijit.form.Button type="submit">Create</button>
45                     </td>
46                 </tr>
47             </table>
48         </div>
49     </div> 
50 </div>
51
52
53
54
55 <!-- The main grid lives here -->
56 <script>
57     function getName(rowIndex, item) {
58         if(!item) return;
59         var name = this.grid.store.getValue(item, 'name');
60         var id = this.grid.store.getValue(item, 'id');
61         return '<a href="[% ctx.base_path %]/acq/provider/view/'+id+'">'+name+'</a>';
62     }
63 </script> 
64 <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
65     <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'> 
66         <table jsId="providerListGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'> 
67             <thead> 
68                 <tr> 
69                     <th field="id">ID</th> 
70                     <th field="name" width='auto' get='getName'>Name</th> 
71                     <th field="code">Code</th> 
72                     <th field="owner" get='getOrgInfo'>Owner</th> 
73                     <th field="currency_type">Currency Type</th> 
74                 </tr> 
75             </thead> 
76         </table>     
77     </div> 
78 </div>
79
80 [% END %]
81