From 22ab6df96df98cc281c4f903397d15e63091983b Mon Sep 17 00:00:00 2001 From: grisel-davy Date: Wed, 28 Oct 2020 19:33:37 +0100 Subject: [PATCH] Fix the overflow of text in the sidenav for small screen --- machines/models.py | 3 +++ templates/base.html | 44 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/machines/models.py b/machines/models.py index 9de7d307..74a693fc 100644 --- a/machines/models.py +++ b/machines/models.py @@ -1626,6 +1626,9 @@ class Interface(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model): ) return True, None, None + def splited_name(self): + return str(self).replace('.',' .') + def __init__(self, *args, **kwargs): super(Interface, self).__init__(*args, **kwargs) self.field_permissions = {"machine": self.can_change_machine} diff --git a/templates/base.html b/templates/base.html index 559e12a0..8e5f65dc 100644 --- a/templates/base.html +++ b/templates/base.html @@ -217,7 +217,46 @@ with this program; if not, write to the Free Software Foundation, Inc.,

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

- +
+ + + + + + + + + + + + +
+ {% 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 %} + {% else %} + {% trans "Disabled" %} + {% endif %} +
+ {% 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 %} + {% else %} + {% trans "Non member" %} + {% endif %} +
+ + @@ -266,7 +305,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% trans "Username" %} {{ request_user.pseudo }}