IDL:
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Apr 2010 20:51:39 +0000 (20:51 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Apr 2010 20:51:39 +0000 (20:51 +0000)
added pcrud <retrieve> entry for acq selection list.
added selector columns to PL and PO.
removed now-virtual item_count column from acq.acq_lineitem_history
repaired faulty pcrud actions stanza for acq po

AutoGrid
added a readOnly edit mode to AutoGrid.  this will allow users to pop up the edit dialog for copy/paste, since it is not (currently) possible to copy values directly from a dojo grid

new UIs
added a lineitem history ui which shows the audit values from a given lineitem
added a po history ui which shows the audit values from a given po

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

Open-ILS/examples/fm_IDL.xml
Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Open-ILS/web/templates/default/acq/lineitem/history.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/acq/po/history.tt2 [new file with mode: 0644]

index 23c1565..5d771aa 100644 (file)
@@ -5270,9 +5270,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </permacrud>
     </class>
 
-       <class id="acqpl" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
+       <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
                <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
-                       <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
+                       <field reporter:label="Picklist ID" name="id" reporter:datatype="id" reporter:selector='name' />
                        <field reporter:label="Owner" name="owner" reporter:datatype="link" />
                        <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
                        <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
@@ -5290,6 +5290,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
                </links>
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+                       <actions>
+                               <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
+                       </actions>
+               </permacrud>
        </class>
 
        <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">
@@ -5314,7 +5319,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
        <class id="acqpo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::purchase_order" oils_persist:tablename="acq.purchase_order" reporter:label="Purchase Order">
                <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
-                       <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
+                       <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
                        <field reporter:label="Owner" name="owner" reporter:datatype="link" />
                        <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
                        <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
@@ -5383,7 +5388,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
+            <actions>
+                <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
+            </actions>
                </permacrud>
        </class>
 
@@ -5491,7 +5498,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
                        <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
                        <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
-                       <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
                        <field reporter:label="State" name="state" reporter:datatype="text"/>
                        <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
                        <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
index 34ac133..08384b6 100644 (file)
@@ -18,6 +18,7 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
             editOnEnter : false, 
             defaultCellWidth : null,
             editStyle : 'dialog',
+            editReadOnly : false,
             suppressFields : null,
             hideSelector : false,
             selectorWidth : '1.5',
@@ -376,6 +377,7 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
 
                 var pane = new openils.widget.EditPane({
                     fmObject:fmObject,
+                    hideActionButtons : this.editReadOnly,
                     overrideWidgets : this.overrideEditWidgets,
                     overrideWidgetClass : this.overrideEditWidgetClass,
                     overrideWidgetArgs : this.overrideWidgetArgs,
diff --git a/Open-ILS/web/templates/default/acq/lineitem/history.tt2 b/Open-ILS/web/templates/default/acq/lineitem/history.tt2
new file mode 100644 (file)
index 0000000..4d0eaed
--- /dev/null
@@ -0,0 +1,29 @@
+[% WRAPPER "default/base.tt2" %]
+[% ctx.page_title = "Lineitem History" %]
+<script type="text/javascript">
+    dojo.require('openils.Util');
+    dojo.require('openils.widget.AutoGrid');
+    var liId = "[% ctx.page_args.0 %]";
+    openils.Util.addOnLoad(
+        function() {
+            lhGrid.loadAll({order_by : {acqlih :  'audit_time DESC'}}, {id : liId});
+        }
+    );
+</script>
+<h1>Lineitem History</h1>
+<br/>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <table  jsId="lhGrid"
+            autoHeight='true'
+            dojoType="openils.widget.AutoGrid"
+            defaultCellWidth="'auto'"
+            fieldOrder="['audit_time', 'state', 'picklist', 'purchase_order', 'provider', 'estimated_unit_price', 'claim_policy', 'create_time', 'edit_time', 'creator', 'editor', 'selector']"
+            query="{audit_id: '*'}"
+            suppressFields='["id", "audit_id", "marc", "audit_action"]'
+            fmClass='acqlih'
+            editOnEnter='true'
+            editReadOnly='true'
+            showPaginator='true'>
+    </table>
+</div>
+[% END %]
diff --git a/Open-ILS/web/templates/default/acq/po/history.tt2 b/Open-ILS/web/templates/default/acq/po/history.tt2
new file mode 100644 (file)
index 0000000..54545d4
--- /dev/null
@@ -0,0 +1,29 @@
+[% WRAPPER "default/base.tt2" %]
+[% ctx.page_title = "PO History" %]
+<script type="text/javascript">
+    dojo.require('openils.Util');
+    dojo.require('openils.widget.AutoGrid');
+    var poId = "[% ctx.page_args.0 %]";
+    openils.Util.addOnLoad(
+        function() {
+            pohGrid.loadAll({order_by : {acqpoh :  'audit_time DESC'}}, {id : poId});
+        }
+    );
+</script>
+<h1>Purchase Order History</h1>
+<br/>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <table  jsId="pohGrid"
+            autoHeight='true'
+            dojoType="openils.widget.AutoGrid"
+            defaultCellWidth="'auto'"
+            fieldOrder="['audit_time', 'name', 'state', 'ordering_agency', 'provider', 'create_time', 'edit_time', 'order_date', 'creator', 'editor', 'owner']"
+            query="{audit_id: '*'}"
+            suppressFields='["id", "audit_id", "audit_action"]'
+            fmClass='acqpoh'
+            editOnEnter='true'
+            editReadOnly='true'
+            showPaginator='true'>
+    </table>
+</div>
+[% END %]