8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-23 11:53:12 +00:00

Turn tables into grids

This commit is contained in:
grisel-davy 2020-10-25 23:47:59 +01:00 committed by Gabriel Detraz
parent 160230d7a1
commit 5cd671ced3

View file

@ -55,20 +55,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "DNS name"%}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "MAC address" %}</th>
<th>{% trans "IP address" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
{% for interface in machine.interface_set.all %}
<tr>
<td>
<div class="conatiner-fluid">
<div class="row">
<div class="col-sm-3">
<b>{% trans "DNS name"%}:</b>
</br>
{% if interface.domain.related_domain.all %}
{{ interface.domain }}
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse"
@ -79,31 +71,37 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% else %}
{{ interface.domain }}
{% endif %}
</td>
<td>
</div>
<div class="col-sm-2">
<b>{% trans "Type" %}:</b>
</br>
{{ interface.machine_type }}
</td>
<td>
</div>
<div class="col-sm-3">
<b>{% trans "MAC address" %}:</b>
</br>
{{ interface.mac_address }}
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse"
data-target="#collapseVendor_{{ interface.id }}" aria-expanded="true"
aria-controls="collapseVendor_{{ interface.id }}">
{% trans "Display the vendor" %}
</button>
</td>
<td>
</div>
<div class="col-sm-2">
<b>IPv4</b> {{ interface.ipv4 }}
<br>
{% if ipv6_enabled and interface.ipv6 != 'None' %}
{% if interface.ipv6.count > 0 %}
<b>IPv6</b>
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse"
data-target="#collapseIpv6_{{ interface.id }}" aria-expanded="true"
aria-controls="collapseIpv6_{{ interface.id }}">
{% trans "Display IPv6" %}
</button>
{% else %}
<b>{% trans "No IPv6" %}</b>
{% endif %}
</td>
<td class="text-right">
</div>
<div class="col-sm-2 text-right">
<div class="btn-group" role="group">
<button class="btn btn-primary btn-sm dropdown-toggle" type="button"
id="editioninterface" data-toggle="dropdown" aria-haspopup="true"
@ -157,10 +155,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_delete interface %}
{% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %}
{% acl_end %}
</td>
</tr>
<tr>
<td colspan=5 style="border-top: none; padding: 1px;">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="collapse in" id="collapseVendor_{{ interface.id }}">
<ul class="list-group" style="margin-bottom: 0;">
<li class="list-group-item col-xs-6 col-sm-6 col-md-6" style="border: none;">
@ -168,11 +167,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</li>
</ul>
</div>
</td>
</tr>
{% if ipv6_enabled and interface.ipv6 != 'None' %}
<tr>
<td colspan=5 style="border-top: none; padding: 1px;">
<div class="collapse in" id="collapseIpv6_{{ interface.id }}">
<ul class="list-group" style="margin-bottom: 0;">
{% for ipv6 in interface.ipv6.all %}
@ -182,12 +177,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endfor %}
</ul>
</div>
</td>
</tr>
{% endif %}
{% if interface.domain.related_domain.all %}
<tr>
<td colspan=5 style="border-top: none; padding: 1px;">
<div class="collapse in" id="collapseDomain_{{ interface.id }}">
<ul class="list-group" style="margin-bottom: 0;">
{% for al in interface.domain.related_domain.all %}
@ -200,16 +191,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endfor %}
</ul>
</div>
</td>
</tr>
{% endif %}
</div>
</div>
{%if machine.interface_set.count > 1 %}
<hr/>
{% endif %}
{% endfor %}
</table>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% if machines_list.paginator %}
{% include 'pagination.html' with list=machines_list %}