]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/conify/global/acq/edi_account.tt2
LP1873286: Fix Bad End Tags
[Evergreen.git] / Open-ILS / src / templates / conify / global / acq / edi_account.tt2
1 [% WRAPPER base.tt2 %]
2 [% ctx.page_title = l('EDI Accounts') %]
3 <style type="text/css">
4     #pListGrid { min-height: 60px; height: 100%; padding-bottom: 5px; }
5     .footer_notes { font-size: smaller; }
6 </style>
7
8 <div id='main-list-div'>
9     <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
10         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
11             <div>[% l('EDI Accounts') %]</div>
12             <div>
13                 <button dojoType='dijit.form.Button' onClick='pListGrid.showCreateDialog()'>[% l('New Account') %]</button>
14                 <button dojoType='dijit.form.Button' onClick='pListGrid.deleteSelected()'>[% l('Delete Selected') %]</button> 
15             </div>
16         </div>
17     </div>
18     <!--
19     <div>
20         <span>[% l('Context Org Unit') %]</span>
21         <select dojoType="openils.widget.OrgUnitFilteringSelect" jsId='btContextOrgSelect'
22             searchAttr='shortname' labelAttr='shortname'> </select>
23     </div>
24     -->
25     <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
26         <table  jsId="pListGrid"
27                 dojoType="openils.widget.AutoGrid"
28                 fieldOrder="['id', 'label', 'host', 'username', 'password', 'account', 'owner', 'last_activity', 'provider', 'path', 'in_dir', 'vendacct', 'vendcode']"
29                 requiredFields="['label', 'host', 'provider', 'owner']"
30                 query="{id: '*'}"
31                 defaultCellWidth='"auto"'
32                 fmClass='acqedi'
33                 showPaginator='true'
34                 editOnEnter='true'>
35             <thead>
36                 <tr>
37                     <th field='provider' get='getProvider' formatter='formatProvider'></th>
38                     <th field='owner' get='getOwner'></th>
39                 </tr>
40             </thead>
41         </table>
42     </div>
43     <div class="footer_notes">
44         [% i18n_host = '<b>' _ l('Host') _ '</b>';
45            i18n_username = '<b>' _ l('Username') _ '</b>';
46            i18n_password = '<b>' _ l('Password') _ '</b>';
47            i18n_account = '<b>' _ l('Account') _ '</b>';
48            i18n_van = '<b>' _ l('Vendor Account Number') _ '</b>';
49            i18n_vac = '<b>' _ l('Vendor Assigned Code') _ '</b>';
50            l('[_1] is the full FTP/SSH hostname, including the protocol, e.g. ftp://ftp1.somevendor.com', i18n_host) %]<br />
51         [% l('[_1], [_2] and [_3] are (s)FTP/SSH parameters.', i18n_username, i18n_password, i18n_account) %]<br />
52         [% l('[_1] is unlikely to be used by modern systems and should typically be empty.', i18n_account) %]<br />
53         [% l('[_1] (VAN) is vendor-assigned, only needed if different than the org_unit SAN.', i18n_van) %]<br />
54         [% l("[_1] (VAC) is essentially a sub-account designation, e.g. '0001'.  It can be used with or without VAN.", i18n_vac) %]<br />
55         [% l('The location of codes in the EDI message itself may vary according to vendor-specific semantics.') %]
56     </div>
57 </div>
58
59 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/edi_account.js'> </script>
60
61 <script type="text/javascript">
62 // dojo.require('openils.widget.OrgUnitFilteringSelect');
63 dojo.require('fieldmapper.OrgUtils');
64
65 var targetId = '[% ctx.page_args.0 %]';
66
67 function getOrgName(orgId) {
68     return fieldmapper.aou.findOrgUnit(orgId).shortname();
69 }
70 function getOwner(rowIndex, item) {
71     if (!item) return '';
72     var id = this.grid.store.getValue(item, 'owner');
73     return getOrgName(id);
74 }
75 function getProvider(rowIndex, item) {
76     if (!item) return '';
77     var id = this.grid.store.getValue(item, 'provider');
78     return id + ':' + id;   // TODO: get acq.provider.code from fieldmapper or elsewhere
79 }
80 function formatProvider(value) {
81     if (value) {
82         var vals = value.split(/:/);
83         return '<a href="[% ctx.base_path %]/conify/global/acq/provider/'+vals[0]+'">'+vals[1]+'</a>';
84     }
85 }
86 </script>
87 [% END %]
88