Some code re-use in templates
authorSverre Rabbelier <srabbelier@gmail.com>
Thu, 12 Mar 2009 22:29:14 +0000
changeset 1814 0c4fd663704b
parent 1813 5cc9e055a818
child 1815 7a9b69f36111
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
app/soc/templates/soc/group_app/review.html
app/soc/templates/soc/org_app/review.html
--- 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 %}