Added three new redirect methods.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 11 Apr 2009 13:34:37 +0000
changeset 2153 7c8adb14c7fb
parent 2152 3c3f0cd9873d
child 2154 a0a1594e58ae
Added three new redirect methods. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/helper/redirects.py
--- a/app/soc/views/helper/redirects.py	Sat Apr 11 13:32:35 2009 +0000
+++ b/app/soc/views/helper/redirects.py	Sat Apr 11 13:34:37 2009 +0000
@@ -176,6 +176,16 @@
   return result
 
 
+def getListProjectsRedirect(entity, params):
+  """Returns the redirect for the List Projects page for the given entity.
+  """
+
+  result = '/%s/list_projects/%s' % (
+      params['url_name'], entity.key().name())
+
+  return result
+
+
 def getListRequestsRedirect(entity, params):
   """Returns the redirect for the List Requests paged for the given
   Group entity and Group View params.
@@ -279,6 +289,14 @@
       params['url_name'], entity.key().name())
 
 
+def getStudentEditRedirect(entity, params):
+  """Returns the redirect for Students to edit their Projects.
+  """
+
+  return '/%s/st_edit/%s' % (
+      params['url_name'], entity.key().name())
+
+
 def getStudentProposalRedirect(entity, params):
   """Returns the student proposal redirect for the given org and student.
   """
@@ -289,6 +307,14 @@
   return result
 
 
+def getShowDuplicatesRedirect(entity, params):
+  """Returns the show duplicates redirect for the specified entity.
+  """
+
+  return'/%s/show_duplicates/%s' % (
+      params['url_name'], entity.key().name())
+
+
 def getSlotsRedirect(entity, params):
   """Returns the slots redirect for the specified entity.
   """