Brown paper bag fix
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 31 Jan 2009 12:22:01 +0000
changeset 1102 8765079db045
parent 1101 6c0f9b73b053
child 1103 794162cfca92
Brown paper bag fix We can only add the create link if there is a site entity. Patch by: Sverre Rabbelier
app/soc/views/models/site.py
--- 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