Admin Menu link for viewing EDI Messages
authoratz <atz@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 30 Jul 2010 20:27:14 +0000 (20:27 +0000)
committeratz <atz@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 30 Jul 2010 20:27:14 +0000 (20:27 +0000)
Modifies and uses the existing page for viewing one PO's messages.

TODO: Other kinds of filtering/searching.
TODO: Display PO number where name unavailable.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17059 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/web/templates/default/acq/po/edi_messages.tt2
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul

index df0b8a7..fd4d28a 100644 (file)
 <!ENTITY staff.main.menu.admin.server_admin.acq.provider.accesskey "P">
 <!ENTITY staff.main.menu.admin.server_admin.acq.edi_account.label "EDI Accounts">
 <!ENTITY staff.main.menu.admin.server_admin.acq.edi_account.accesskey "U">
+<!ENTITY staff.main.menu.admin.server_admin.acq.edi_message.label "EDI Messages">
+<!ENTITY staff.main.menu.admin.server_admin.acq.edi_message.accesskey "M">
 <!ENTITY staff.main.menu.admin.server_admin.acq.distrib_formula.label "Distribution Formulas">
 <!ENTITY staff.main.menu.admin.server_admin.acq.distrib_formula.accesskey "D">
 <!ENTITY staff.main.menu.admin.server_admin.acq.currency_type.label "Currency Types">
index 8a36405..bf4a8b8 100644 (file)
@@ -1,5 +1,5 @@
 [% WRAPPER "default/base.tt2" %]
-[% ctx.page_title = "PO History" %]
+[% ctx.page_title = "EDI Messages" %]
 <script type="text/javascript">
     dojo.require('openils.Util');
     dojo.require('openils.widget.AutoGrid');
@@ -8,20 +8,33 @@
     var poId = "[% ctx.page_args.0 %]";
     openils.Util.addOnLoad(
         function() {
-            edimGrid.loadAll({order_by : {acqedim :  'create_time DESC'}}, {purchase_order : poId});
+            if (poId) {
+                edimGrid.loadAll({order_by : {acqedim :  'create_time DESC'}}, {purchase_order : poId});
+            } else  {
+                edimGrid.loadAll({order_by : {acqedim :  'create_time DESC'}});
+            }
         }
     );
 </script>
-<h1>Purchase Order EDI</h1>
+[% IF ctx.page_args.0 %]
+<h1>EDI Messages (Purchase Order [% ctx.page_args.0 %])</h1>
+[% ELSE %]
+<h1>EDI Messages</h1>
+[% END  %]
 <br/>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <table  jsId="edimGrid"
             autoHeight='true'
             dojoType="openils.widget.AutoGrid"
             defaultCellWidth="'auto'"
-            fieldOrder="['message_type', 'status', 'create_time', 'translate_time', 'process_time', 'error_time', 'error', 'account', 'remote_file']"
             query="{id: '*'}"
+            [% IF ctx.page_args.0 %]
+            fieldOrder="['message_type', 'status', 'create_time', 'translate_time', 'process_time', 'error_time', 'error', 'account', 'remote_file']"
             suppressFields="['id', 'edi', 'jedi', 'purchase_order']"
+            [% ELSE %]
+            fieldOrder="['purchase_order', 'message_type', 'status', 'create_time', 'translate_time', 'process_time', 'error_time', 'error', 'account', 'remote_file']"
+            suppressFields="['id', 'edi', 'jedi']"
+            [% END  %]
             editStyle='pane'
             fmClass='acqedim'
             editOnEnter='true'
index 98db9fe..944f68a 100644 (file)
@@ -743,6 +743,10 @@ main.menu.prototype = {
                 ['oncommand'],
                 function() { open_eg_web_page('conify/global/acq/edi_account'); }
             ],
+            'cmd_server_admin_acq_edi_message' : [
+                ['oncommand'],
+                function() { open_eg_web_page('acq/po/edi_messages'); }
+            ],
             'cmd_server_admin_acq_currency_type' : [
                 ['oncommand'],
                 function() { open_eg_web_page('acq/currency_type/list'); }
index d239dbe..1465635 100644 (file)
     <command id="cmd_server_admin_acq_funding_source" />
     <command id="cmd_server_admin_acq_provider" />
     <command id="cmd_server_admin_acq_edi_account" />
+    <command id="cmd_server_admin_acq_edi_message" />
     <command id="cmd_server_admin_acq_currency_type" />
     <command id="cmd_server_admin_acq_exchange_rate" />
     <command id="cmd_server_admin_acq_distrib_formula" />
                         <menuitem label="&staff.main.menu.admin.server_admin.acq.exchange_rate.label;" accesskey="&staff.main.menu.admin.server_admin.acq.exchange_rate.accesskey;" command="cmd_server_admin_acq_exchange_rate" />
                         <menuitem label="&staff.main.menu.admin.server_admin.acq.provider.label;" accesskey="&staff.main.menu.admin.server_admin.acq.provider.accesskey;" command="cmd_server_admin_acq_provider" />
                         <menuitem label="&staff.main.menu.admin.server_admin.acq.edi_account.label;" accesskey="&staff.main.menu.admin.server_admin.acq.edi_account.accesskey;" command="cmd_server_admin_acq_edi_account" />
+                        <menuitem label="&staff.main.menu.admin.server_admin.acq.edi_message.label;" accesskey="&staff.main.menu.admin.server_admin.acq.edi_message.accesskey;" command="cmd_server_admin_acq_edi_message" />
                         <menuseparator />
                         <menuitem label="&staff.main.menu.admin.server_admin.acq.claim_type.label;" accesskey="&staff.main.menu.admin.server_admin.acq.claim_type.accesskey;" command="cmd_server_admin_acq_claim_type"/>
                         <menuitem label="&staff.main.menu.admin.server_admin.acq.claim_event_type.label;" accesskey="&staff.main.menu.admin.server_admin.acq.claim_event_type.accesskey;" command="cmd_server_admin_acq_claim_event_type"/>