app/soc/views/models/role.py
changeset 2748 7fbc98f3adde
parent 2678 a525a55833f1
child 2759 5a8bd9d7725c
--- a/app/soc/views/models/role.py	Mon Aug 10 16:35:01 2009 -0700
+++ b/app/soc/views/models/role.py	Mon Aug 10 16:58:51 2009 -0700
@@ -105,7 +105,7 @@
           'Accept invite for %(name)s'),
           (r'^%(url_name)s/(?P<access_type>process_request)/%(scope)s/%(lnp)s$',
           'soc.views.models.%(module_name)s.process_request',
-          'Process request for %(name)s'),
+          'Process request'),
           (r'^%(url_name)s/(?P<access_type>request)/%(scope)s$',
           'soc.views.models.%(module_name)s.role_request',
           'Create a Request to become %(name)s')]
@@ -575,10 +575,6 @@
       kwargs: the Key Fields for the specified entity
     """
 
-    # get the context for this webpage
-    context = responses.getUniversalContext(request)
-    responses.useJavaScript(context, params['js_uses_all'])
-    context['page_name'] = page_name
 
     # get the request entity using the information from kwargs
     fields = {'link_id': kwargs['link_id'],
@@ -586,9 +582,16 @@
         'role': params['logic'].role_name}
     request_entity = request_logic.logic.getForFields(fields, unique=True)
 
+    # get the context for this webpage
+    context = responses.getUniversalContext(request)
+    responses.useJavaScript(context, params['js_uses_all'])
+
     # pylint: disable-msg=E1103
     user_entity = user_logic.logic.getFromKeyNameOr404(request_entity.link_id)
 
+    context['page_name'] = '%s from %s to become a %s' %(
+        page_name, user_entity.name, request_entity.role_verbose)
+
     get_dict = request.GET
 
     if 'status' in get_dict.keys():