From: erickson Date: Mon, 11 Feb 2008 17:53:10 +0000 (+0000) Subject: changed some method names to be more Pythonic. change Fund Source labels to Funding... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a77f9470e1abf158875222f49cb62ec6798ada59;p=Evergreen.git changed some method names to be more Pythonic. change Fund Source labels to Funding Source git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8712 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py index 13f52db6fb..52027fee51 100644 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py +++ b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py @@ -65,7 +65,7 @@ class AcqContext(SubContext): self.picklist_entry_marc_html = ContextItem() def postinit(self): - self.prefix = "%s/acq" % Context.getContext().core.prefix + self.prefix = "%s/acq" % Context.get_context().core.prefix -Context.applySubContext('acq', AcqContext) +Context.apply_sub_context('acq', AcqContext) diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py b/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py index 466b098cf4..578806e0cb 100644 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py +++ b/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py @@ -15,9 +15,9 @@ class AdminContext(SubContext): self.mode = ContextItem(default_value='view') self.prefix = ContextItem() def postinit(self): - self.prefix = "%s/admin" % Context.getContext().core.prefix + self.prefix = "%s/admin" % Context.get_context().core.prefix -Context.applySubContext('adm', AdminContext) +Context.apply_sub_context('adm', AdminContext) class AdminController(BaseController): diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/base.py b/Open-ILS/web/oilsweb/oilsweb/controllers/base.py index a0f296b775..26b4bfb8ff 100644 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/base.py +++ b/Open-ILS/web/oilsweb/oilsweb/controllers/base.py @@ -9,8 +9,8 @@ log = logging.getLogger(__name__) class BaseContext(SubContext): def postinit(self): - self.prefix = "%s/base" % Context.getContext().core.prefix -Context.applySubContext('base', BaseContext) + self.prefix = "%s/base" % Context.get_context().core.prefix +Context.apply_sub_context('base', BaseContext) class BaseController(BaseController): diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py b/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py index 85046ba59e..1cb33627ed 100644 --- a/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py +++ b/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py @@ -37,7 +37,7 @@ class CoreContext(SubContext): usermgr.fetch_user() #self.work_orgs = usermgr.fetch_work_orgs() -Context.applySubContext('core', CoreContext) +Context.apply_sub_context('core', CoreContext) class UtilContext(SubContext): @@ -48,6 +48,6 @@ class UtilContext(SubContext): self.get_org_type = ContextItem(default_value=oils.org.OrgUtil.get_org_type) self.get_min_org_depth = ContextItem(default_value=oils.org.OrgUtil.get_min_depth) -Context.applySubContext('util', UtilContext) +Context.apply_sub_context('util', UtilContext) diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/context.py b/Open-ILS/web/oilsweb/oilsweb/lib/context.py index 80262f0588..5a4afd82af 100644 --- a/Open-ILS/web/oilsweb/oilsweb/lib/context.py +++ b/Open-ILS/web/oilsweb/oilsweb/lib/context.py @@ -63,14 +63,13 @@ class Context(object): if val is not None and val != f.default_value: session[f.cgi_name] = val - @staticmethod - def applySubContext(app, ctx): + def apply_sub_context(app, ctx): global _subContexts _subContexts[app] = ctx @staticmethod - def getContext(): + def get_context(): global _context return _context diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html index d63ce640fc..350cb97a90 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html @@ -4,6 +4,14 @@ <%def name="page_title()">${_('Funding Sources')} <%def name="block_content()"> +
+
${_('Funding Sources')}
+ +
+ + diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/navigate.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/navigate.html index e06ad8fad7..bcbf1e9c7b 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/navigate.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/navigate.html @@ -8,7 +8,3 @@
${_('Funding Sources')}
-
- ${_('New Funding Source')} -
- diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html index 8f07cc1126..6225f5a1f6 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + <%inherit file='../base.html'/> <%def name="page_title()">${_('Picklist')} <%def name="block_content()">