[open-ils-commits] r9553 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
controllers/acq public/oils/media/css/skin/default
templates/oils/default/acq/financial
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun May 11 10:39:37 EDT 2008
Author: erickson
Date: 2008-05-11 10:39:35 -0400 (Sun, 11 May 2008)
New Revision: 9553
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html
Log:
dojo-ized the provider detail display
moved some inline style to the .css files
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py 2008-05-10 01:27:29 UTC (rev 9552)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py 2008-05-11 14:39:35 UTC (rev 9553)
@@ -13,12 +13,9 @@
def view(self, **kwargs):
r = RequestMgr()
- provider = provider_mgr.retrieve(r, kwargs['id'])
- provider.owner(OrgUtil.get_org_unit(provider.owner()))
- r.ctx.acq.provider.value = provider
+ r.ctx.acq.provider_id = kwargs['id']
return r.render('acq/financial/view_provider.html')
-
def create(self):
r = RequestMgr()
ses = ClientSession(oils.const.OILS_APP_ACQ)
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css 2008-05-10 01:27:29 UTC (rev 9552)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css 2008-05-11 14:39:35 UTC (rev 9553)
@@ -6,6 +6,8 @@
.oils-sub-navigate-block span { padding: 3px; }
*/
+.oils-acq-detail-content-pane {height:600px;width:100%}
+
/* bib search */
#oils-acq-search-container { width:100%; }
#oils-acq-search-sources-block { width:32%; vertical-align: top; float: left; margin-right: 10px;}
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html 2008-05-10 01:27:29 UTC (rev 9552)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html 2008-05-11 14:39:35 UTC (rev 9553)
@@ -95,10 +95,6 @@
<div id='oils-acq-list-header-label'>${_('Fund Details')}</div>
</div>
-<style>
- .oils-acq-detail-content-pane {height:500px;width:100%}
-</style>
-
<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
<div dojoType="dijit.layout.TabContainer">
<div dojoType="dijit.layout.ContentPane"
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html 2008-05-10 01:27:29 UTC (rev 9552)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html 2008-05-11 14:39:35 UTC (rev 9553)
@@ -1,25 +1,70 @@
# -*- coding: utf-8 -*-
<%inherit file='../base.html'/>
-<%namespace file='../../common/widgets.html' name='widget'/>
<%def name="page_title()">${_('View Provider')}</%def>
<%def name="block_content()">
-<% provider = c.oils.acq.provider.value %>
+<script>
+ dojo.require("dijit.Dialog");
+ dojo.require('dijit.layout.TabContainer');
+ dojo.require('dijit.layout.ContentPane');
+ dojo.require('dojox.grid.Grid');
+ dojo.require("fieldmapper.OrgUtils");
+ dojo.require('openils.acq.Provider');
+ dojo.require('openils.Event');
+ dojo.require('openils.User');
-<div id='oils-acq-list-header' class='container'>
- <div id='oils-acq-list-header-label'>${provider.name()}</div>
+ var providerId = ${c.oils.acq.provider_id};
+ var provider = null;
+
+ function getOrgInfo(rowIndex) {
+ data = providerGrid.model.getRow(rowIndex);
+ if(!data) return;
+ return fieldmapper.aou.findOrgUnit(data.owner).shortname();
+ }
+
+ function loadProviderGrid() {
+ var store = new dojo.data.ItemFileReadStore({data:acqpro.toStoreData([provider])});
+ var model = new dojox.grid.data.DojoData(
+ null, store, {rowsPerPage: 20, clientSort: true, query:{id:'*'}});
+ providerGrid.setModel(model);
+ providerGrid.update();
+ }
+
+ function fetchProvider() {
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.provider.retrieve'],
+ { async: true,
+ params: [ openils.User.authtoken, providerId ],
+ oncomplete: function(r) {
+ provider = r.recv().content();
+ loadProviderGrid(provider);
+ }
+ }
+ );
+ }
+
+ dojo.addOnLoad(fetchProvider);
+</script>
+
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.TabContainer">
+ <div dojoType="dijit.layout.ContentPane"
+ class='oils-acq-detail-content-pane' title="${_('Summary')}" selected='true' style='height:400px;'>
+ <script>
+ var providerGridLayout = [{
+ cells : [[
+ {name: '${_("ID")}', field: 'id'},
+ {name: '${_("Name")}', field: "name", width:'auto'},
+ {name: '${_("Owner")}', get:getOrgInfo},
+ {name: '${_("Currency Type")}', field: "currency_type"},
+ ]]
+ }];
+ </script>
+ <div jsId='providerGrid' dojoType="dojox.Grid" structure='providerGridLayout'> </div>
+ </div>
+ </div>
</div>
-<table class='oils-admin-table'>
- <tbody>
- <tr>
- <td class='oils-admin-label'>${_('Owner')}</td>
- <td>${provider.owner().name()}</td>
- </tr>
- <tr>
- <td class='oils-admin-label'>${_('Currency')}</td>
- <td>${provider.currency_type()}</td>
- </tr>
- </tbody>
-</table>
</%def>
+
More information about the open-ils-commits
mailing list