Skip to content

Commit

Permalink
Break word with CSS and not with a specific method of interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
grisel-davy authored and Detraz committed Jan 24, 2021
1 parent 22ab6df commit 62a9142
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions machines/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1626,9 +1626,6 @@ def can_view(self, user_request, *_args, **_kwargs):
)
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}
Expand Down
3 changes: 1 addition & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ <h4>{% blocktrans count interfaces|length as nb %}{{ nb }} active machine{% plur
</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' %}">
Expand Down

0 comments on commit 62a9142

Please sign in to comment.