1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_providers.js'> </script>
4 <div id='oils-acq-list-header' class='container'>
5 <div id='oils-acq-list-header-label'>Providers</div>
8 <div class='oils-acq-actions-div'>
9 <div dojoType="dijit.form.DropDownButton">
10 <span>New Provider</span>
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);
18 <table class='dijitTooltipTable'>
20 <td><label for="name">Name: </label></td>
21 <td><input dojoType="dijit.form.TextBox" name="name"/></td>
24 <td><label for="code">Code: </label></td>
25 <td><input dojoType="dijit.form.TextBox" name="code"/></td>
28 <td><label for="currency_type">Currency Type:</label></td>
30 <input jsId='providerCurrencySelector' name="currency_type"
31 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
36 <td valign='top'><label for="owner">Owning Location:</label></td>
38 <input dojoType="openils.widget.OrgUnitFilteringSelect" jsId='providerOwnerSelect'
39 searchAttr="shortname" name="owner" autocomplete="true" labelAttr='shortname'> </input>
43 <td colspan='2' align='center'>
44 <button dojoType=dijit.form.Button type="submit">Create</button>
55 <!-- The main grid lives here -->
57 function getName(rowIndex, item) {
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>';
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'>
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>