From d7f4dede2d05ee22bb4d743aef1586631ec35b48 Mon Sep 17 00:00:00 2001 From: etienne Date: Sun, 17 Jan 2010 19:03:44 +0000 Subject: Simplify the customization of templates - #69 git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@43 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864 --- templates/base.html | 10 +++++++--- templates/base_user.html | 10 ++++++++++ templates/edit.html | 7 +++---- templates/edit_route.html | 8 +++----- templates/main_map.html | 10 +++++----- templates/submited.html | 5 +++-- 6 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 templates/base_user.html diff --git a/templates/base.html b/templates/base.html index 956347a..c358fa2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,6 +12,7 @@ + {% block top %}{% endblock %}
+ {% block message_map %}{% endblock %} + {% block message_edit %}{% endblock %} {% block sidebar %}{% endblock %}
{% block content %}{% endblock %}
- {% block footer %} - - {% endblock %} + {% block bottom %}{% endblock %} + diff --git a/templates/base_user.html b/templates/base_user.html new file mode 100644 index 0000000..2255311 --- /dev/null +++ b/templates/base_user.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load i18n %} +{# to customize your base Chimère template add codes between the following blocks #} +{# top of the page before the tabs #}{% block top %}{% endblock %} +{# message block displayed on the map #}{% block message_map %}{% endblock %} +{# message block displayed on the edit pages #}{% block message_edit %}{% endblock %} +{# top of the page after the tabs #}{% block sidebar %}{% endblock %} +{# main part of the page #}{% block content %}{% endblock %} +{# bottom of the page before the footer #}{% block bottom %}{% endblock %} +{# inside the footer - please leave bloc.super it shows the Chimère copyright #}{% block footer %}{{ block.super }}{% endblock %} diff --git a/templates/edit.html b/templates/edit.html index 4f9d015..730035b 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -1,9 +1,8 @@ -{% extends "base.html" %} +{% extends "base_user.html" %} {% load i18n %} -{% block sidebar %} -{% endblock %} +{% block message_map %}{% endblock %} -{% block content %} +{% block content %}{{ block.super }} {% if error_message %}

{{ error_message }}

{% endif %}
{% trans "Add a new site" %} diff --git a/templates/edit_route.html b/templates/edit_route.html index d870b0e..7f1aa1d 100644 --- a/templates/edit_route.html +++ b/templates/edit_route.html @@ -1,9 +1,7 @@ -{% extends "base.html" %} +{% extends "base_user.html" %} {% load i18n %} -{% block sidebar %} -{% endblock %} - -{% block content %} +{% block message_map %}{% endblock %} +{% block content %}{{ block.super }} {% if error_message %}

{{ error_message }}

{% endif %}
{% trans "Add a new route" %} diff --git a/templates/main_map.html b/templates/main_map.html index 164d0ae..4d4f94d 100644 --- a/templates/main_map.html +++ b/templates/main_map.html @@ -1,6 +1,7 @@ -{% extends "base.html" %} +{% extends "base_user.html" %} {% load i18n %} -{% block sidebar %} +{% block message_edit %}{% endblock %} +{% block sidebar %}{{ block.super }}
    {% for category, lst_sub_categories in sub_categories %} @@ -37,7 +38,7 @@ lst_{{category.id}}.push("{{sub_category.id}}");{% endfor %}
{{welcome}}{% endblock %} -{% block content %}
+{% block content %}{{ block.super }}
{% endblock %} -{% block footer %} - +{% block footer %} {% endblock %} diff --git a/templates/submited.html b/templates/submited.html index eae3623..ab40cce 100644 --- a/templates/submited.html +++ b/templates/submited.html @@ -1,6 +1,7 @@ -{% extends "base.html" %} +{% extends "base_user.html" %} {% load i18n %} -{% block content %} +{% block message_map %}{% endblock %} +{% block content %}{{ block.super }}

{% trans "Your proposition has been submited. A moderator will treat your submission shortly. Thanks!" %}

-- cgit v1.2.3