From: erickson Date: Mon, 21 Apr 2008 21:11:25 +0000 (+0000) Subject: began dojo-ification of fund view page. updated fund list page to use some new widge... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9cf07d537d6034c0f68ae27089df5f48c4156b59;p=Evergreen.git began dojo-ification of fund view page. updated fund list page to use some new widgets and to match the funding_source page more closely git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9416 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py index 5a6bd5556b..c3b5c7a8f8 100644 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py +++ b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py @@ -22,19 +22,7 @@ class FundController(BaseController): def view(self, **kwargs): r = RequestMgr() - r.ctx.core.org_tree.value = OrgUtil.fetch_org_tree() - fund_id = kwargs['id'] - ses = ClientSession(oils.const.OILS_APP_ACQ) - - fund = ses.request('open-ils.acq.fund.retrieve', - r.ctx.core.authtoken.value, fund_id, - {"flesh_summary":1, 'flesh_allocations':1, 'flesh_allocation_sources':1}).recv().content() - Event.parse_and_raise(fund) - - org_unit = OrgUtil.get_org_unit(fund.org()) - fund.org(org_unit) - - r.ctx.acq.fund.value = fund + r.ctx.acq.fund_id = kwargs['id'] return r.render('acq/financial/view_fund.html') def list(self): diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html index 4cedc6b8db..56d87de5cf 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- <%inherit file='../base.html'/> -<%namespace file='../../common/widgets.html' name='widget'/> <%def name="page_title()">${_('Funding Sources')} <%def name="block_content()"> @@ -8,8 +7,6 @@
${_('Funding Sources')}
- - + +
+
+ ${('New Fund')} + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ +
+
+
+ + +
+ + +
- /* define the layout columns */ - var cols = [ - {name: '${_("ID")}', field: 'id'}, - {name: '${_("Name")}', field: "name"}, - {name: '${_("Owner")}', field: "org"}, - {name: '${_("Year")}', field: "year"}, - {name: '${_("Currency Type")}', field: "currency_type"}, - {name: '${_("Balance")}', field: "combined_balance"} - ]; - - /* build the fund grid on page load */ - dojo.addOnLoad(function(){openils.acq.Fund.loadGrid('oils-acq-fund-grid', cols)}); + + diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html index 935c3a0824..f4bab2a232 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html @@ -1,80 +1,96 @@ # -*- coding: utf-8 -*- <%inherit file='../base.html'/> -<%namespace file='../../common/widgets.html' name='widget'/> <%def name="page_title()">${_('View Fund')} <%def name="block_content()"> -<% fund = c.oils.acq.fund.value %> + +
-
${fund.name()}
- +
${_('Fund Details')}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
${_('Owner')}${fund.org().name()}
${_('Currency')}${fund.currency_type()}
${_('Year')}${fund.year()}
${_('Amount Allocated to this Fund')}${fund.summary()['allocation_total']}
${_('Balance (Total - (Spent + Encumberances))')}${fund.summary()['combined_balance']}
${_('Spent Balance (Total - Spent)')}${fund.summary()['spent_balance']}
${_('Total Debits (Spent + Encumbered)')}${fund.summary()['debit_total']}
${_('Total Spent')}${fund.summary()['spent_total']}
${_('Total Encumbered')}${fund.summary()['encumberance_total']}
- -

${_('Fund Allocations')}

- - - - - - - - - % for alloc in fund.allocations(): - - - % if alloc.amount() != 0 and alloc.amount() is not None: - - % else: - <% percent = _('%(p)s%%') % {'p':alloc.percent()} %> - - % endif - - % endfor - -
${_('Funding Source')}${_('Amount/Percent')}
${alloc.funding_source().name()}${alloc.amount()}${percent}
+ +
+
+
+ +
+
+
+
diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html index 1e69655c99..5814a941a4 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html @@ -83,7 +83,6 @@ function loadFSGrid() { var store = new dojo.data.ItemFileReadStore({data:acqfs.toStoreData([fundingSource])}); var model = new dojox.grid.data.DojoData(null, store, {rowsPerPage: 20, clientSort: true, query:{id:'*'}}); - model.query = {id:'*'}; fundingSourceGrid.setModel(model); fundingSourceGrid.update(); } @@ -128,7 +127,7 @@ - +