Added three new redirect methods.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- 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.
"""