aff_model_switch.html 2.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
{% 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
quelques clics.

Copyright © 2017  Gabriel Détraz
Copyright © 2017  Goulven Kermarec
Copyright © 2017  Augustin Lemesle

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}

25
{% load acl %}
26
{% load logs_extra %}
27
{% load i18n %}
28

29
{% if model_switch_list.paginator %}
30
    {% include 'pagination.html' with list=model_switch_list %}
31 32 33 34 35
{% endif %}

<table class="table table-striped">
    <thead>
        <tr>
36
            {% trans "Reference" as tr_ref %}
37
            <th>{% include 'buttons/sort.html' with prefix='model-switch' col='reference' text=tr_ref %}</th>
38
            <th>{% trans "Commercial name" %}</th>
39
            <th>Firmware</th>
40
            {% trans "Switch constructor" as tr_constructor %}
41
            <th>{% include 'buttons/sort.html' with prefix='model-switch' col='constructor' text=tr_constructor %}</th>
42 43
	    <th>{% trans "Switches" %}
	    <th></th>
44
        </tr>
45 46 47
    </thead>
    {% for model_switch in model_switch_list %}
    <tr>
48
        <td>{{ model_switch.reference }}</td>
49
        <td>{{ model_switch.commercial_name }}</td>
50
        <td>{{ model_switch.firmware }}</td>
51
        <td>{{ model_switch.constructor }}</td>
52 53 54 55 56 57 58
	<td>
	    {% for switch in model_switch.switch_set.all %}
	    <a href="{% url 'topologie:index-port' switch.pk %}">
		{{ switch }}
	    </a>
	    {% endfor %}
	</td>
59 60
        <td class="text-right">
            {% can_edit model_switch %}
61
            {% include 'buttons/edit.html' with href='topologie:edit-model-switch' id=model_switch.id %}
62
            {% acl_end %}
63
            {% history_button model_switch %}
64
            {% can_delete model_switch %}
65
            {% include 'buttons/suppr.html' with href='topologie:del-model-switch' id=model_switch.id %}
66
            {% acl_end %}
67
        </td>
68 69
    </tr>
    {% endfor %}
70
</table>
71 72

{% if model_switch_list.paginator %}
73
    {% include 'pagination.html' with list=model_switch_list %}
74
{% endif %}
75