diff --git a/logs/models.py b/logs/models.py index e48b0dd1..d2f0b5a9 100644 --- a/logs/models.py +++ b/logs/models.py @@ -468,7 +468,7 @@ class UserHistory(History): lambda x: x.field_dict["user_id"] == user.id, Version.objects.get_for_model(Machine).order_by("revision__date_created") ) - self.related = [RelatedHistory(m.get_name(), m) for m in self.related] + self.related = [RelatedHistory(m.field_dict["name"] or _("None"), m) for m in self.related] self.related = list(dict.fromkeys(self.related)) # Get all the versions for this user, with the oldest first @@ -554,7 +554,7 @@ class MachineHistory(History): )) # Create RelatedHistory objects and remove duplicates - self.related = [RelatedHistory(i.mac_address, i) for i in self.related] + self.related = [RelatedHistory(i.field_dict["mac_address"], i) for i in self.related] self.related = list(dict.fromkeys(self.related)) return super(MachineHistory, self).get(machine) diff --git a/logs/templates/logs/detailed_history.html b/logs/templates/logs/detailed_history.html index 53302451..34da370c 100644 --- a/logs/templates/logs/detailed_history.html +++ b/logs/templates/logs/detailed_history.html @@ -1,3 +1,4 @@ +{% extends 'logs/sidebar.html' %} {% comment %} Re2o est un logiciel d'administration développé initiallement au rezometz. Il se veut agnostique au réseau considéré, de manière à être installable en @@ -22,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load bootstrap3 %} {% load i18n %} +{% load logs_extra %} {% block title %}{% trans "History" %}{% endblock %} @@ -73,20 +75,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,

{% trans "No event" %}

{% endif %} -

{% trans Related history %}

+

{% trans "Related history" %}

{% if related_history %} - + {% for related in related_history %} + - {% endfor %}
{% trans "ID" %} {% trans "Actions" %}{% trans "ID" %}
{% history_button related.instance detailed=related.detailed %} {{ related.name }}{% history_button related.instance text=True detailed=related.detailed %}