Brown paper bag fix
We can only add the create link if there is a site entity.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/site.py Sat Jan 31 12:12:05 2009 +0000
+++ b/app/soc/views/models/site.py Sat Jan 31 12:22:01 2009 +0000
@@ -103,10 +103,9 @@
if entity:
submenus += document_view.view.getMenusForScope(entity, self._params)
-
- if accounts.isDeveloper(id, user):
- submenus += [(redirects.getCreateDocumentRedirect(entity, 'site'),
- "Create new document", 'any_access')]
+ if accounts.isDeveloper(id, user):
+ submenus += [(redirects.getCreateDocumentRedirect(entity, 'site'),
+ "Create new document", 'any_access')]
new_params = {}
new_params['sidebar_additional'] = submenus