8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-05-18 16:43:11 +00:00

Break word with CSS and not with a specific method of interfaces

This commit is contained in:
grisel-davy 2020-10-28 21:23:49 +01:00 committed by Gabriel Detraz
parent 22ab6df96d
commit 62a9142faa
2 changed files with 1 additions and 5 deletions

View file

@ -1626,9 +1626,6 @@ 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}

View file

@ -305,8 +305,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</div>
<ul class="list-group">
{% for interface in interfaces|slice:":5" %}
<div class="list-group-item visible-xs visible-lg">{{ interface }}</div>
<div class="list-group-item visible-sm visible-md">{{ interface.splited_name}}</div>
<div class="list-group-item" style="word-break: break-all">{{ interface }}</div>
{% endfor %}
{% if interfaces|length > 5 %}
<a class="list-group-item list-group-item-info" role="button" href="{% url 'users:mon-profil' %}">