From c541bfcfd9adb3726ac5c108d16595b5babab7aa Mon Sep 17 00:00:00 2001 From: lhark Date: Fri, 18 Nov 2016 07:13:39 +0100 Subject: [PATCH] Improve right sidebar design --- templates/base.html | 68 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/templates/base.html b/templates/base.html index 6d8dab64..b2dd1d2a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -82,25 +82,67 @@ {% block content %}{% endblock %}
-
+
{% if request_user.is_authenticated %} -
  • {{ request_user.name }} {{ request_user.surname }}
  • -
  • Pseudo : {{ request_user.pseudo }}
  • -
  • Chambre : {{ request_user.room }}
  • -
  • Connexion : {% if request_user.has_access == True %}Active{% else %}Désactivée{% endif %}
  • -
  • Fin d'adhésion : {% if request_user.end_adhesion != None %}{{ request_user.end_adhesion }}{% else %}Non adhérent{% endif %}
  • -

    Voir mon profil

    +
    +

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

    +
    + + + + + + + + + + + + + + + + + +
    Pseudo{{ request_user.pseudo }}
    Chambre{{ request_user.room }}
    Connexion + {% if request_user.has_access %} + Active + {% else %} + Désactivée + {% endif %} +
    Adhésion + {% if request_user.end_adhesion != None %} + {{ request_user.end_adhesion }} + {% else %} + Non adhérent + {% endif %} +
    + {% else %}

    Vous n'êtes pas authentifié

    {% endif %}
    {% if request_user.is_authenticated %} -
    - {{ interfaces|length }} machines actives - {% for interface in interfaces|slice:":5" %} -
  • {{interface.dns}}
  • - {% endfor %} -

    Voir mes machines

    +
    +
    +

    {{ interfaces|length }} machines actives

    +
    +
      + {% for interface in interfaces|slice:":5" %} +
      {{interface.dns}}
      + {% endfor %} + {% if interfaces|length > 5 %} + + + Voir mes machines + + {% endif %} +
    {% endif %}