From 5cd671ced3eef8da45c4321f993ece018380d6a8 Mon Sep 17 00:00:00 2001 From: grisel-davy Date: Sun, 25 Oct 2020 23:47:59 +0100 Subject: [PATCH] Turn tables into grids --- machines/templates/machines/aff_machines.html | 288 +++++++++--------- 1 file changed, 140 insertions(+), 148 deletions(-) diff --git a/machines/templates/machines/aff_machines.html b/machines/templates/machines/aff_machines.html index 6d97d1c5..75eb47c6 100644 --- a/machines/templates/machines/aff_machines.html +++ b/machines/templates/machines/aff_machines.html @@ -55,162 +55,154 @@ with this program; if not, write to the Free Software Foundation, Inc.,
-
- - - - - - - - - - - {% for interface in machine.interface_set.all %} - - - - - - - - - - + {% for interface in machine.interface_set.all %} +
+
+
+ {% trans "DNS name"%}: +
+ {% if interface.domain.related_domain.all %} + {{ interface.domain }} + + {% else %} + {{ interface.domain }} + {% endif %} +
+
+ {% trans "Type" %}: +
+ {{ interface.machine_type }} +
+
+ {% trans "MAC address" %}: +
+ {{ interface.mac_address }} + +
+
+ IPv4 {{ interface.ipv4 }} +
+ {% if interface.ipv6.count > 0 %} + IPv6 + + {% else %} + {% trans "No IPv6" %} + {% endif %} +
+
+
+ + +
+ {% history_button interface %} + {% can_delete interface %} + {% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %} + {% acl_end %} +
+
+
+
+
+
+
    +
  • + {{ interface.get_vendor }} +
  • +
+
{% if ipv6_enabled and interface.ipv6 != 'None' %} -
- - +
+
    + {% for ipv6 in interface.ipv6.all %} +
  • + {{ ipv6 }} +
  • + {% endfor %} +
+
{% endif %} {% if interface.domain.related_domain.all %} - - - +
+
    + {% for al in interface.domain.related_domain.all %} +
  • + + {{ al }} + + +
  • + {% endfor %} +
+
{% endif %} + + + {%if machine.interface_set.count > 1 %} +
+ {% endif %} {% endfor %} -
{% trans "DNS name"%}{% trans "Type" %}{% trans "MAC address" %}{% trans "IP address" %}{% trans "Actions" %}
- {% if interface.domain.related_domain.all %} - {{ interface.domain }} - - {% else %} - {{ interface.domain }} - {% endif %} - - {{ interface.machine_type }} - - {{ interface.mac_address }} - - - IPv4 {{ interface.ipv4 }} -
- {% if ipv6_enabled and interface.ipv6 != 'None' %} - IPv6 - - {% endif %} -
-
- - -
- {% history_button interface %} - {% can_delete interface %} - {% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %} - {% acl_end %} -
-
-
    -
  • - {{ interface.get_vendor }} -
  • -
-
-
-
-
    - {% for ipv6 in interface.ipv6.all %} -
  • - {{ ipv6 }} -
  • - {% endfor %} -
-
-
-
-
    - {% for al in interface.domain.related_domain.all %} -
  • - - {{ al }} - - -
  • - {% endfor %} -
-
-
- + {% endfor %} - - + {% if machines_list.paginator %} {% include 'pagination.html' with list=machines_list %} {% endif %}