8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-25 08:23:46 +00:00
re2o/machines/templates/machines/aff_machines.html
2016-11-19 21:15:43 +01:00

90 lines
3.8 KiB
HTML

{% if machines_list.paginator %}
{% include "pagination.html" with list=machines_list %}
{% endif %}
<table class="table">
<thead>
<tr>
<th>Actions</th>
<th>Proprietaire</th>
<th>Nom dns</th>
<th>Type</th>
<th>Mac</th>
<th>Ipv4</th>
<th></th>
</tr>
</thead>
{% for machine in machines_list %}
{% for interface in machine.interface_set.all %}
<tr class="active">
{% if forloop.first %}
<td rowspan="{{ machine.interface_set.all|length }}">
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc='Ajouter une interface' %}
{% include 'buttons/suppr.html' with href='machines:del-machine' id=machine.id %}
{% include 'buttons/history.html' with href='machines:history' name='machine' id=machine.id %}
</td>
<td rowspan="{{ machine.interface_set.all|length }}">
<a href="{% url 'users:profil' userid=machine.user.id %}"><b>{{ machine.user }}</b></a>
</td>
{% endif %}
<td>
{% if interface.alias_set.all %}
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
{{ interface.dns }} <span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="editioninterface">
{% for al in interface.alias_set.all %}
<li>
<a href="http://{{ al }}">
{{ al }}
<i class="glyphicon glyphicon-share-alt"></i>
</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
{{ interface.dns }}
{% endif %}
</td>
<td>{{ interface.type }}</td>
<td>{{ interface.mac_address }}</td>
<td>{{ interface.ipv4 }}</td>
<td>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Modifier <span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="editioninterface">
<li>
<a href="{% url 'machines:edit-interface' interface.id %}">
<i class="glyphicon glyphicon-edit"></i> Editer
</a>
</li>
<li>
<a href="{% url 'machines:index-alias' interface.id %}">
<i class="glyphicon glyphicon-edit"></i> Gerer les alias
</a>
</li>
<li>
<a href="{% url 'machines:history' 'interface' interface.id %}">
<i class="glyphicon glyphicon-time"></i> Historique
</a>
</li>
<li>
<a href="{% url 'machines:del-interface' interface.id %}">
<i class="glyphicon glyphicon-trash"></i> Supprimer
</a>
</li>
</ul>
</div>
</td>
</tr>
{% endfor %}
<tr>
<td colspan="8"></td>
</tr>
{% endfor %}
</table>