From 46cb6dddb3a4ac7e6a7169547a21860546e62071 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Mon, 18 Feb 2019 19:24:35 +0100 Subject: [PATCH] Title block for compatibility --- templates/base.html | 492 +++++++++++++++++++++++--------------------- 1 file changed, 260 insertions(+), 232 deletions(-) diff --git a/templates/base.html b/templates/base.html index 3ecf9fb1..9aab928d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -33,274 +33,302 @@ with this program; if not, write to the Free Software Foundation, Inc., {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} - - {# Open Graph for social media #} - - - - - - - + + {# Open Graph for social media #} + + + + + + + - {# Preload JavaScript #} - {% bootstrap_javascript %} - - - + {# Preload JavaScript #} + {% bootstrap_javascript %} + + + - {# Load CSS #} - {% bootstrap_css %} - - - - - {% block extrastyle %}{% endblock %} + {# Load CSS #} + {% bootstrap_css %} + + + + + {% block extrastyle %}{% endblock %} - {# Favicon with iOS, Android, touchbar support #} - - - - - - - + {# Favicon with iOS, Android, touchbar support #} + + + + + + + - {# Do not allow zooming on devices #} - + {# Do not allow zooming on devices #} + - {{ name_website }} : {% block title %}{% trans "Home" %}{% endblock %} + {{ name_website }} : {% block title %}{% trans "Home" %}{% endblock %} - {% block extrahead %}{% endblock %} - + {% block extrahead %}{% endblock %} + - - + +
+ {# Display breadcrumbs #} + {% block breadcrumbs %}{% endblock %} -
-
-
-
-
- {% block sidebar %} - {% endblock %} -
+ {# Some pages need a title block #} + {% block content_title %}{% if title %}

{{ title }}

{% endif %}{% endblock %} + + {# Display django.contrib.messages as Bootstrap alerts #} + {% bootstrap_messages %} + {% block content %}{% endblock %} +
+
+
+ {% if request_user.is_authenticated %} +
+

{{ request_user.name }} {{ request_user.surname }}

-
-
- {# Display breadcrumbs #} - {% block breadcrumbs %}{% endblock %} - - {# Display django.contrib.messages as Bootstrap alerts #} - {% bootstrap_messages %} - {% block content %}{% endblock %} -
-
-
- {% if request_user.is_authenticated %} -
-

{{ request_user.name }} {{ request_user.surname }}

-
- - - - - - - - - - - - + +
{% trans "Username" %}{{ request_user.pseudo }}
{% trans "Room" %}{{ request_user.room }}
{% trans "Internet access" %} + + + + + + + + + + + + - - - - + + + + - -
{% trans "Username" %}{{ request_user.pseudo }}
{% trans "Room" %}{{ request_user.room }}
{% trans "Internet access" %} {% if request_user.has_access %} - {% blocktrans with end_access_date=request.user.end_access|date:"d b Y" %}Until {{ end_access_date }}{% endblocktrans %} + + {% blocktrans with end_access_date=request.user.end_access|date:"d b Y" %}Until + {{ end_access_date }}{% endblocktrans %} {% else %} {% trans "Disabled" %} {% endif %} -
{% trans "Membership" %} +
{% trans "Membership" %} {% if request_user.is_adherent %} - {% blocktrans with end_adhesion_date=request_user.end_adhesion|date:"d b Y" %}Until {{ end_adhesion_date }}{% endblocktrans %} + + {% blocktrans with end_adhesion_date=request_user.end_adhesion|date:"d b Y" %} + Until {{ end_adhesion_date }}{% endblocktrans %} {% else %} {% trans "Non member" %} {% endif %} -
- - {% else %} -
-

{% trans "You are not logged in." %}

-
- {% endif %} +
+ - {% if request_user.is_authenticated %} -
-
-

{% blocktrans count interfaces|length as nb %}{{ nb }} active machine{% plural %}{{ nb }} active machines{% endblocktrans %}

-
-
    + {% else %} +
    +

    {% trans "You are not logged in." %}

    +
    + {% endif %} +
+ {% if request_user.is_authenticated %} +
+
+

{% blocktrans count interfaces|length as nb %}{{ nb }} active machine{% plural %}{{ nb }} + active machines{% endblocktrans %}

+
+ -
- {% endif %} +
-
+ {% endif %}
+
+
-
-
-

- {% trans "Back to top" %} -

-

{{ name_website }} {% trans "powered by" %} Re2o 2016–2018

-

- {% blocktrans trimmed %} - Brought to you with . - {% endblocktrans %} - {% trans "About this website" %}. -

-

- {% blocktrans trimmed %} - This software is under the terms of the - GPLv2 License. - {% endblocktrans %} -

-
-
+
+
+

+ {% trans "Back to top" %} +

+

{{ name_website }} {% trans "powered by" %} Re2o 2016–2018

+

+ {% blocktrans trimmed %} + Brought to you with . + {% endblocktrans %} + {% trans "About this website" %}. +

+

+ {% blocktrans trimmed %} + This software is under the terms of the + GPLv2 License. + {% endblocktrans %} +

+
+
- {# Load JavaScript #} - - - - +{# Load JavaScript #} + + + + - {# Read the documentation for more information #} - +{# Read the documentation for more information #} +