Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 34bf50e7 authored by Fernet Laouen's avatar Fernet Laouen

Translation of machines/ (front)

parent af40e3ea
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
Here are defined some functions to check acl on the application. Here are defined some functions to check acl on the application.
""" """
from django.utils.translation import ugettext as _
def can_view(user): def can_view(user):
...@@ -38,4 +39,6 @@ def can_view(user): ...@@ -38,4 +39,6 @@ def can_view(user):
viewing is granted and msg is a message (can be None). viewing is granted and msg is a message (can be None).
""" """
can = user.has_module_perms('machines') can = user.has_module_perms('machines')
return can, None if can else "Vous ne pouvez pas voir cette application." return can, None if can else _("You don't have the right to view this"
" application.")
...@@ -37,7 +37,7 @@ from __future__ import unicode_literals ...@@ -37,7 +37,7 @@ from __future__ import unicode_literals
from django.forms import ModelForm, Form from django.forms import ModelForm, Form
from django import forms from django import forms
from django.utils.translation import ugettext_lazy as _l from django.utils.translation import ugettext_lazy as _
from re2o.field_permissions import FieldPermissionFormMixin from re2o.field_permissions import FieldPermissionFormMixin
from re2o.mixins import FormRevMixin from re2o.mixins import FormRevMixin
...@@ -75,7 +75,7 @@ class EditMachineForm(FormRevMixin, FieldPermissionFormMixin, ModelForm): ...@@ -75,7 +75,7 @@ class EditMachineForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__) prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(EditMachineForm, self).__init__(*args, prefix=prefix, **kwargs) super(EditMachineForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['name'].label = 'Nom de la machine' self.fields['name'].label = _("Machine name")
class NewMachineForm(EditMachineForm): class NewMachineForm(EditMachineForm):
...@@ -94,12 +94,11 @@ class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm): ...@@ -94,12 +94,11 @@ class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
prefix = kwargs.pop('prefix', self.Meta.model.__name__) prefix = kwargs.pop('prefix', self.Meta.model.__name__)
user = kwargs.get('user') user = kwargs.get('user')
super(EditInterfaceForm, self).__init__(*args, prefix=prefix, **kwargs) super(EditInterfaceForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['mac_address'].label = 'Adresse mac' self.fields['mac_address'].label = _("MAC address")
self.fields['type'].label = 'Type de machine' self.fields['type'].label = _("Machine type")
self.fields['type'].empty_label = "Séléctionner un type de machine" self.fields['type'].empty_label = _("Select a machine type")
if "ipv4" in self.fields: if "ipv4" in self.fields:
self.fields['ipv4'].empty_label = ("Assignation automatique de " self.fields['ipv4'].empty_label = _("Automatic IPv4 assignment")
"l'ipv4")
self.fields['ipv4'].queryset = IpList.objects.filter( self.fields['ipv4'].queryset = IpList.objects.filter(
interface__isnull=True interface__isnull=True
) )
...@@ -170,7 +169,7 @@ class DelAliasForm(FormRevMixin, Form): ...@@ -170,7 +169,7 @@ class DelAliasForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs objets alias""" """Suppression d'un ou plusieurs objets alias"""
alias = forms.ModelMultipleChoiceField( alias = forms.ModelMultipleChoiceField(
queryset=Domain.objects.all(), queryset=Domain.objects.all(),
label="Alias actuels", label=_("Current aliases"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -191,15 +190,15 @@ class MachineTypeForm(FormRevMixin, ModelForm): ...@@ -191,15 +190,15 @@ class MachineTypeForm(FormRevMixin, ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__) prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(MachineTypeForm, self).__init__(*args, prefix=prefix, **kwargs) super(MachineTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['type'].label = 'Type de machine à ajouter' self.fields['type'].label = _("Machine type to add")
self.fields['ip_type'].label = "Type d'ip relié" self.fields['ip_type'].label = _("Related IP type")
class DelMachineTypeForm(FormRevMixin, Form): class DelMachineTypeForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs machinetype""" """Suppression d'un ou plusieurs machinetype"""
machinetypes = forms.ModelMultipleChoiceField( machinetypes = forms.ModelMultipleChoiceField(
queryset=MachineType.objects.none(), queryset=MachineType.objects.none(),
label="Types de machines actuelles", label=_("Current machine types"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -222,7 +221,7 @@ class IpTypeForm(FormRevMixin, ModelForm): ...@@ -222,7 +221,7 @@ class IpTypeForm(FormRevMixin, ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__) prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(IpTypeForm, self).__init__(*args, prefix=prefix, **kwargs) super(IpTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['type'].label = 'Type ip à ajouter' self.fields['type'].label = _("IP type to add")
class EditIpTypeForm(IpTypeForm): class EditIpTypeForm(IpTypeForm):
...@@ -239,7 +238,7 @@ class DelIpTypeForm(FormRevMixin, Form): ...@@ -239,7 +238,7 @@ class DelIpTypeForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs iptype""" """Suppression d'un ou plusieurs iptype"""
iptypes = forms.ModelMultipleChoiceField( iptypes = forms.ModelMultipleChoiceField(
queryset=IpType.objects.none(), queryset=IpType.objects.none(),
label="Types d'ip actuelles", label=_("Current IP types"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -261,17 +260,17 @@ class ExtensionForm(FormRevMixin, ModelForm): ...@@ -261,17 +260,17 @@ class ExtensionForm(FormRevMixin, ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__) prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(ExtensionForm, self).__init__(*args, prefix=prefix, **kwargs) super(ExtensionForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['name'].label = 'Extension à ajouter' self.fields['name'].label = _("Extension to add")
self.fields['origin'].label = 'Enregistrement A origin' self.fields['origin'].label = _("A record origin")
self.fields['origin_v6'].label = 'Enregistrement AAAA origin' self.fields['origin_v6'].label = _("AAAA record origin")
self.fields['soa'].label = 'En-tête SOA à utiliser' self.fields['soa'].label = _("SOA record to use")
class DelExtensionForm(FormRevMixin, Form): class DelExtensionForm(FormRevMixin, Form):
"""Suppression d'une ou plusieurs extensions""" """Suppression d'une ou plusieurs extensions"""
extensions = forms.ModelMultipleChoiceField( extensions = forms.ModelMultipleChoiceField(
queryset=Extension.objects.none(), queryset=Extension.objects.none(),
label="Extensions actuelles", label=_("Current extensions"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -310,7 +309,7 @@ class DelSOAForm(FormRevMixin, Form): ...@@ -310,7 +309,7 @@ class DelSOAForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs SOA""" """Suppression d'un ou plusieurs SOA"""
soa = forms.ModelMultipleChoiceField( soa = forms.ModelMultipleChoiceField(
queryset=SOA.objects.none(), queryset=SOA.objects.none(),
label="SOA actuels", label=_("Current SOA records"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -341,7 +340,7 @@ class DelMxForm(FormRevMixin, Form): ...@@ -341,7 +340,7 @@ class DelMxForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs MX""" """Suppression d'un ou plusieurs MX"""
mx = forms.ModelMultipleChoiceField( mx = forms.ModelMultipleChoiceField(
queryset=Mx.objects.none(), queryset=Mx.objects.none(),
label="MX actuels", label=_("Current MX records"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -374,7 +373,7 @@ class DelNsForm(FormRevMixin, Form): ...@@ -374,7 +373,7 @@ class DelNsForm(FormRevMixin, Form):
"""Suppresion d'un ou plusieurs NS""" """Suppresion d'un ou plusieurs NS"""
ns = forms.ModelMultipleChoiceField( ns = forms.ModelMultipleChoiceField(
queryset=Ns.objects.none(), queryset=Ns.objects.none(),
label="Enregistrements NS actuels", label=_("Current NS records"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -402,7 +401,7 @@ class DelTxtForm(FormRevMixin, Form): ...@@ -402,7 +401,7 @@ class DelTxtForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs TXT""" """Suppression d'un ou plusieurs TXT"""
txt = forms.ModelMultipleChoiceField( txt = forms.ModelMultipleChoiceField(
queryset=Txt.objects.none(), queryset=Txt.objects.none(),
label="Enregistrements Txt actuels", label=_("Current TXT records"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -430,7 +429,7 @@ class DelDNameForm(FormRevMixin, Form): ...@@ -430,7 +429,7 @@ class DelDNameForm(FormRevMixin, Form):
"""Delete a set of DNAME entries""" """Delete a set of DNAME entries"""
dnames = forms.ModelMultipleChoiceField( dnames = forms.ModelMultipleChoiceField(
queryset=Txt.objects.none(), queryset=Txt.objects.none(),
label="Existing DNAME entries", label=_("Current DNAME records"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -458,7 +457,7 @@ class DelSrvForm(FormRevMixin, Form): ...@@ -458,7 +457,7 @@ class DelSrvForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs Srv""" """Suppression d'un ou plusieurs Srv"""
srv = forms.ModelMultipleChoiceField( srv = forms.ModelMultipleChoiceField(
queryset=Srv.objects.none(), queryset=Srv.objects.none(),
label="Enregistrements Srv actuels", label=_("Current SRV records"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -487,7 +486,7 @@ class DelNasForm(FormRevMixin, Form): ...@@ -487,7 +486,7 @@ class DelNasForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs nas""" """Suppression d'un ou plusieurs nas"""
nas = forms.ModelMultipleChoiceField( nas = forms.ModelMultipleChoiceField(
queryset=Nas.objects.none(), queryset=Nas.objects.none(),
label="Enregistrements Nas actuels", label=_("Current NAS devices"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -519,7 +518,7 @@ class DelRoleForm(FormRevMixin, Form): ...@@ -519,7 +518,7 @@ class DelRoleForm(FormRevMixin, Form):
"""Deletion of one or several roles.""" """Deletion of one or several roles."""
role = forms.ModelMultipleChoiceField( role = forms.ModelMultipleChoiceField(
queryset=Role.objects.none(), queryset=Role.objects.none(),
label=_l("Current roles"), label=_("Current roles"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -560,7 +559,7 @@ class DelServiceForm(FormRevMixin, Form): ...@@ -560,7 +559,7 @@ class DelServiceForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs service""" """Suppression d'un ou plusieurs service"""
service = forms.ModelMultipleChoiceField( service = forms.ModelMultipleChoiceField(
queryset=Service.objects.none(), queryset=Service.objects.none(),
label="Services actuels", label=_("Current services"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -588,7 +587,7 @@ class DelVlanForm(FormRevMixin, Form): ...@@ -588,7 +587,7 @@ class DelVlanForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs vlans""" """Suppression d'un ou plusieurs vlans"""
vlan = forms.ModelMultipleChoiceField( vlan = forms.ModelMultipleChoiceField(
queryset=Vlan.objects.none(), queryset=Vlan.objects.none(),
label="Vlan actuels", label=_("Current VLANs"),
widget=forms.CheckboxSelectMultiple widget=forms.CheckboxSelectMultiple
) )
...@@ -646,3 +645,4 @@ class SshFpForm(FormRevMixin, ModelForm): ...@@ -646,3 +645,4 @@ class SshFpForm(FormRevMixin, ModelForm):
prefix=prefix, prefix=prefix,
**kwargs **kwargs
) )
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -23,25 +23,26 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -23,25 +23,26 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endcomment %} {% endcomment %}
{% load acl %} {% load acl %}
{% load i18n %}
{% load logs_extra %} {% load logs_extra %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Alias</th> <th>{% trans "Aliases" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for alias in alias_list %} {% for alias in alias_list %}
<tr> <tr>
<td>{{ alias }}</td> <td>{{ alias }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit alias %} {% can_edit alias %}
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %} {% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
{% acl_end %} {% acl_end %}
{% history_button alias %} {% history_button alias %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
...@@ -22,16 +22,17 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -22,16 +22,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %} {% load acl %}
{% load logs_extra %} {% load logs_extra %}
{% load i18n %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Target zone</th> <th>{% trans "Target zone" %}</th>
<th>Record</th> <th>{% trans "Record" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for dname in dname_list %} {% for dname in dname_list %}
<tr> <tr>
<td>{{ dname.zone }}</td> <td>{{ dname.zone }}</td>
<td>{{ dname.dns_entry }}</td> <td>{{ dname.dns_entry }}</td>
...@@ -39,10 +40,9 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -39,10 +40,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit dname %} {% can_edit dname %}
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %} {% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
{% acl_end %} {% acl_end %}
{% history_button dname %} {% history_button dname %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
...@@ -25,17 +25,18 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -25,17 +25,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %} {% load acl %}
{% load logs_extra %} {% load logs_extra %}
{% load design %} {% load design %}
{% load i18n %}
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Extension</th> <th>{% trans "Extension" %}</th>
<th>Droit infra pour utiliser ?</th> <th>{% trans "'infra' right required" %}</th>
<th>Enregistrement SOA</th> <th>{% trans "SOA record" %}</th>
<th>Enregistrement A origin</th> <th>{% trans "A record origin" %}</th>
{% if ipv6_enabled %} {% if ipv6_enabled %}
<th>Enregistrement AAAA origin</th> <th>{% trans "AAAA record origin" %}</th>
{% endif %} {% endif %}
<th></th> <th></th>
</tr> </tr>
...@@ -44,7 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -44,7 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr> <tr>
<td>{{ extension.name }}</td> <td>{{ extension.name }}</td>
<td>{{ extension.need_infra|tick }}</td> <td>{{ extension.need_infra|tick }}</td>
<td>{{ extension.soa}}</td> <td>{{ extension.soa }}</td>
<td>{{ extension.origin }}</td> <td>{{ extension.origin }}</td>
{% if ipv6_enabled %} {% if ipv6_enabled %}
<td>{{ extension.origin_v6 }}</td> <td>{{ extension.origin_v6 }}</td>
...@@ -59,3 +60,4 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -59,3 +60,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
...@@ -26,18 +26,20 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -26,18 +26,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %} {% load acl %}
{% load logs_extra %} {% load logs_extra %}
{% load i18n %}
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Type d'ip</th> <th>{% trans "IP type" %}</th>
<th>Extension</th> <th>{% trans "Extension" %}</th>
<th>Nécessite l'autorisation infra</th> <th>{% trans "'infra' right required" %}</th>
<th>Plage ipv4</th> <th>{% trans "IPv4 range" %}</th>
<th>Préfixe v6</th> <th>{% trans "v6 prefix" %}</th>
<th>DNSSEC reverse v4/v6</th> <th>{% trans "DNSSEC reverse v4/v6" %}</th>
<th>Sur vlan</th> <th>{% trans "On VLAN(s)" %}</th>
<th>Ouverture ports par défault</th> <th>{% trans "Default ports opening" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -61,3 +63,4 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -61,3 +63,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
...@@ -24,29 +24,30 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -24,29 +24,30 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %} {% load acl %}
{% load logs_extra %} {% load logs_extra %}
{% load i18n %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Ipv6</th> <th>{% trans "IPv6 addresses" %}</th>
<th>Slaac</th> <th>{% trans "SLAAC" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for ipv6 in ipv6_list %} {% for ipv6 in ipv6_list %}
<tr> <tr>
<td>{{ ipv6.ipv6 }}</td> <td>{{ ipv6.ipv6 }}</td>
<td>{{ ipv6.slaac_ip }}</td> <td>{{ ipv6.slaac_ip }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit ipv6 %} {% can_edit ipv6 %}
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %} {% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
{% acl_end %} {% acl_end %}
{% can_delete ipv6 %} {% can_delete ipv6 %}
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %} {% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
{% acl_end %} {% acl_end %}
{% history_button ipv6 %} {% history_button ipv6 %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
...@@ -24,26 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -24,26 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %} {% load acl %}
{% load logs_extra %} {% load logs_extra %}
{% load i18n %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Type de machine</th> <th>{% trans "Machine type" %}</th>
<th>Type d'ip correspondant</th> <th>{% trans "Matching IP type" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for type in machinetype_list %} {% for type in machinetype_list %}
<tr> <tr>
<td>{{ type.type }}</td> <td>{{ type.type }}</td>
<td>{{ type.ip_type }}</td> <td>{{ type.ip_type }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit type %} {% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %} {% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
{% acl_end %} {% acl_end %}
{% history_button type %} {% history_button type %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
...@@ -24,30 +24,29 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -24,30 +24,29 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %} {% load acl %}
{% load logs_extra %} {% load logs_extra %}
{% load i18n %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Zone concernée</th> <th>{% trans "Concerned zone" %}</th>
<th>Priorité</th> <th>{% trans "Priority" %}</th>
<th>Enregistrement</th> <th>{% trans "Record" %}</th>
<th></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for mx in mx_list %} {% for mx in mx_list %}
<tr> <tr>
<td>{{ mx.zone }}</td> <td>{{ mx.zone }}</td>
<td>{{ mx.priority }}</td> <td>{{ mx.priority }}</td>
<td>{{ mx.name }}</td> <td>{{ mx.name }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit mx %} {% can_edit mx %}
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %} {% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
{% acl_end %} {% acl_end %}
{% history_button mx %} {% history_button mx %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
...@@ -25,32 +25,33 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -25,32 +25,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %} {% load acl %}
{% load logs_extra %} {% load logs_extra %}
{% load design %} {% load design %}
{% load i18n %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Nom</th> <th>{% trans "Name" %}</th>
<th>Type du nas</th> <th>{% trans "NAS device type" %}</th>
<th>Type de machine reliées au nas</th> <th>{% trans "Machine type linked to the NAS device" %}</th>
<th>Mode d'accès</th> <th>{% trans "Access mode" %}</th>
<th>Autocapture mac</th> <th>{% trans "MAC address auto capture" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for nas in nas_list %} {% for nas in nas_list %}
<tr> <tr>
<td>{{ nas.name }}</td> <td>{{ nas.name }}</td>
<td>{{ nas.nas_type }}</td> <td>{{ nas.nas_type }}</td>
<td>{{ nas.machine_type }}</td> <td>{{ nas.machine_type }}</td>
<td>{{ nas.port_access_mode }}</td> <td>{{ nas.port_access_mode }}</td>
<td>{{ nas.autocapture_mac|tick }}</td> <td>{{ nas.autocapture_mac|tick }}</td>
<td class="text-right"> <td class="text-right">
{% can_edit nas %} {% can_edit nas %}
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %} {% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
{% acl_end %} {% acl_end %}
{% history_button nas %} {% history_button nas %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>