Added Survey menu items to the Program menu.
Patch by: Daniel Diniz
Reviewed by: Lennard de Rijk
--- a/app/soc/views/models/program.py Sun Jun 28 14:48:19 2009 +0200
+++ b/app/soc/views/models/program.py Sun Jun 28 14:49:39 2009 +0200
@@ -52,6 +52,7 @@
from soc.views.models import presence
from soc.views.models import document as document_view
from soc.views.models import sponsor as sponsor_view
+from soc.views.models import survey as survey_view
from soc.views.sitemap import sidebar
import soc.cache.logic
@@ -636,6 +637,7 @@
if entity.status == 'visible':
# show the documents for this program, even for not logged in users
items += document_view.view.getMenusForScope(entity, params)
+ items += survey_view.view.getMenusForScope(entity, params)
items += self._getTimeDependentEntries(entity, params, id, user)
try:
@@ -670,6 +672,12 @@
# add link to list all Program Document
items += [(redirects.getListDocumentsRedirect(entity, 'program'),
"List Documents", 'any_access')]
+ # add link to create a new Program Survey
+ items += [(redirects.getCreateSurveyRedirect(entity, 'program'),
+ "Create a New Survey", 'any_access')]
+ # add link to list all Program Surveys
+ items += [(redirects.getListSurveysRedirect(entity, 'program'),
+ "List Surveys", 'any_access')]
except out_of_band.Error:
pass