[open-ils-commits] r9574 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
controllers/acq public/oils/media/ui_js/oils/default/acq/po
templates/oils/default/acq/po
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 13 10:16:54 EDT 2008
Author: erickson
Date: 2008-05-13 10:16:52 -0400 (Tue, 13 May 2008)
New Revision: 9574
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html
Log:
added grid fleshing get functions for PO search interface
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py 2008-05-13 13:50:06 UTC (rev 9573)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py 2008-05-13 14:16:52 UTC (rev 9574)
@@ -106,3 +106,8 @@
'open-ils.acq.purchase_order.delete',
r.ctx.core.authtoken.value, kwargs['id'])
return r.render('acq/po/list')
+
+ def search(self):
+ r = RequestMgr()
+ return r.render('acq/po/search.html')
+
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js 2008-05-13 13:50:06 UTC (rev 9573)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js 2008-05-13 14:16:52 UTC (rev 9574)
@@ -4,7 +4,26 @@
dojo.require('dijit.form.NumberTextBox');
dojo.require('dojox.grid.Grid');
dojo.require('openils.acq.Provider');
+dojo.require('fieldmapper.OrgUtils');
+function getOrgInfo(rowIndex) {
+ data = poGrid.model.getRow(rowIndex);
+ if(!data) return;
+ return fieldmapper.aou.findOrgUnit(data.owner).shortname();
+}
+
+function getProvider(rowIndex) {
+ data = poGrid.model.getRow(rowIndex);
+ if(!data) return;
+ return openils.acq.Provider.retrieve(data.provider).name();
+}
+
+function getOwner(rowIndex) {
+ data = poGrid.model.getRow(rowIndex);
+ if(!data) return;
+ return new openils.User({id:data.owner}).user.usrname();
+}
+
function doSearch(fields) {
var itemList = [];
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html 2008-05-13 13:50:06 UTC (rev 9573)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html 2008-05-13 14:16:52 UTC (rev 9574)
@@ -32,11 +32,11 @@
var poGridStructure = [{
cells : [[
{name: '${_("ID")}', field: 'id'},
- {name: '${_("Owner")}', field:'owner'},
- {name: '${_("Ordering Agency")}', field: "ordering_agency"},
+ {name: '${_("Owner")}', get:getOwner},
+ {name: '${_("Ordering Agency")}', get:getOrgInfo},
{name: '${_("Create Time")}', field:'create_time'},
{name: '${_("Edit Time")}', field: "edit_time"},
- {name: '${_("Provider")}', field:'provider'},
+ {name: '${_("Provider")}', get:getProvider},
{name: '${_("State")}', field:'state'}
]]
}];
More information about the open-ils-commits
mailing list