# HG changeset patch # User Sverre Rabbelier # Date 1234729676 0 # Node ID 582661519e5d8da77f8ebca952d9cce5ef35e554 # Parent 6be502a1bcc6309240757e3457c2e9e3e5b2958a Refactor various django templates to reuse other templates where possible Patch by: Sverre Rabbelier diff -r 6be502a1bcc6 -r 582661519e5d app/soc/templates/soc/base.html --- a/app/soc/templates/soc/base.html Sun Feb 15 20:27:09 2009 +0000 +++ b/app/soc/templates/soc/base.html Sun Feb 15 20:27:56 2009 +0000 @@ -92,7 +92,7 @@ {% endif %} {% if is_debug %}
- +
| Admin | {% endif %} diff -r 6be502a1bcc6 -r 582661519e5d app/soc/templates/soc/models/edit.html --- a/app/soc/templates/soc/models/edit.html Sun Feb 15 20:27:09 2009 +0000 +++ b/app/soc/templates/soc/models/edit.html Sun Feb 15 20:27:56 2009 +0000 @@ -29,6 +29,11 @@ Please use this form to edit the {{ entity_type }}. {% endblock %}

+ +{% if error_message %} +
{{ error_message|safe }}
+{% endif %} +
{% block form_table %} @@ -41,9 +46,11 @@ {% block submit_buttons %} + {% block save_button %} + {% endblock %} - -{% endblock %} \ No newline at end of file + +{% block delete_button %}{% endblock %}
{% if edit_cancel_redirect %} diff -r 6be502a1bcc6 -r 582661519e5d app/soc/templates/soc/org_app/review_overview.html --- a/app/soc/templates/soc/org_app/review_overview.html Sun Feb 15 20:27:09 2009 +0000 +++ b/app/soc/templates/soc/org_app/review_overview.html Sun Feb 15 20:27:56 2009 +0000 @@ -14,7 +14,13 @@ {% endcomment %} {% block body %} -If you want to accept all pre-accepted organizations please + + If you want to accept all pre-accepted organizations please + + + + + {{ block.super}} {% endblock %} diff -r 6be502a1bcc6 -r 582661519e5d app/soc/templates/soc/request/create.html --- a/app/soc/templates/soc/request/create.html Sun Feb 15 20:27:09 2009 +0000 +++ b/app/soc/templates/soc/request/create.html Sun Feb 15 20:27:56 2009 +0000 @@ -1,4 +1,4 @@ -{% extends "soc/base.html" %} +{% extends "soc/models/edit.html" %} {% comment %} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,44 +12,13 @@ See the License for the specific language governing permissions and limitations under the License. {% endcomment %} -{% load forms_helpers %} -{% block header_title %} -{{ page_name }} +{% block instructions %} +{{ instruction_message }} {% endblock %} -{% block body %} -

-

-{% block instructions %} -{{instruction_message}} -{% endblock %} -{% if error_message %} -

- {{error_message|safe}} -
-{% endif %} -

- - - {% block form_table %} - {% as_table form %} - {% endblock form_table %} -
- - - - - - {% block submit_buttons %} +{% block save_button %} - -
 
- -
- -

-{% endblock submit_buttons %} -{% endblock body %} +{% endblock %} diff -r 6be502a1bcc6 -r 582661519e5d app/soc/templates/soc/role/edit.html --- a/app/soc/templates/soc/role/edit.html Sun Feb 15 20:27:09 2009 +0000 +++ b/app/soc/templates/soc/role/edit.html Sun Feb 15 20:27:56 2009 +0000 @@ -1,4 +1,4 @@ -{% extends "soc/base.html" %} +{% extends "soc/models/edit.html" %} {% comment %} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,16 +21,7 @@ {% endif %} {% endblock %} -{% block header_title %} -{{ page_name }} - {% if entity %} - - {% if entity.name %}{{ entity.name }} {% endif %}(public view) - {% endif %} -{% endblock %} -{% block body %} {% block body_tag %} {% if gmaps_api_key %} @@ -38,20 +29,16 @@ {{ block.super }} {% endif %} {% endblock %} -

-

+ {% block instructions %} -Please use this form to edit the {{ entity_type }}. +{{ block.super }} {% if not gmaps_api_key %}
Google Maps API key not present. Please login as administrator and insert your key in Site Settings, Google Maps field. {% endif %} {% endblock %} -

-
- - {% block form_table %} - {% as_table form %} - {% endblock %} + +{% block form_table %} +{{ block.super }} {% if gmaps_api_key %} {% endif %} -
@@ -65,27 +52,4 @@
- - - - - - {% block submit_buttons %} - - - {% if entity %} - - {% endif %} - {% endblock %} - -
 
- - - - - -
-
-

{% endblock %} diff -r 6be502a1bcc6 -r 582661519e5d app/soc/templates/soc/timeline/edit.html --- a/app/soc/templates/soc/timeline/edit.html Sun Feb 15 20:27:09 2009 +0000 +++ b/app/soc/templates/soc/timeline/edit.html Sun Feb 15 20:27:56 2009 +0000 @@ -16,11 +16,5 @@ {% block instructions %} {{ block.super }} Note that all times are in UTC. {% endblock %} -{% block submit_buttons %} -
- - - -