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

Update display of ip_types

This commit is contained in:
grisel-davy 2020-10-23 10:12:18 +02:00
parent 0bcb6cc680
commit a3f4deb145

View file

@ -28,39 +28,59 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load logs_extra %}
{% load i18n %}
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "IP type" %}</th>
<th>{% trans "Extension" %}</th>
<th>{% blocktrans %}"infra" right required{% endblocktrans %}</th>
<th>{% trans "IPv4 range" %}</th>
<th>{% trans "v6 prefix" %}</th>
<th>{% trans "DNSSEC reverse v4/v6" %}</th>
<th>{% trans "On VLAN(s)" %}</th>
<th>{% trans "Default ports opening" %}</th>
<th></th>
</tr>
</thead>
{% for type in iptype_list %}
<tr>
<td>{{ type.name }}</td>
<td>{{ type.extension }}</td>
<td>{{ type.need_infra|tick }}</td>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}{% if type.ip_network %}<b><u> on </u></b>
{{ type.ip_network }}{% endif %}</td>
<td>{{ type.prefix_v6 }}/{{ type.prefix_v6_length }}</td>
<td>{{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }}</td>
<td>{{ type.vlan }}</td>
<td>{{ type.ouverture_ports }}</td>
<td class="text-right">
{% for type in iptype_list %}
<div class="panel panel-default">
<div class="panel-heading">
<div class="containeri-fluid">
<div class="row">
<div class="col-sm-3">
<h4>{{ type.name }}</h4>
</div>
<div class="col-sm-3">
<h4>{{ type.extension }}</h4>
</div>
<div class="col-sm-4 text-center">
{% if type.need_infra %}
<span class="text-success">{% trans "Infra right required" %}
{% else %}
<span class="text-danger">{% trans "Infra right not required" %}
{% endif %}
</div>
<div class="col-sm-2 text-right">
{% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %}
{% acl_end %}
{% history_button type %}
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "IPv4 range" %}</th>
<th>{% trans "v6 prefix" %}</th>
<th>{% trans "DNSSEC reverse v4/v6" %}</th>
<th>{% trans "On VLAN(s)" %}</th>
<th>{% trans "Default ports opening" %}</th>
</tr>
</thead>
<tr>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}{% if type.ip_network %}
<b><u> on </u></b>
{{ type.ip_network }}{% endif %}</td>
<td>{{ type.prefix_v6 }}/{{ type.prefix_v6_length }}</td>
<td>{{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }}</td>
<td>{{ type.vlan }}</td>
<td>{{ type.ouverture_ports }}</td>
</tr>
</table>
</div>
</div>
</div>
{% endfor %}