app/soc/views/helper/redirects.py
changeset 2153 7c8adb14c7fb
parent 2114 1b3830abcdf7
child 2160 3f9dd37d98a8
equal deleted inserted replaced
2152:3c3f0cd9873d 2153:7c8adb14c7fb
   174       params['url_name'], entity.key().name())
   174       params['url_name'], entity.key().name())
   175 
   175 
   176   return result
   176   return result
   177 
   177 
   178 
   178 
       
   179 def getListProjectsRedirect(entity, params):
       
   180   """Returns the redirect for the List Projects page for the given entity.
       
   181   """
       
   182 
       
   183   result = '/%s/list_projects/%s' % (
       
   184       params['url_name'], entity.key().name())
       
   185 
       
   186   return result
       
   187 
       
   188 
   179 def getListRequestsRedirect(entity, params):
   189 def getListRequestsRedirect(entity, params):
   180   """Returns the redirect for the List Requests paged for the given
   190   """Returns the redirect for the List Requests paged for the given
   181   Group entity and Group View params.
   191   Group entity and Group View params.
   182   """
   192   """
   183 
   193 
   277 
   287 
   278   return '/%s/applicant/%s' % (
   288   return '/%s/applicant/%s' % (
   279       params['url_name'], entity.key().name())
   289       params['url_name'], entity.key().name())
   280 
   290 
   281 
   291 
       
   292 def getStudentEditRedirect(entity, params):
       
   293   """Returns the redirect for Students to edit their Projects.
       
   294   """
       
   295 
       
   296   return '/%s/st_edit/%s' % (
       
   297       params['url_name'], entity.key().name())
       
   298 
       
   299 
   282 def getStudentProposalRedirect(entity, params):
   300 def getStudentProposalRedirect(entity, params):
   283   """Returns the student proposal redirect for the given org and student.
   301   """Returns the student proposal redirect for the given org and student.
   284   """
   302   """
   285 
   303 
   286   result ='/%s/apply/%s?organization=%s' % (
   304   result ='/%s/apply/%s?organization=%s' % (
   287       params['url_name'], params['student_key'], entity.link_id)
   305       params['url_name'], params['student_key'], entity.link_id)
   288 
   306 
   289   return result
   307   return result
       
   308 
       
   309 
       
   310 def getShowDuplicatesRedirect(entity, params):
       
   311   """Returns the show duplicates redirect for the specified entity.
       
   312   """
       
   313 
       
   314   return'/%s/show_duplicates/%s' % (
       
   315       params['url_name'], entity.key().name())
   290 
   316 
   291 
   317 
   292 def getSlotsRedirect(entity, params):
   318 def getSlotsRedirect(entity, params):
   293   """Returns the slots redirect for the specified entity.
   319   """Returns the slots redirect for the specified entity.
   294   """
   320   """