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; }
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>
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>
20 <span>[% l('Context Org Unit') %]</span>
21 <select dojoType="openils.widget.OrgUnitFilteringSelect" jsId='btContextOrgSelect'
22 searchAttr='shortname' labelAttr='shortname'> </select>
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']"
31 defaultCellWidth='"auto"'
37 <th field='provider' get='getProvider' formatter='formatProvider'/>
38 <th field='owner' get='getOwner'/>
43 <div class="footer_notes">
45 <b>Host</b> is the full FTP/SSH hostname, including the protocol, e.g. ftp://ftp1.somevendor.com<br />
46 <b>Username</b>, <b>Password</b> and <b>Account</b> are (s)FTP/SSH parameters.<br />
47 <b>Account</b> is unlikely to be used by modern systems and should typically be empty.<br />
48 <b>Vendor Account Number</b> (VAN) is vendor-assigned, only needed if different than the org_unit SAN.<br />
49 <b>Vendor Assigned Code</b> (VAC) is essentially a sub-account designation, e.g. '0001'. It can be used with or without VAN.<br />
50 The location of codes in the EDI message itself may vary according to vendor-specific semantics.
55 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/edi_account.js'> </script>
57 <script type="text/javascript">
58 // dojo.require('openils.widget.OrgUnitFilteringSelect');
59 dojo.require('fieldmapper.OrgUtils');
61 var targetId = '[% ctx.page_args.0 %]';
63 function getOrgName(orgId) {
64 return fieldmapper.aou.findOrgUnit(orgId).shortname();
66 function getOwner(rowIndex, item) {
68 var id = this.grid.store.getValue(item, 'owner');
69 return getOrgName(id);
71 function getProvider(rowIndex, item) {
73 var id = this.grid.store.getValue(item, 'provider');
74 return id + ':' + id; // TODO: get acq.provider.code from fieldmapper or elsewhere
76 function formatProvider(value) {
78 var vals = value.split(/:/);
79 return '<a href="[% ctx.base_path %]/conify/global/acq/provider/'+vals[0]+'">'+vals[1]+'</a>';