app/soc/views/helper/redirects.py
changeset 2434 f6d45459b6b4
parent 2176 3e5187b444db
child 2491 f5776b6116fd
--- a/app/soc/views/helper/redirects.py	Sun Jun 28 14:40:55 2009 +0200
+++ b/app/soc/views/helper/redirects.py	Sun Jun 28 14:45:08 2009 +0200
@@ -110,15 +110,17 @@
   return '/%s/home/%s' % (
       params['url_name'], entity.key().id_or_name())
 
+
 def getReviewRedirect(entity, params):
   """Returns the redirect to review the specified entity.
   """
-  
+
   return '/%s/review/%s' % (
       params['url_name'], entity.key().id_or_name())
 
+
 def getReviewOverviewRedirect(entity, params):
-  """Returns the redirect to the review_overview using the 
+  """Returns the redirect to the review_overview using the
      keyname of the specified entity.
   """
 
@@ -345,6 +347,27 @@
   return '/document/list/%s/%s' % (prefix, entity.key().id_or_name())
 
 
+def getCreateSurveyRedirect(entity, prefix):
+  """Returns the redirect for new documents.
+  """
+
+  return '/survey/create/%s/%s' % (prefix, entity.key().id_or_name())
+
+
+def getListSurveysRedirect(entity, prefix):
+  """Returns the redirect for listing documents.
+  """
+
+  return '/survey/list/%s/%s' % (prefix, entity.key().id_or_name())
+
+
+def getListSurveyResultsRedirect(entity, prefix):
+  """Returns the redirect for listing documents.
+  """
+
+  return '/survey/list_results/%s/%s' % (prefix, entity.key().id_or_name())
+
+
 def getToSRedirect(presence):
   """Returns link to 'show' the ToS Document if it exists, None otherwise.