tracking the rendered page in the core context. not attempting to display object...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 6 Jan 2008 21:49:26 +0000 (21:49 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 6 Jan 2008 21:49:26 +0000 (21:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8337 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/oilsweb/oilsweb/lib/__init__.py
Open-ILS/web/oilsweb/oilsweb/lib/request.py
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/navigate.html

index 1012679..d3bfe1f 100644 (file)
@@ -20,6 +20,7 @@ class CoreContext(SubContext):
         self.authtoken = ContextItem(cgi_name='ses', session=True) # authtoken string
         self.user = ContextItem() # logged in user object
         self.workstation = ContextItem() # workstation object
+        self.page = ContextItem() # the current page
 
     def postinit(self):
         import pylons.config
index 7e41443..eeb5e50 100644 (file)
@@ -38,6 +38,7 @@ class RequestMgr(object):
             would be 'base/dashboard.html'
             '''
         self.finalize()
+        self.ctx.core.page = tpath
         return pylons.templating.render('oils/%s/%s' % (self.ctx.core.skin, tpath))
 
 
index 03ebdb3..fbbc9c5 100644 (file)
@@ -1,7 +1,7 @@
 <span>
     <a href='${c.oils.adm.prefix}/search/${c.oils.adm.object_class}'>${_('Search')}</a>
 </span>
-% if c.oils.adm.mode != 'create':
+% if c.oils.adm.mode != 'create' and c.oils.core.page != 'admin/index.html':
     <span>
         <a href='${c.oils.adm.prefix}/create/${c.oils.adm.object_class}'>${_('Create')}</a>
     </span>