[open-ils-commits] r16316 - in trunk/Open-ILS: examples web/js/dojo/openils/widget web/templates/default/acq/lineitem web/templates/default/acq/po (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 26 16:51:45 EDT 2010
Author: erickson
Date: 2010-04-26 16:51:39 -0400 (Mon, 26 Apr 2010)
New Revision: 16316
Added:
trunk/Open-ILS/web/templates/default/acq/lineitem/history.tt2
trunk/Open-ILS/web/templates/default/acq/po/history.tt2
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
IDL:
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
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-04-26 20:36:57 UTC (rev 16315)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-04-26 20:51:39 UTC (rev 16316)
@@ -5270,9 +5270,9 @@
</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 @@
<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 @@
<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 @@
<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 @@
<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"/>
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-04-26 20:36:57 UTC (rev 16315)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-04-26 20:51:39 UTC (rev 16316)
@@ -18,6 +18,7 @@
editOnEnter : false,
defaultCellWidth : null,
editStyle : 'dialog',
+ editReadOnly : false,
suppressFields : null,
hideSelector : false,
selectorWidth : '1.5',
@@ -376,6 +377,7 @@
var pane = new openils.widget.EditPane({
fmObject:fmObject,
+ hideActionButtons : this.editReadOnly,
overrideWidgets : this.overrideEditWidgets,
overrideWidgetClass : this.overrideEditWidgetClass,
overrideWidgetArgs : this.overrideWidgetArgs,
Added: trunk/Open-ILS/web/templates/default/acq/lineitem/history.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/lineitem/history.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/acq/lineitem/history.tt2 2010-04-26 20:51:39 UTC (rev 16316)
@@ -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 %]
Added: trunk/Open-ILS/web/templates/default/acq/po/history.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/po/history.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/acq/po/history.tt2 2010-04-26 20:51:39 UTC (rev 16316)
@@ -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 %]
More information about the open-ils-commits
mailing list