Changed the title for the process_request webpage.
Also removed some whitespace.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/templates/soc/request/process_invite.html Sun Jan 25 14:43:49 2009 +0000
+++ b/app/soc/templates/soc/request/process_invite.html Sun Jan 25 15:01:55 2009 +0000
@@ -15,7 +15,7 @@
{% load forms_helpers %}
{% block header_title %}
-{{ page_name }} for {{ entity.requester.link_id }}
+{{ page_name }} for {{ entity.scope.link_id }}
{% endblock %}
{% block body %}
--- a/app/soc/views/models/request.py Sun Jan 25 14:43:49 2009 +0000
+++ b/app/soc/views/models/request.py Sun Jan 25 15:01:55 2009 +0000
@@ -103,7 +103,7 @@
'Create invite for %(name_plural)s'),
(r'^%(url_name)s/(?P<access_type>process_invite)/%(key_fields)s$',
'soc.views.models.%(module_name)s.process_invite',
- 'Process Invite to for a Role')]
+ 'Process Invite to become')]
new_params['extra_django_patterns'] = patterns
@@ -146,7 +146,6 @@
# get the context for this webpage
context = responses.getUniversalContext(request)
- context['page_name'] = page_name
request_logic = params['logic']
@@ -156,7 +155,11 @@
'role': kwargs['role'],
'state': 'group_accepted'}
request_entity = request_logic.getForFields(fields, unique=True)
-
+
+ # set the page name using the request_entity
+ context['page_name'] = '%s %s' % (page_name,
+ request_entity.role_verbose)
+
get_dict = request.GET
if 'status' in get_dict.keys():
@@ -164,7 +167,7 @@
# this invite has been rejected mark as rejected
request_logic.updateModelProperties(request_entity, {
'state': 'rejected'})
-
+
# redirect to user role overview
return http.HttpResponseRedirect('/user/roles')