# HG changeset patch # User Daniel Diniz # Date 1246193379 -7200 # Node ID 32620683a7a6bdde6ff02e69ef578425cec7afee # Parent cbcd87155630c63d0437f5076c9b3c63da1eaa17 Added Survey menu items to the Program menu. Patch by: Daniel Diniz Reviewed by: Lennard de Rijk diff -r cbcd87155630 -r 32620683a7a6 app/soc/views/models/program.py --- 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