Skip to content

Commit

Permalink
Move the edition dependent templates to their own dir
Browse files Browse the repository at this point in the history
  • Loading branch information
danniel committed Jul 11, 2024
1 parent 8b0d607 commit ae5971a
Show file tree
Hide file tree
Showing 10 changed files with 684 additions and 671 deletions.
6 changes: 5 additions & 1 deletion backend/civil_society_vote/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@

urlpatterns_i18n = i18n_patterns(
path(_("about/"), StaticPageView.as_view(template_name="about.html"), name="about"),
path(_("rules/"), StaticPageView.as_view(template_name="rules.html"), name="rules"),
path(
_("%(CURRENT_EDITION_TYPE)s/rules/") % {"CURRENT_EDITION_TYPE": settings.CURRENT_EDITION_TYPE},
StaticPageView.as_view(template_name=f"{settings.CURRENT_EDITION_TYPE}/rules.html"),
name="rules",
),
path(
_("terms/"),
StaticPageView.as_view(template_name="terms_and_conditions.html"),
Expand Down
4 changes: 3 additions & 1 deletion backend/hub/templates/candidate/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
{% block content %}

{% block extra-header %}
{% include "partials/ces_header.html" %}
{% with header_template=CURRENT_EDITION_TYPE|add:"/edition_header.html" %}
{% include header_template %}
{% endwith %}
{% endblock %}

{% block domain-filters %}
Expand Down
4 changes: 3 additions & 1 deletion backend/hub/templates/candidate/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
{% load i18n %}

{% block extra-header %}
{% include "partials/ces_header.html" %}
{% with header_template=CURRENT_EDITION_TYPE|add:"/edition_header.html" %}
{% include header_template %}
{% endwith %}
{% endblock %}


Expand Down
4 changes: 3 additions & 1 deletion backend/hub/templates/candidate/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
{% load hub_tags %}

{% block extra-header %}
{% include "partials/ces_results_header.html" %}
{% with header_template=CURRENT_EDITION_TYPE|add:"/edition_results_header.html" %}
{% include header_template %}
{% endwith %}
{% endblock %}


Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion backend/hub/templates/committee/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
{% endblock domain-filters %}

{% block extra-header %}
{% include "partials/ces_header.html" %}
{% with header_template=CURRENT_EDITION_TYPE|add:"/edition_header.html" %}
{% include header_template %}
{% endwith %}
{% endblock %}

{% block left-side-view %}
Expand Down
Loading

0 comments on commit ae5971a

Please sign in to comment.