Commit 69d80fcd authored by Laouen Fernet's avatar Laouen Fernet

add translations for topologie/

parent 4a8c161e
This diff is collapsed.
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2019-01-08 20:39
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('topologie', '0068_auto_20190102_1758'),
]
operations = [
migrations.AlterModelOptions(
name='moduleonswitch',
options={'permissions': (('view_moduleonswitch', 'Can view a link between switch and module object'),), 'verbose_name': 'link between switch and module', 'verbose_name_plural': 'links between switch and module'},
),
migrations.AlterModelOptions(
name='moduleswitch',
options={'permissions': (('view_moduleswitch', 'Can view a switch module object'),), 'verbose_name': 'switch module', 'verbose_name_plural': 'switch modules'},
),
migrations.AlterField(
model_name='modelswitch',
name='is_itself_module',
field=models.BooleanField(default=False, help_text='The switch is considered as a module.'),
),
migrations.AlterField(
model_name='modelswitch',
name='is_modular',
field=models.BooleanField(default=False, help_text='The switch model is modular.'),
),
migrations.AlterField(
model_name='portprofile',
name='profil_default',
field=models.CharField(blank=True, choices=[('room', 'Room'), ('access_point', 'Access point'), ('uplink', 'Uplink'), ('asso_machine', 'Organisation machine'), ('nothing', 'Nothing')], max_length=32, null=True, unique=True, verbose_name='Default profile'),
),
migrations.AlterField(
model_name='portprofile',
name='radius_type',
field=models.CharField(choices=[('NO', 'NO'), ('802.1X', '802.1X'), ('MAC-radius', 'MAC-RADIUS')], help_text='Type of RADIUS authentication : inactive, MAC-address or 802.1X', max_length=32, verbose_name='RADIUS type'),
),
migrations.AlterField(
model_name='switch',
name='automatic_provision',
field=models.BooleanField(default=False, help_text='Automatic provision for the switch'),
),
migrations.AlterField(
model_name='switch',
name='management_creds',
field=models.ForeignKey(blank=True, help_text='Management credentials for the switch', null=True, on_delete=django.db.models.deletion.PROTECT, to='preferences.SwitchManagementCred'),
),
migrations.AlterField(
model_name='switch',
name='radius_key',
field=models.ForeignKey(blank=True, help_text='RADIUS key of the switch', null=True, on_delete=django.db.models.deletion.PROTECT, to='preferences.RadiusKey'),
),
]
...@@ -238,18 +238,18 @@ class Switch(AclMixin, Machine): ...@@ -238,18 +238,18 @@ class Switch(AclMixin, Machine):
blank=True, blank=True,
null=True, null=True,
on_delete=models.PROTECT, on_delete=models.PROTECT,
help_text="Clef radius du switch" help_text=_("RADIUS key of the switch")
) )
management_creds = models.ForeignKey( management_creds = models.ForeignKey(
'preferences.SwitchManagementCred', 'preferences.SwitchManagementCred',
blank=True, blank=True,
null=True, null=True,
on_delete=models.PROTECT, on_delete=models.PROTECT,
help_text="Identifiant de management de ce switch" help_text=_("Management credentials for the switch")
) )
automatic_provision = models.BooleanField( automatic_provision = models.BooleanField(
default=False, default=False,
help_text='Provision automatique de ce switch', help_text=_("Automatic provision for the switch")
) )
...@@ -403,11 +403,11 @@ class ModelSwitch(AclMixin, RevMixin, models.Model): ...@@ -403,11 +403,11 @@ class ModelSwitch(AclMixin, RevMixin, models.Model):
) )
is_modular = models.BooleanField( is_modular = models.BooleanField(
default=False, default=False,
help_text=_("Is this switch model modular"), help_text=_("The switch model is modular."),
) )
is_itself_module = models.BooleanField( is_itself_module = models.BooleanField(
default=False, default=False,
help_text=_("Is the switch, itself, considered as a module"), help_text=_("The switch is considered as a module."),
) )
class Meta: class Meta:
...@@ -441,9 +441,10 @@ class ModuleSwitch(AclMixin, RevMixin, models.Model): ...@@ -441,9 +441,10 @@ class ModuleSwitch(AclMixin, RevMixin, models.Model):
class Meta: class Meta:
permissions = ( permissions = (
("view_moduleswitch", _("Can view a module object")), ("view_moduleswitch", _("Can view a switch module object")),
) )
verbose_name = _("Module of a switch") verbose_name = _("switch module")
verbose_name_plural = _("switch modules")
def __str__(self): def __str__(self):
...@@ -462,13 +463,15 @@ class ModuleOnSwitch(AclMixin, RevMixin, models.Model): ...@@ -462,13 +463,15 @@ class ModuleOnSwitch(AclMixin, RevMixin, models.Model):
class Meta: class Meta:
permissions = ( permissions = (
("view_moduleonswitch", _("Can view a moduleonswitch object")), ("view_moduleonswitch", _("Can view a link between switch and"
" module object")),
) )
verbose_name = _("link between switchs and modules") verbose_name = _("link between switch and module")
verbose_name_plural = _("links between switch and module")
unique_together = ['slot', 'switch'] unique_together = ['slot', 'switch']
def __str__(self): def __str__(self):
return 'On slot ' + str(self.slot) + ' of ' + str(self.switch) return _("On slot ") + str(self.slot) + _(" of ") + str(self.switch)
class ConstructorSwitch(AclMixin, RevMixin, models.Model): class ConstructorSwitch(AclMixin, RevMixin, models.Model):
...@@ -582,7 +585,7 @@ class Port(AclMixin, RevMixin, models.Model): ...@@ -582,7 +585,7 @@ class Port(AclMixin, RevMixin, models.Model):
) )
state = models.BooleanField( state = models.BooleanField(
default=True, default=True,
help_text='Port state Active', help_text=_("Port state Active"),
verbose_name=_("Port state Active") verbose_name=_("Port state Active")
) )
details = models.CharField(max_length=255, blank=True) details = models.CharField(max_length=255, blank=True)
...@@ -599,13 +602,13 @@ class Port(AclMixin, RevMixin, models.Model): ...@@ -599,13 +602,13 @@ class Port(AclMixin, RevMixin, models.Model):
def pretty_name(self): def pretty_name(self):
"""More elaborated name for label on switch conf""" """More elaborated name for label on switch conf"""
if self.related: if self.related:
return "Uplink : " + self.related.switch.short_name return _("Uplink: ") + self.related.switch.short_name
elif self.machine_interface: elif self.machine_interface:
return "Machine : " + str(self.machine_interface.domain) return _("Machine: ") + str(self.machine_interface.domain)
elif self.room: elif self.room:
return "Chambre : " + str(self.room) return _("Room: ") + str(self.room)
else: else:
return "Inconnue" return _("Unknown")
@cached_property @cached_property
def get_port_profile(self): def get_port_profile(self):
...@@ -720,7 +723,7 @@ class PortProfile(AclMixin, RevMixin, models.Model): ...@@ -720,7 +723,7 @@ class PortProfile(AclMixin, RevMixin, models.Model):
TYPES = ( TYPES = (
('NO', 'NO'), ('NO', 'NO'),
('802.1X', '802.1X'), ('802.1X', '802.1X'),
('MAC-radius', 'MAC-radius'), ('MAC-radius', _("MAC-RADIUS")),
) )
MODES = ( MODES = (
('STRICT', 'STRICT'), ('STRICT', 'STRICT'),
...@@ -737,11 +740,11 @@ class PortProfile(AclMixin, RevMixin, models.Model): ...@@ -737,11 +740,11 @@ class PortProfile(AclMixin, RevMixin, models.Model):
('auto-100', 'auto-100'), ('auto-100', 'auto-100'),
) )
PROFIL_DEFAULT = ( PROFIL_DEFAULT = (
('room', 'room'), ('room', _("Room")),
('access_point', 'access_point'), ('access_point', _("Access point")),
('uplink', 'uplink'), ('uplink', _("Uplink")),
('asso_machine', 'asso_machine'), ('asso_machine', _("Organisation machine")),
('nothing', 'nothing'), ('nothing', _("Nothing")),
) )
name = models.CharField(max_length=255, verbose_name=_("Name")) name = models.CharField(max_length=255, verbose_name=_("Name"))
profil_default = models.CharField( profil_default = models.CharField(
......
...@@ -28,17 +28,17 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -28,17 +28,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="table-responsive"> <div class="table-responsive">
{% if ap_list.paginator %} {% if ap_list.paginator %}
{% include "pagination.html" with list=ap_list %} {% include 'pagination.html' with list=ap_list %}
{% endif %} {% endif %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
{% trans "Access point" as tr_ap %} {% trans "Access point" as tr_ap %}
<th>{% include "buttons/sort.html" with prefix='ap' col='name' text=tr_ap %}</th> <th>{% include 'buttons/sort.html' with prefix='ap' col='name' text=tr_ap %}</th>
{% trans "MAC address" as tr_mac %} {% trans "MAC address" as tr_mac %}
<th>{% include "buttons/sort.html" with prefix='ap' col='mac' text=tr_mac %}</th> <th>{% include 'buttons/sort.html' with prefix='ap' col='mac' text=tr_mac %}</th>
{% trans "IPv4 address" as tr_ip %} {% trans "IPv4 address" as tr_ip %}
<th>{% include "buttons/sort.html" with prefix='ap' col='ip' text=tr_ip %}</th> <th>{% include 'buttons/sort.html' with prefix='ap' col='ip' text=tr_ip %}</th>
<th>{% trans "Details" %}</th> <th>{% trans "Details" %}</th>
<th>{% trans "Location" %}</th> <th>{% trans "Location" %}</th>
<th></th> <th></th>
...@@ -53,15 +53,11 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -53,15 +53,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ ap.location }}</td> <td>{{ ap.location }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit ap %} {% can_edit ap %}
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-ap' ap.id %}"> {% include 'buttons/edit.html' with href='topologie:edit-ap' id=ap.id %}
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% history_button ap %} {% history_button ap %}
{% can_delete ap %} {% can_delete ap %}
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'machines:del-machine' ap.id %}"> {% include 'buttons/suppr.html' with href='machines:del-machine' id=ap.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
</td> </td>
</tr> </tr>
...@@ -69,7 +65,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -69,7 +65,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
{% if ap_list.paginator %} {% if ap_list.paginator %}
{% include "pagination.html" with list=ap_list %} {% include 'pagination.html' with list=ap_list %}
{% endif %} {% endif %}
</div> </div>
...@@ -27,15 +27,15 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -27,15 +27,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load i18n %} {% load i18n %}
{% if building_list.paginator %} {% if building_list.paginator %}
{% include "pagination.html" with list=building_list %} {% include 'pagination.html' with list=building_list %}
{% endif %} {% endif %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
{% trans "Building" as tr_building %} {% trans "Building" as tr_building %}
<th>{% include "buttons/sort.html" with prefix='building' col='name' text=tr_building %}</th> <th>{% include 'buttons/sort.html' with prefix='building' col='name' text=tr_building %}</th>
<th>Wireless AP</th> <th>{% trans "Access points" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -45,15 +45,11 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -45,15 +45,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{% for ap in building.all_ap_in %} {{ ap.short_name }} {% endfor %}</td> <td>{% for ap in building.all_ap_in %} {{ ap.short_name }} {% endfor %}</td>
<td class="text-right"> <td class="text-right">
{% can_edit building %} {% can_edit building %}
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-building' building.id %}"> {% include 'buttons/edit.html' with href='topologie:edit-building' id=building.id %}
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% history_button building %} {% history_button building %}
{% can_delete building %} {% can_delete building %}
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-building' building.id %}"> {% include 'buttons/suppr.html' with href='topologie:del-building' id=building.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
</td> </td>
</tr> </tr>
...@@ -61,6 +57,6 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -61,6 +57,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
{% if building_list.paginator %} {% if building_list.paginator %}
{% include "pagination.html" with list=building_list %} {% include 'pagination.html' with list=building_list %}
{% endif %} {% endif %}
...@@ -27,14 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -27,14 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load i18n %} {% load i18n %}
{% if room_list.paginator %} {% if room_list.paginator %}
{% include "pagination.html" with list=room_list %} {% include 'pagination.html' with list=room_list %}
{% endif %} {% endif %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
{% trans "Room" as tr_room %} {% trans "Room" as tr_room %}
<th>{% include "buttons/sort.html" with prefix='room' col='name' text=tr_room %}</th> <th>{% include 'buttons/sort.html' with prefix='room' col='name' text=tr_room %}</th>
<th>{% trans "Details" %}</th> <th>{% trans "Details" %}</th>
<th></th> <th></th>
</tr> </tr>
...@@ -45,15 +45,11 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -45,15 +45,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ room.details }}</td> <td>{{ room.details }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit room %} {% can_edit room %}
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-room' room.id %}"> {% include 'buttons/edit.html' with href='topologie:edit-room' id=room.id %}
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% history_button room %} {% history_button room %}
{% can_delete room %} {% can_delete room %}
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-room' room.id %}"> {% include 'buttons/suppr.html' with href='topologie:del-room' id=room.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
</td> </td>
</tr> </tr>
...@@ -61,6 +57,6 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -61,6 +57,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
{% if room_list.paginator %} {% if room_list.paginator %}
{% include "pagination.html" with list=room_list %} {% include 'pagination.html' with list=room_list %}
{% endif %} {% endif %}
...@@ -27,14 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -27,14 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load i18n %} {% load i18n %}
{% if constructor_switch_list.paginator %} {% if constructor_switch_list.paginator %}
{% include "pagination.html" with list=constructor_switch_list %} {% include 'pagination.html' with list=constructor_switch_list %}
{% endif %} {% endif %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
{% trans "Switch constructor" as tr_constructor %} {% trans "Switch constructor" as tr_constructor %}
<th>{% include "buttons/sort.html" with prefix='constructor-switch' col='name' text=tr_constructor %}</th> <th>{% include 'buttons/sort.html' with prefix='constructor-switch' col='name' text=tr_constructor %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -43,15 +43,11 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -43,15 +43,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ constructor_switch }}</td> <td>{{ constructor_switch }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit constructor_switch %} {% can_edit constructor_switch %}
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-constructor-switch' constructor_switch.id %}"> {% include 'buttons/edit.html' with href='topologie:edit-constructor-switch' id=constructor_switch.id %}
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% history_button constructor_switch %} {% history_button constructor_switch %}
{% can_delete constructor_switch %} {% can_delete constructor_switch %}
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-constructor-switch' constructor_switch.id %}"> {% include 'buttons/suppr.html' with href='topologie:del-constructor-switch' id=constructor_switch.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
</td> </td>
</tr> </tr>
...@@ -59,6 +55,6 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -59,6 +55,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
{% if constructor_switch_list.paginator %} {% if constructor_switch_list.paginator %}
{% include "pagination.html" with list=constructor_switch_list %} {% include 'pagination.html' with list=constructor_switch_list %}
{% endif %} {% endif %}
...@@ -27,18 +27,18 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -27,18 +27,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load i18n %} {% load i18n %}
{% if model_switch_list.paginator %} {% if model_switch_list.paginator %}
{% include "pagination.html" with list=model_switch_list %} {% include 'pagination.html' with list=model_switch_list %}
{% endif %} {% endif %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
{% trans "Reference" as tr_ref %} {% trans "Reference" as tr_ref %}
<th>{% include "buttons/sort.html" with prefix='model-switch' col='reference' text=tr_ref %}</th> <th>{% include 'buttons/sort.html' with prefix='model-switch' col='reference' text=tr_ref %}</th>
<th>{% trans "Commercial name" %}</th> <th>{% trans "Commercial name" %}</th>
<th>Firmware</th> <th>Firmware</th>
{% trans "Switch constructor" as tr_constructor %} {% trans "Switch constructor" as tr_constructor %}
<th>{% include "buttons/sort.html" with prefix='model-switch' col='constructor' text=tr_constructor %}</th> <th>{% include 'buttons/sort.html' with prefix='model-switch' col='constructor' text=tr_constructor %}</th>
<th>{% trans "Switches" %} <th>{% trans "Switches" %}
<th></th> <th></th>
</tr> </tr>
...@@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr> <tr>
<td>{{ model_switch.reference }}</td> <td>{{ model_switch.reference }}</td>
<td>{{ model_switch.commercial_name }}</td> <td>{{ model_switch.commercial_name }}</td>
<td>{{model_switch.firmware}}</td> <td>{{ model_switch.firmware }}</td>
<td>{{ model_switch.constructor }}</td> <td>{{ model_switch.constructor }}</td>
<td> <td>
{% for switch in model_switch.switch_set.all %} {% for switch in model_switch.switch_set.all %}
...@@ -58,15 +58,11 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -58,15 +58,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</td> </td>
<td class="text-right"> <td class="text-right">
{% can_edit model_switch %} {% can_edit model_switch %}
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-model-switch' model_switch.id %}"> {% include 'buttons/edit.html' with href='topologie:edit-model-switch' id=model_switch.id %}
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% history_button model_switch %} {% history_button model_switch %}
{% can_delete model_switch %} {% can_delete model_switch %}
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-model-switch' model_switch.id %}"> {% include 'buttons/suppr.html' with href='topologie:del-model-switch' id=model_switch.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
</td> </td>
</tr> </tr>
...@@ -74,8 +70,6 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -74,8 +70,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
{% if model_switch_list.paginator %} {% if model_switch_list.paginator %}
{% include "pagination.html" with list=model_switch_list %} {% include 'pagination.html' with list=model_switch_list %}
{% endif %} {% endif %}
...@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load i18n %} {% load i18n %}
{% if module_list.paginator %} {% if module_list.paginator %}
{% include "pagination.html" with list=module_list %} {% include 'pagination.html' with list=module_list %}
{% endif %} {% endif %}
<table class="table table-striped"> <table class="table table-striped">
...@@ -35,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -35,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr> <tr>
<th>{% trans "Reference" %}</th> <th>{% trans "Reference" %}</th>
<th>{% trans "Comment" %}</th> <th>{% trans "Comment" %}</th>
<th>{% trans "Switchs" %}</th> <th>{% trans "Switches" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -45,34 +45,24 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -45,34 +45,24 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ module.comment }}</td> <td>{{ module.comment }}</td>
<td> <td>
{% for module_switch in module.moduleonswitch_set.all %} {% for module_switch in module.moduleonswitch_set.all %}
<b>Slot</b> {{ module_switch.slot }} <b>of</b> {{ module_switch.switch }} <b>{% trans "Slot" %}</b> {{ module_switch.slot }} <b>{% trans "of" %}</b> {{ module_switch.switch }}
{% can_edit module_switch %} {% can_edit module_switch %}
<a class="btn btn-primary btn-xs" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-module-on' module_switch.id %}"> {% include 'buttons/edit.html' with href='topologie:edit-module-on' id=module_switch.id %}
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% can_delete module_switch %} {% can_delete module_switch %}
<a class="btn btn-danger btn-xs" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-module-on' module_switch.id %}"> {% include 'buttons/suppr.html' with href='topologie:del-module-on' id=module_switch.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
<br> <br>
{% endfor %} {% endfor %}
</td> </td>
<td class="text-right"> <td class="text-right">
{% can_edit module %} {% can_edit module %}
<a class="btn btn-primary btn-sm" role="button" title={% trans "Add" %} href="{% url 'topologie:add-module-on' %}"> {% include 'buttons/add.html' with href='topologie:add-module-on' %}
<i class="fa fa-plus"></i> {% include 'buttons/edit.html' with href='topologie:edit-module' id=module.id %}
</a>
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-module' module.id %}">
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% history_button module %} {% history_button module %}
{% can_delete module %} {% can_delete module %}
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-module' module.id %}"> {% include 'buttons/suppr.html' with href='topologie:del-module' id=module.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
</td> </td>
</tr> </tr>
...@@ -80,7 +70,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -80,7 +70,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
{% if module_list.paginator %} {% if module_list.paginator %}
{% include "pagination.html" with list=module_list %} {% include 'pagination.html' with list=module_list %}
{% endif %} {% endif %}
<h4>{% trans "All modular switchs" %}</h4> <h4>{% trans "All modular switchs" %}</h4>
......
...@@ -31,16 +31,16 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -31,16 +31,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<thead> <thead>
<tr> <tr>
{% trans "Port" as tr_port %} {% trans "Port" as tr_port %}
<th>{% include "buttons/sort.html" with prefix='port' col='port' text=tr_port %}</th> <th>{% include 'buttons/sort.html' with prefix='port' col='port' text=tr_port %}</th>
{% if search %} {% if search %}
<th>{% trans "Switch" %}</th> <th>{% trans "Switch" %}</th>
{% endif %} {% endif %}
{% trans "Room" as tr_room %} {% trans "Room" as tr_room %}
<th>{% include "buttons/sort.html" with prefix='port' col='room' text=tr_room %}</th> <th>{% include 'buttons/sort.html' with prefix='port' col='room' text=tr_room %}</th>
{% trans "Interface" as tr_interface %} {% trans "Interface" as tr_interface %}
<th>{% include "buttons/sort.html" with prefix='port' col='interface' text=tr_interface %}</th> <th>{% include 'buttons/sort.html' with prefix='port' col='interface' text=tr_interface %}</th>
{% trans "Related port" as tr_related_port %} {% trans "Related port" as tr_related_port %}
<th>{% include "buttons/sort.html" with prefix='port' col='related' text=tr_related_port %}</th> <th>{% include 'buttons/sort.html' with prefix='port' col='related' text=tr_related_port %}</th>
<th>{% trans "Port state" %}</th> <th>{% trans "Port state" %}</th>
<th>{% trans "Port profile" %}</th> <th>{% trans "Port profile" %}</th>
<th>{% trans "Details" %}</th> <th>{% trans "Details" %}</th>
...@@ -96,15 +96,11 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -96,15 +96,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ port.details }}</td> <td>{{ port.details }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit port %} {% can_edit port %}
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-port' port.id %}"> {% include 'buttons/edit.html' with href='topologie:edit-port' id=port.id %}
<i class="fa fa-edit"></i>
</a>
{% acl_end %} {% acl_end %}
{% history_button port %} {% history_button port %}
{% can_delete port %} {% can_delete port %}
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-port' port.pk %}"> {% include 'buttons/suppr.html' with href='topologie:del-port' id=port.id %}
<i class="fa fa-trash"></i>
</a>
{% acl_end %} {% acl_end %}
</td> </td>
</tr> </tr>
......
...@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="table-responsive"> <div class="table-responsive">