Commit c15c0144 authored by detraz's avatar detraz

Remplace trnoname par de meilleurs affichages

parent 3b11d351
......@@ -213,6 +213,11 @@ class Machine(RevMixin, FieldPermissionModelMixin, models.Model):
).values_list('name', flat=True).distinct()
def get_name(self):
"""Return a name : user provided name or first interface name"""
return or self.short_name
def all_complete_names(self):
"""Renvoie tous les tls complets de la machine"""
......@@ -52,7 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td colspan="4">
{% trans "No name" as tr_no_name %}
{% trans "View the profile" as tr_view_the_profile %}
<b>{{|default:'<i>tr_no_name</i>' }}</b> <i class="fa fa-angle-right"></i>
<b>{{ machine.get_name|default:'<i>tr_no_name</i>' }}</b> <i class="fa fa-angle-right"></i>
<a href="{% url 'users:profil' %}" title=tr_view_the_profile>
<i class="fa fa-user"></i> {{ machine.user }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment