# HG changeset patch
# User Lennard de Rijk
# Date 1236542842 0
# Node ID 0a332ff872bfbd4b8042dab3508d43d4fe644024
# Parent 972c546f08109807df989e513e9449477f4577c7
The process_request template now properly differentiate between a request in "new" and "group_accepted" state.
Should solve issue 237.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
diff -r 972c546f0810 -r 0a332ff872bf app/soc/templates/soc/request/process_request.html
--- a/app/soc/templates/soc/request/process_request.html Sun Mar 08 19:12:17 2009 +0000
+++ b/app/soc/templates/soc/request/process_request.html Sun Mar 08 20:07:22 2009 +0000
@@ -21,11 +21,14 @@
{% block body %}
-This is a request from {{ entity.link_id }} to become a {{ entity.role_verbose }} for {{entity.scope.name }}.
-Please select your response.
+{% ifequal request_status "new" %}
+ This is a request from {{ entity.link_id }} to become a
+ {{ entity.role_verbose }} for {{entity.scope.name }}.
+ Please select your response by using the buttons below.
+
+{% else %}
+
+
+ This is a invite to {{ entity.link_id }} to become a
+ {{ entity.role_verbose }} for {{entity.scope.name }}.
+ If you would like to withdraw this invite please press the withdraw button below.
+
+
-{% endblock %}
+
+{% endifequal %}
+{% endblock body %}
diff -r 972c546f0810 -r 0a332ff872bf app/soc/views/models/role.py
--- a/app/soc/views/models/role.py Sun Mar 08 19:12:17 2009 +0000
+++ b/app/soc/views/models/role.py Sun Mar 08 20:07:22 2009 +0000
@@ -603,9 +603,9 @@
'scope_path': kwargs['scope_path'],
'role': params['module_name']}
request_entity = request_logic.logic.getForFields(fields, unique=True)
-
+
get_dict = request.GET
-
+
if 'status' in get_dict.keys():
if get_dict['status'] in ['group_accepted', 'rejected', 'ignored']:
# update the request_entity and redirect away from this page
@@ -630,6 +630,7 @@
# put the entity in the context
context['entity'] = request_entity
+ context['request_status'] = request_entity.status
context['module_name'] = params['module_name']
#display the request processing page using the appropriate template