Redone the request templates to work with the new ID-based request.
Changes here also include upcoming View changes.
--- a/app/soc/templates/soc/request/list/row.html Sun Oct 25 16:27:49 2009 -0700
+++ b/app/soc/templates/soc/request/list/row.html Sun Oct 25 16:28:43 2009 -0700
@@ -3,11 +3,11 @@
<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
<td align="right"><div class="role"><a class="noul"
- href="{{ list.redirect }}">{{ list.item.role_verbose }}</a>
+ href="{{ list.redirect }}">{{ list.item.role }}</a>
</div>
</td>
- <td><div class="user_link_id">{% as_user list.item.link_id %}</div></td>
- <td><div class="for">{{ list.item.scope.name }}</div></td>
+ <td><div class="user">{% as_user list.item.user.link_id %}</div></td>
+ <td><div class="for">{{ list.item.group.name }}</div></td>
<td><div class="status">{{ list.item.status }}</div></td>
<td><div class="created">{{ list.item.created_on|date:"jS F Y H:i" }}</div></td>
</tr>
--- a/app/soc/templates/soc/request/process_invite.html Sun Oct 25 16:27:49 2009 -0700
+++ b/app/soc/templates/soc/request/process_invite.html Sun Oct 25 16:28:43 2009 -0700
@@ -17,7 +17,7 @@
{% block body %}
<p>
<div="text">
-You have been invited to become a {{ entity.role_verbose }} for {{entity.scope.name }}.
+You have been invited to become a {{ role_name }} for {{ entity.group.name }}.
Please select your response.
</div>
</p>
@@ -25,7 +25,7 @@
<tr>
<td>
<input type="button" onclick="location.href='{{ invite_accepted_redirect }}'" value="Accept"/>
- <input type="button" onclick="location.href='/{{ module_name }}/process_invite/{{ entity.scope_path }}/{{ entity.role }}/{{ entity.link_id }}?status=rejected'" value="Reject"/>
+ <input type="button" onclick="location.href='/{{ module_name }}/process_invite/{{ entity.key.id_or_name }}?status=rejected'" value="Reject"/>
</td>
</tr>
</table>
--- a/app/soc/templates/soc/request/process_request.html Sun Oct 25 16:27:49 2009 -0700
+++ b/app/soc/templates/soc/request/process_request.html Sun Oct 25 16:28:43 2009 -0700
@@ -17,9 +17,9 @@
{% block body %}
<p>
<div="text">
-{% ifequal request_status "new" %}
- This is the request from <b>{{ user_in_request.name }}({{ entity.link_id }})</b>
- to become a <b>{{ entity.role_verbose }}</b> for <b>{{entity.scope.name }}</b>.</br>
+{% ifnotequal request_status "group_accepted" %}
+ This is the request from <b>{{ entity.user.name }}({{ entity.user.link_id }})</b>
+ to become a <b>{{ role_verbose }}</b> for <b>{{entity.group.name }}</b>.</br>
Please select your response by using the buttons below.
</div>
</p>
@@ -27,17 +27,17 @@
<table>
<tr>
<td>
- <input type="button" onclick="location.href='/{{ role_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?status=group_accepted'" value="Accept"/>
- <input type="button" onclick="location.href='/{{ role_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?status=rejected'" value="Reject"/>
- <input type="button" onclick="location.href='/{{ role_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?status=ignored'" value="Ignore"/>
+ <input type="button" onclick="location.href='/{{ url_name }}/process_request/{{ entity.key.id_or_name }}?status=group_accepted'" value="Accept"/>
+ <input type="button" onclick="location.href='/{{ url_name }}/process_request/{{ entity.key.id_or_name }}?status=rejected'" value="Reject"/>
+ <input type="button" onclick="location.href='/{{ url_name }}/process_request/{{ entity.key.id_or_name }}?status=ignored'" value="Ignore"/>
</td>
</tr>
</table>
{% else %}
<p>
<div="text">
- This is the invitation to <b>{{ user_in_request.name }}({{ entity.link_id }})</b> to become a
- <b>{{ entity.role_verbose }}</b> for <b>{{entity.scope.name }}</b>.<br/>
+ This is the invitation to <b>{{ entity.user.name }}({{ entity.user.link_id }})</b> to become a
+ <b>{{ role_verbose }}</b> for <b>{{entity.group.name }}</b>.<br/>
If you would like to withdraw this invite please press the withdraw button below.
</div>
</p>
@@ -45,10 +45,10 @@
<table>
<tr>
<td>
- <input type="button" onclick="location.href='/{{ role_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?status=rejected'" value="Withdraw"/>
+ <input type="button" onclick="location.href='/{{ url_name }}/process_request/{{ entity.key.id_or_name }}?status=rejected'" value="Withdraw"/>
<input type="button" value="Back to Previous Page" onClick="javascript: history.go(-1)">
</td>
</tr>
</table>
-{% endifequal %}
+{% endifnotequal %}
{% endblock body %}