Some code re-use in templates
As a side-effect the pre-accept and pre-accept are now first, rather
then mingled with the other buttons.
Patch by: Sverre Rabbelier
--- a/app/soc/templates/soc/group_app/review.html Thu Mar 12 21:38:40 2009 +0000
+++ b/app/soc/templates/soc/group_app/review.html Thu Mar 12 22:29:14 2009 +0000
@@ -34,15 +34,16 @@
</table>
</p>
-{% block buttons %}
<tr>
<td>
+{% block buttons %}
<input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=accepted'" value="Accept"/>
<input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=rejected'" value="Reject"/>
<input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=ignored'" value="Ignore"/>
<input type="button" onclick="location.href='/{{ entity_type_url|lower }}/delete/{{ entity.key.name }}'" value="Delete"/>
+{% endblock buttons %}
</td>
</tr>
</table>
-{% endblock buttons %}
+
{% endblock body %}
--- a/app/soc/templates/soc/org_app/review.html Thu Mar 12 21:38:40 2009 +0000
+++ b/app/soc/templates/soc/org_app/review.html Thu Mar 12 22:29:14 2009 +0000
@@ -31,15 +31,9 @@
{% readonly_field_as_twoline_table_row entity.fields.ideas.label entity.ideas %}
{% readonly_safe_field_as_twoline_table_row entity.fields.contrib_template.label entity.contrib_template %}
{% endblock %}
+
{% block buttons %}
-<tr>
- <td>
<input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=pre-accepted'" value="Pre-Accept"/>
- <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=accepted'" value="Accept"/>
<input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=pre-rejected'" value="Pre-Reject"/>
- <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=rejected'" value="Reject"/>
- <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.key.name }}?status=ignored'" value="Ignore"/>
- </td>
-</tr>
-</table>
+ {{ block.super }}
{% endblock buttons %}