mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 07:02:26 +00:00
Merge branch 'translation' into 'dev'
Translation See merge request federez/re2o!256
This commit is contained in:
commit
da3f1f5d59
191 changed files with 9750 additions and 3434 deletions
|
@ -42,4 +42,5 @@ def can_view(user):
|
|||
if can:
|
||||
return can, None
|
||||
else:
|
||||
return can, _("You don't have the rights to see this application.")
|
||||
return can, _("You don't have the right to view this application.")
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ from django import forms
|
|||
from django.db.models import Q
|
||||
from django.forms import ModelForm, Form
|
||||
from django.core.validators import MinValueValidator
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as _l
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
from re2o.field_permissions import FieldPermissionFormMixin
|
||||
|
@ -93,11 +93,11 @@ class SelectUserArticleForm(FormRevMixin, Form):
|
|||
queryset=Article.objects.filter(
|
||||
Q(type_user='All') | Q(type_user='Adherent')
|
||||
),
|
||||
label=_l("Article"),
|
||||
label=_("Article"),
|
||||
required=True
|
||||
)
|
||||
quantity = forms.IntegerField(
|
||||
label=_l("Quantity"),
|
||||
label=_("Quantity"),
|
||||
validators=[MinValueValidator(1)],
|
||||
required=True
|
||||
)
|
||||
|
@ -117,11 +117,11 @@ class SelectClubArticleForm(Form):
|
|||
queryset=Article.objects.filter(
|
||||
Q(type_user='All') | Q(type_user='Club')
|
||||
),
|
||||
label=_l("Article"),
|
||||
label=_("Article"),
|
||||
required=True
|
||||
)
|
||||
quantity = forms.IntegerField(
|
||||
label=_l("Quantity"),
|
||||
label=_("Quantity"),
|
||||
validators=[MinValueValidator(1)],
|
||||
required=True
|
||||
)
|
||||
|
@ -161,7 +161,7 @@ class DelArticleForm(FormRevMixin, Form):
|
|||
"""
|
||||
articles = forms.ModelMultipleChoiceField(
|
||||
queryset=Article.objects.none(),
|
||||
label=_l("Existing articles"),
|
||||
label=_("Available articles"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -201,7 +201,7 @@ class DelPaiementForm(FormRevMixin, Form):
|
|||
# TODO : change paiement to payment
|
||||
paiements = forms.ModelMultipleChoiceField(
|
||||
queryset=Paiement.objects.none(),
|
||||
label=_l("Existing payment method"),
|
||||
label=_("Available payment methods"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -239,7 +239,7 @@ class DelBanqueForm(FormRevMixin, Form):
|
|||
# TODO : change banque to bank
|
||||
banques = forms.ModelMultipleChoiceField(
|
||||
queryset=Banque.objects.none(),
|
||||
label=_l("Existing banks"),
|
||||
label=_("Available banks"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -258,13 +258,13 @@ class RechargeForm(FormRevMixin, Form):
|
|||
Form used to refill a user's balance
|
||||
"""
|
||||
value = forms.FloatField(
|
||||
label=_l("Amount"),
|
||||
label=_("Amount"),
|
||||
min_value=0.01,
|
||||
validators=[]
|
||||
)
|
||||
payment = forms.ModelChoiceField(
|
||||
queryset=Paiement.objects.none(),
|
||||
label=_l("Payment method")
|
||||
label=_("Payment method")
|
||||
)
|
||||
|
||||
def __init__(self, *args, user=None, **kwargs):
|
||||
|
@ -290,3 +290,4 @@ class RechargeForm(FormRevMixin, Form):
|
|||
}
|
||||
)
|
||||
return self.cleaned_data
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
181
cotisations/migrations/0033_auto_20180818_1319.py
Normal file
181
cotisations/migrations/0033_auto_20180818_1319.py
Normal file
|
@ -0,0 +1,181 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2018-08-18 11:19
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import cotisations.validators
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import re2o.aes_field
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cotisations', '0032_custom_invoice'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='article',
|
||||
options={'permissions': (('view_article', 'Can view an article object'), ('buy_every_article', 'Can buy every article')), 'verbose_name': 'article', 'verbose_name_plural': 'articles'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='balancepayment',
|
||||
options={'verbose_name': 'user balance'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='banque',
|
||||
options={'permissions': (('view_banque', 'Can view a bank object'),), 'verbose_name': 'bank', 'verbose_name_plural': 'banks'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='cotisation',
|
||||
options={'permissions': (('view_cotisation', 'Can view a subscription object'), ('change_all_cotisation', 'Can edit the previous subscriptions')), 'verbose_name': 'subscription', 'verbose_name_plural': 'subscriptions'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='custominvoice',
|
||||
options={'permissions': (('view_custominvoice', 'Can view a custom invoice object'),)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='facture',
|
||||
options={'permissions': (('change_facture_control', 'Can edit the "controlled" state'), ('view_facture', 'Can view an invoice object'), ('change_all_facture', 'Can edit all the previous invoices')), 'verbose_name': 'invoice', 'verbose_name_plural': 'invoices'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='paiement',
|
||||
options={'permissions': (('view_paiement', 'Can view a payment method object'), ('use_every_payment', 'Can use every payment method')), 'verbose_name': 'payment method', 'verbose_name_plural': 'payment methods'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='vente',
|
||||
options={'permissions': (('view_vente', 'Can view a purchase object'), ('change_all_vente', 'Can edit all the previous purchases')), 'verbose_name': 'purchase', 'verbose_name_plural': 'purchases'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='article',
|
||||
name='available_for_everyone',
|
||||
field=models.BooleanField(default=False, verbose_name='is available for every user'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='article',
|
||||
name='duration',
|
||||
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration (in months)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='article',
|
||||
name='name',
|
||||
field=models.CharField(max_length=255, verbose_name='designation'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='article',
|
||||
name='prix',
|
||||
field=models.DecimalField(decimal_places=2, max_digits=5, verbose_name='unit price'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='article',
|
||||
name='type_cotisation',
|
||||
field=models.CharField(blank=True, choices=[('Connexion', 'Connection'), ('Adhesion', 'Membership'), ('All', 'Both of them')], default=None, max_length=255, null=True, verbose_name='subscription type'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='article',
|
||||
name='type_user',
|
||||
field=models.CharField(choices=[('Adherent', 'Member'), ('Club', 'Club'), ('All', 'Both of them')], default='All', max_length=255, verbose_name='type of users concerned'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='banque',
|
||||
name='name',
|
||||
field=models.CharField(max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='comnpaypayment',
|
||||
name='payment_credential',
|
||||
field=models.CharField(blank=True, default='', max_length=255, verbose_name='ComNpay VAT Number'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='comnpaypayment',
|
||||
name='payment_pass',
|
||||
field=re2o.aes_field.AESEncryptedField(blank=True, max_length=255, null=True, verbose_name='ComNpay secret key'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='comnpaypayment',
|
||||
name='production',
|
||||
field=models.BooleanField(default=True, verbose_name='Production mode enabled (production URL, instead of homologation)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cotisation',
|
||||
name='date_end',
|
||||
field=models.DateTimeField(verbose_name='end date'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cotisation',
|
||||
name='date_start',
|
||||
field=models.DateTimeField(verbose_name='start date'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cotisation',
|
||||
name='type_cotisation',
|
||||
field=models.CharField(choices=[('Connexion', 'Connection'), ('Adhesion', 'Membership'), ('All', 'Both of them')], default='All', max_length=255, verbose_name='subscription type'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cotisation',
|
||||
name='vente',
|
||||
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='cotisations.Vente', verbose_name='purchase'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='facture',
|
||||
name='cheque',
|
||||
field=models.CharField(blank=True, max_length=255, verbose_name='cheque number'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='facture',
|
||||
name='control',
|
||||
field=models.BooleanField(default=False, verbose_name='controlled'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='facture',
|
||||
name='valid',
|
||||
field=models.BooleanField(default=True, verbose_name='validated'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='paiement',
|
||||
name='available_for_everyone',
|
||||
field=models.BooleanField(default=False, verbose_name='is available for every user'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='paiement',
|
||||
name='is_balance',
|
||||
field=models.BooleanField(default=False, editable=False, help_text='There should be only one balance payment method.', validators=[cotisations.validators.check_no_balance], verbose_name='is user balance'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='paiement',
|
||||
name='moyen',
|
||||
field=models.CharField(max_length=255, verbose_name='method'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vente',
|
||||
name='duration',
|
||||
field=models.PositiveIntegerField(blank=True, null=True, verbose_name='duration (in months)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vente',
|
||||
name='facture',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cotisations.BaseInvoice', verbose_name='invoice'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vente',
|
||||
name='name',
|
||||
field=models.CharField(max_length=255, verbose_name='article'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vente',
|
||||
name='number',
|
||||
field=models.IntegerField(validators=[django.core.validators.MinValueValidator(1)], verbose_name='amount'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vente',
|
||||
name='prix',
|
||||
field=models.DecimalField(decimal_places=2, max_digits=5, verbose_name='price'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='vente',
|
||||
name='type_cotisation',
|
||||
field=models.CharField(blank=True, choices=[('Connexion', 'Connection'), ('Adhesion', 'Membership'), ('All', 'Both of them')], max_length=255, null=True, verbose_name='subscription type'),
|
||||
),
|
||||
]
|
|
@ -41,8 +41,7 @@ from django.dispatch import receiver
|
|||
from django.forms import ValidationError
|
||||
from django.core.validators import MinValueValidator
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as _l
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.urls import reverse
|
||||
from django.shortcuts import redirect
|
||||
from django.contrib import messages
|
||||
|
@ -58,7 +57,7 @@ from cotisations.validators import check_no_balance
|
|||
class BaseInvoice(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||
date = models.DateTimeField(
|
||||
auto_now_add=True,
|
||||
verbose_name=_l("Date")
|
||||
verbose_name=_("Date")
|
||||
)
|
||||
|
||||
# TODO : change prix to price
|
||||
|
@ -134,17 +133,17 @@ class Facture(BaseInvoice):
|
|||
cheque = models.CharField(
|
||||
max_length=255,
|
||||
blank=True,
|
||||
verbose_name=_l("Cheque number")
|
||||
verbose_name=_("cheque number")
|
||||
)
|
||||
# TODO : change name to validity for clarity
|
||||
valid = models.BooleanField(
|
||||
default=True,
|
||||
verbose_name=_l("Validated")
|
||||
verbose_name=_("validated")
|
||||
)
|
||||
# TODO : changed name to controlled for clarity
|
||||
control = models.BooleanField(
|
||||
default=False,
|
||||
verbose_name=_l("Controlled")
|
||||
verbose_name=_("controlled")
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
@ -152,14 +151,14 @@ class Facture(BaseInvoice):
|
|||
permissions = (
|
||||
# TODO : change facture to invoice
|
||||
('change_facture_control',
|
||||
_l("Can change the \"controlled\" state")),
|
||||
_("Can edit the \"controlled\" state")),
|
||||
('view_facture',
|
||||
_l("Can see an invoice's details")),
|
||||
_("Can view an invoice object")),
|
||||
('change_all_facture',
|
||||
_l("Can edit all the previous invoices")),
|
||||
_("Can edit all the previous invoices")),
|
||||
)
|
||||
verbose_name = _l("Invoice")
|
||||
verbose_name_plural = _l("Invoices")
|
||||
verbose_name = _("invoice")
|
||||
verbose_name_plural = _("invoices")
|
||||
|
||||
def linked_objects(self):
|
||||
"""Return linked objects : machine and domain.
|
||||
|
@ -195,7 +194,7 @@ class Facture(BaseInvoice):
|
|||
def can_view(self, user_request, *_args, **_kwargs):
|
||||
if not user_request.has_perm('cotisations.view_facture') and \
|
||||
self.user != user_request:
|
||||
return False, _("You don't have the right to see someone else's "
|
||||
return False, _("You don't have the right to view someone else's "
|
||||
"invoices history.")
|
||||
elif not self.valid:
|
||||
return False, _("The invoice has been invalidated.")
|
||||
|
@ -222,7 +221,7 @@ class Facture(BaseInvoice):
|
|||
if user_request.has_perm('cotisations.add_facture'):
|
||||
return True, None
|
||||
if len(Paiement.find_allowed_payments(user_request)) <= 0:
|
||||
return False, _("There are no payment types which you can use.")
|
||||
return False, _("There are no payment method which you can use.")
|
||||
if len(Article.find_allowed_articles(user_request)) <= 0:
|
||||
return False, _("There are no article that you can buy.")
|
||||
return True, None
|
||||
|
@ -259,22 +258,22 @@ def facture_post_delete(**kwargs):
|
|||
class CustomInvoice(BaseInvoice):
|
||||
class Meta:
|
||||
permissions = (
|
||||
('view_custominvoice', _l("Can view a custom invoice")),
|
||||
('view_custominvoice', _("Can view a custom invoice object")),
|
||||
)
|
||||
recipient = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_l("Recipient")
|
||||
verbose_name=_("Recipient")
|
||||
)
|
||||
payment = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_l("Payment type")
|
||||
verbose_name=_("Payment type")
|
||||
)
|
||||
address = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_l("Address")
|
||||
verbose_name=_("Address")
|
||||
)
|
||||
paid = models.BooleanField(
|
||||
verbose_name="Paid"
|
||||
verbose_name=_("Paid")
|
||||
)
|
||||
|
||||
|
||||
|
@ -294,38 +293,38 @@ class Vente(RevMixin, AclMixin, models.Model):
|
|||
|
||||
# TODO : change this to English
|
||||
COTISATION_TYPE = (
|
||||
('Connexion', _l("Connexion")),
|
||||
('Adhesion', _l("Membership")),
|
||||
('All', _l("Both of them")),
|
||||
('Connexion', _("Connection")),
|
||||
('Adhesion', _("Membership")),
|
||||
('All', _("Both of them")),
|
||||
)
|
||||
|
||||
# TODO : change facture to invoice
|
||||
facture = models.ForeignKey(
|
||||
'BaseInvoice',
|
||||
on_delete=models.CASCADE,
|
||||
verbose_name=_l("Invoice")
|
||||
verbose_name=_("invoice")
|
||||
)
|
||||
# TODO : change number to amount for clarity
|
||||
number = models.IntegerField(
|
||||
validators=[MinValueValidator(1)],
|
||||
verbose_name=_l("Amount")
|
||||
verbose_name=_("amount")
|
||||
)
|
||||
# TODO : change this field for a ForeinKey to Article
|
||||
name = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_l("Article")
|
||||
verbose_name=_("article")
|
||||
)
|
||||
# TODO : change prix to price
|
||||
# TODO : this field is not needed if you use Article ForeignKey
|
||||
prix = models.DecimalField(
|
||||
max_digits=5,
|
||||
decimal_places=2,
|
||||
verbose_name=_l("Price"))
|
||||
verbose_name=_("price"))
|
||||
# TODO : this field is not needed if you use Article ForeignKey
|
||||
duration = models.PositiveIntegerField(
|
||||
blank=True,
|
||||
null=True,
|
||||
verbose_name=_l("Duration (in whole month)")
|
||||
verbose_name=_("duration (in months)")
|
||||
)
|
||||
# TODO : this field is not needed if you use Article ForeignKey
|
||||
type_cotisation = models.CharField(
|
||||
|
@ -333,16 +332,16 @@ class Vente(RevMixin, AclMixin, models.Model):
|
|||
blank=True,
|
||||
null=True,
|
||||
max_length=255,
|
||||
verbose_name=_l("Type of cotisation")
|
||||
verbose_name=_("subscription type")
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
('view_vente', _l("Can see a purchase's details")),
|
||||
('change_all_vente', _l("Can edit all the previous purchases")),
|
||||
('view_vente', _("Can view a purchase object")),
|
||||
('change_all_vente', _("Can edit all the previous purchases")),
|
||||
)
|
||||
verbose_name = _l("Purchase")
|
||||
verbose_name_plural = _l("Purchases")
|
||||
verbose_name = _("purchase")
|
||||
verbose_name_plural = _("purchases")
|
||||
|
||||
# TODO : change prix_total to total_price
|
||||
def prix_total(self):
|
||||
|
@ -409,7 +408,7 @@ class Vente(RevMixin, AclMixin, models.Model):
|
|||
# Checking that if a cotisation is specified, there is also a duration
|
||||
if self.type_cotisation and not self.duration:
|
||||
raise ValidationError(
|
||||
_("A cotisation should always have a duration.")
|
||||
_("Duration must be specified for a subscription.")
|
||||
)
|
||||
self.update_cotisation()
|
||||
super(Vente, self).save(*args, **kwargs)
|
||||
|
@ -445,7 +444,7 @@ class Vente(RevMixin, AclMixin, models.Model):
|
|||
def can_view(self, user_request, *_args, **_kwargs):
|
||||
if (not user_request.has_perm('cotisations.view_vente') and
|
||||
self.facture.user != user_request):
|
||||
return False, _("You don't have the right to see someone "
|
||||
return False, _("You don't have the right to view someone "
|
||||
"else's purchase history.")
|
||||
else:
|
||||
return True, None
|
||||
|
@ -508,38 +507,38 @@ class Article(RevMixin, AclMixin, models.Model):
|
|||
|
||||
# TODO : Either use TYPE or TYPES in both choices but not both
|
||||
USER_TYPES = (
|
||||
('Adherent', _l("Member")),
|
||||
('Club', _l("Club")),
|
||||
('All', _l("Both of them")),
|
||||
('Adherent', _("Member")),
|
||||
('Club', _("Club")),
|
||||
('All', _("Both of them")),
|
||||
)
|
||||
|
||||
COTISATION_TYPE = (
|
||||
('Connexion', _l("Connexion")),
|
||||
('Adhesion', _l("Membership")),
|
||||
('All', _l("Both of them")),
|
||||
('Connexion', _("Connection")),
|
||||
('Adhesion', _("Membership")),
|
||||
('All', _("Both of them")),
|
||||
)
|
||||
|
||||
name = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_l("Designation")
|
||||
verbose_name=_("designation")
|
||||
)
|
||||
# TODO : change prix to price
|
||||
prix = models.DecimalField(
|
||||
max_digits=5,
|
||||
decimal_places=2,
|
||||
verbose_name=_l("Unitary price")
|
||||
verbose_name=_("unit price")
|
||||
)
|
||||
duration = models.PositiveIntegerField(
|
||||
blank=True,
|
||||
null=True,
|
||||
validators=[MinValueValidator(0)],
|
||||
verbose_name=_l("Duration (in whole month)")
|
||||
verbose_name=_("duration (in months)")
|
||||
)
|
||||
type_user = models.CharField(
|
||||
choices=USER_TYPES,
|
||||
default='All',
|
||||
max_length=255,
|
||||
verbose_name=_l("Type of users concerned")
|
||||
verbose_name=_("type of users concerned")
|
||||
)
|
||||
type_cotisation = models.CharField(
|
||||
choices=COTISATION_TYPE,
|
||||
|
@ -547,31 +546,31 @@ class Article(RevMixin, AclMixin, models.Model):
|
|||
blank=True,
|
||||
null=True,
|
||||
max_length=255,
|
||||
verbose_name=_l("Type of cotisation")
|
||||
verbose_name=_("subscription type")
|
||||
)
|
||||
available_for_everyone = models.BooleanField(
|
||||
default=False,
|
||||
verbose_name=_l("Is available for every user")
|
||||
verbose_name=_("is available for every user")
|
||||
)
|
||||
|
||||
unique_together = ('name', 'type_user')
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
('view_article', _l("Can see an article's details")),
|
||||
('buy_every_article', _l("Can buy every_article"))
|
||||
('view_article', _("Can view an article object")),
|
||||
('buy_every_article', _("Can buy every article"))
|
||||
)
|
||||
verbose_name = "Article"
|
||||
verbose_name_plural = "Articles"
|
||||
verbose_name = "article"
|
||||
verbose_name_plural = "articles"
|
||||
|
||||
def clean(self):
|
||||
if self.name.lower() == 'solde':
|
||||
raise ValidationError(
|
||||
_("Solde is a reserved article name")
|
||||
_("Balance is a reserved article name.")
|
||||
)
|
||||
if self.type_cotisation and not self.duration:
|
||||
raise ValidationError(
|
||||
_("Duration must be specified for a cotisation")
|
||||
_("Duration must be specified for a subscription.")
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
@ -592,7 +591,7 @@ class Article(RevMixin, AclMixin, models.Model):
|
|||
self.available_for_everyone
|
||||
or user.has_perm('cotisations.buy_every_article')
|
||||
or user.has_perm('cotisations.add_facture'),
|
||||
_("You cannot buy this Article.")
|
||||
_("You can't buy this article.")
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
@ -618,15 +617,14 @@ class Banque(RevMixin, AclMixin, models.Model):
|
|||
|
||||
name = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_l("Name")
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
('view_banque', _l("Can see a bank's details")),
|
||||
('view_banque', _("Can view a bank object")),
|
||||
)
|
||||
verbose_name = _l("Bank")
|
||||
verbose_name_plural = _l("Banks")
|
||||
verbose_name = _("bank")
|
||||
verbose_name_plural = _("banks")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -644,33 +642,33 @@ class Paiement(RevMixin, AclMixin, models.Model):
|
|||
# TODO : change moyen to method
|
||||
moyen = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_l("Method")
|
||||
verbose_name=_("method")
|
||||
)
|
||||
available_for_everyone = models.BooleanField(
|
||||
default=False,
|
||||
verbose_name=_l("Is available for every user")
|
||||
verbose_name=_("is available for every user")
|
||||
)
|
||||
is_balance = models.BooleanField(
|
||||
default=False,
|
||||
editable=False,
|
||||
verbose_name=_l("Is user balance"),
|
||||
help_text=_l("There should be only one balance payment method."),
|
||||
verbose_name=_("is user balance"),
|
||||
help_text=_("There should be only one balance payment method."),
|
||||
validators=[check_no_balance]
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
('view_paiement', _l("Can see a payement's details")),
|
||||
('use_every_payment', _l("Can use every payement")),
|
||||
('view_paiement', _("Can view a payment method object")),
|
||||
('use_every_payment', _("Can use every payment method")),
|
||||
)
|
||||
verbose_name = _l("Payment method")
|
||||
verbose_name_plural = _l("Payment methods")
|
||||
verbose_name = _("payment method")
|
||||
verbose_name_plural = _("payment methods")
|
||||
|
||||
def __str__(self):
|
||||
return self.moyen
|
||||
|
||||
def clean(self):
|
||||
"""
|
||||
"""l
|
||||
Override of the herited clean function to get a correct name
|
||||
"""
|
||||
self.moyen = self.moyen.title()
|
||||
|
@ -698,8 +696,8 @@ class Paiement(RevMixin, AclMixin, models.Model):
|
|||
if any(sell.type_cotisation for sell in invoice.vente_set.all()):
|
||||
messages.success(
|
||||
request,
|
||||
_("The cotisation of %(member_name)s has been \
|
||||
extended to %(end_date)s.") % {
|
||||
_("The subscription of %(member_name)s was extended to"
|
||||
" %(end_date)s.") % {
|
||||
'member_name': invoice.user.pseudo,
|
||||
'end_date': invoice.user.end_adhesion()
|
||||
}
|
||||
|
@ -708,7 +706,7 @@ class Paiement(RevMixin, AclMixin, models.Model):
|
|||
else:
|
||||
messages.success(
|
||||
request,
|
||||
_("The invoice has been created.")
|
||||
_("The invoice was created.")
|
||||
)
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
|
@ -729,7 +727,7 @@ class Paiement(RevMixin, AclMixin, models.Model):
|
|||
self.available_for_everyone
|
||||
or user.has_perm('cotisations.use_every_payment')
|
||||
or user.has_perm('cotisations.add_facture'),
|
||||
_("You cannot use this Payment.")
|
||||
_("You can't use this payment method.")
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
@ -747,7 +745,7 @@ class Paiement(RevMixin, AclMixin, models.Model):
|
|||
p = find_payment_method(self)
|
||||
if p is not None:
|
||||
return p._meta.verbose_name
|
||||
return _("No custom payment method")
|
||||
return _("No custom payment method.")
|
||||
|
||||
|
||||
class Cotisation(RevMixin, AclMixin, models.Model):
|
||||
|
@ -763,9 +761,9 @@ class Cotisation(RevMixin, AclMixin, models.Model):
|
|||
"""
|
||||
|
||||
COTISATION_TYPE = (
|
||||
('Connexion', _l("Connexion")),
|
||||
('Adhesion', _l("Membership")),
|
||||
('All', _l("Both of them")),
|
||||
('Connexion', _("Connection")),
|
||||
('Adhesion', _("Membership")),
|
||||
('All', _("Both of them")),
|
||||
)
|
||||
|
||||
# TODO : change vente to purchase
|
||||
|
@ -773,34 +771,36 @@ class Cotisation(RevMixin, AclMixin, models.Model):
|
|||
'Vente',
|
||||
on_delete=models.CASCADE,
|
||||
null=True,
|
||||
verbose_name=_l("Purchase")
|
||||
verbose_name=_("purchase")
|
||||
)
|
||||
type_cotisation = models.CharField(
|
||||
choices=COTISATION_TYPE,
|
||||
max_length=255,
|
||||
default='All',
|
||||
verbose_name=_l("Type of cotisation")
|
||||
verbose_name=_("subscription type")
|
||||
)
|
||||
date_start = models.DateTimeField(
|
||||
verbose_name=_l("Starting date")
|
||||
verbose_name=_("start date")
|
||||
)
|
||||
date_end = models.DateTimeField(
|
||||
verbose_name=_l("Ending date")
|
||||
verbose_name=_("end date")
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
('view_cotisation', _l("Can see a cotisation's details")),
|
||||
('change_all_cotisation', _l("Can edit the previous cotisations")),
|
||||
('view_cotisation', _("Can view a subscription object")),
|
||||
('change_all_cotisation', _("Can edit the previous subscriptions")),
|
||||
)
|
||||
verbose_name = _("subscription")
|
||||
verbose_name_plural = _("subscriptions")
|
||||
|
||||
def can_edit(self, user_request, *_args, **_kwargs):
|
||||
if not user_request.has_perm('cotisations.change_cotisation'):
|
||||
return False, _("You don't have the right to edit a cotisation.")
|
||||
return False, _("You don't have the right to edit a subscription.")
|
||||
elif not user_request.has_perm('cotisations.change_all_cotisation') \
|
||||
and (self.vente.facture.control or
|
||||
not self.vente.facture.valid):
|
||||
return False, _("You don't have the right to edit a cotisation "
|
||||
return False, _("You don't have the right to edit a subscription "
|
||||
"already controlled or invalidated.")
|
||||
else:
|
||||
return True, None
|
||||
|
@ -808,9 +808,9 @@ class Cotisation(RevMixin, AclMixin, models.Model):
|
|||
def can_delete(self, user_request, *_args, **_kwargs):
|
||||
if not user_request.has_perm('cotisations.delete_cotisation'):
|
||||
return False, _("You don't have the right to delete a "
|
||||
"cotisation.")
|
||||
"subscription.")
|
||||
if self.vente.facture.control or not self.vente.facture.valid:
|
||||
return False, _("You don't have the right to delete a cotisation "
|
||||
return False, _("You don't have the right to delete a subscription "
|
||||
"already controlled or invalidated.")
|
||||
else:
|
||||
return True, None
|
||||
|
@ -818,8 +818,8 @@ class Cotisation(RevMixin, AclMixin, models.Model):
|
|||
def can_view(self, user_request, *_args, **_kwargs):
|
||||
if not user_request.has_perm('cotisations.view_cotisation') and\
|
||||
self.vente.facture.user != user_request:
|
||||
return False, _("You don't have the right to see someone else's "
|
||||
"cotisation history.")
|
||||
return False, _("You don't have the right to view someone else's "
|
||||
"subscription history.")
|
||||
else:
|
||||
return True, None
|
||||
|
||||
|
@ -847,3 +847,4 @@ def cotisation_post_delete(**_kwargs):
|
|||
"""
|
||||
regen('mac_ip_list')
|
||||
regen('mailing')
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
from django.db import models
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as _l
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib import messages
|
||||
|
||||
|
||||
|
@ -36,7 +35,7 @@ class BalancePayment(PaymentMethodMixin, models.Model):
|
|||
"""
|
||||
|
||||
class Meta:
|
||||
verbose_name = _l("User Balance")
|
||||
verbose_name = _("user balance")
|
||||
|
||||
payment = models.OneToOneField(
|
||||
Paiement,
|
||||
|
@ -45,8 +44,8 @@ class BalancePayment(PaymentMethodMixin, models.Model):
|
|||
editable=False
|
||||
)
|
||||
minimum_balance = models.DecimalField(
|
||||
verbose_name=_l("Minimum balance"),
|
||||
help_text=_l("The minimal amount of money allowed for the balance"
|
||||
verbose_name=_("Minimum balance"),
|
||||
help_text=_("The minimal amount of money allowed for the balance"
|
||||
" at the end of a payment. You can specify negative "
|
||||
"amount."
|
||||
),
|
||||
|
@ -55,8 +54,8 @@ class BalancePayment(PaymentMethodMixin, models.Model):
|
|||
default=0,
|
||||
)
|
||||
maximum_balance = models.DecimalField(
|
||||
verbose_name=_l("Maximum balance"),
|
||||
help_text=_l("The maximal amount of money allowed for the balance."),
|
||||
verbose_name=_("Maximum balance"),
|
||||
help_text=_("The maximal amount of money allowed for the balance."),
|
||||
max_digits=5,
|
||||
decimal_places=2,
|
||||
default=50,
|
||||
|
@ -64,7 +63,7 @@ class BalancePayment(PaymentMethodMixin, models.Model):
|
|||
null=True,
|
||||
)
|
||||
credit_balance_allowed = models.BooleanField(
|
||||
verbose_name=_l("Allow user to credit their balance"),
|
||||
verbose_name=_("Allow user to credit their balance"),
|
||||
default=False,
|
||||
)
|
||||
|
||||
|
@ -97,7 +96,7 @@ class BalancePayment(PaymentMethodMixin, models.Model):
|
|||
if len(p) > 0:
|
||||
form.add_error(
|
||||
'payment_method',
|
||||
_("There is already a payment type for user balance")
|
||||
_("There is already a payment method for user balance.")
|
||||
)
|
||||
|
||||
def alter_payment(self, payment):
|
||||
|
@ -118,3 +117,4 @@ class BalancePayment(PaymentMethodMixin, models.Model):
|
|||
len(Paiement.find_allowed_payments(user_request)
|
||||
.exclude(is_balance=True)) > 0
|
||||
) and self.credit_balance_allowed
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
from django.db import models
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext_lazy as _l
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from cotisations.models import Paiement
|
||||
from cotisations.payment_methods.mixins import PaymentMethodMixin
|
||||
|
@ -33,7 +33,7 @@ class ChequePayment(PaymentMethodMixin, models.Model):
|
|||
"""
|
||||
|
||||
class Meta:
|
||||
verbose_name = _l("Cheque")
|
||||
verbose_name = _("Cheque")
|
||||
|
||||
payment = models.OneToOneField(
|
||||
Paiement,
|
||||
|
@ -52,3 +52,4 @@ class ChequePayment(PaymentMethodMixin, models.Model):
|
|||
'cotisations:cheque:validate',
|
||||
kwargs={'invoice_pk': invoice.pk}
|
||||
))
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ def cheque(request, invoice_pk):
|
|||
if invoice.valid or not isinstance(payment_method, ChequePayment):
|
||||
messages.error(
|
||||
request,
|
||||
_("You cannot pay this invoice with a cheque.")
|
||||
_("You can't pay this invoice with a cheque.")
|
||||
)
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
|
@ -67,3 +67,4 @@ def cheque(request, invoice_pk):
|
|||
'amount': invoice.prix_total()
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
from django.db import models
|
||||
from django.shortcuts import render
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as _l
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from cotisations.models import Paiement
|
||||
from cotisations.payment_methods.mixins import PaymentMethodMixin
|
||||
|
@ -37,7 +36,7 @@ class ComnpayPayment(PaymentMethodMixin, models.Model):
|
|||
"""
|
||||
|
||||
class Meta:
|
||||
verbose_name = "ComNpay"
|
||||
verbose_name = _("ComNpay")
|
||||
|
||||
payment = models.OneToOneField(
|
||||
Paiement,
|
||||
|
@ -49,17 +48,17 @@ class ComnpayPayment(PaymentMethodMixin, models.Model):
|
|||
max_length=255,
|
||||
default='',
|
||||
blank=True,
|
||||
verbose_name=_l("ComNpay VAD Number"),
|
||||
verbose_name=_("ComNpay VAT Number"),
|
||||
)
|
||||
payment_pass = AESEncryptedField(
|
||||
max_length=255,
|
||||
null=True,
|
||||
blank=True,
|
||||
verbose_name=_l("ComNpay Secret Key"),
|
||||
verbose_name=_("ComNpay secret key"),
|
||||
)
|
||||
minimum_payment = models.DecimalField(
|
||||
verbose_name=_l("Minimum payment"),
|
||||
help_text=_l("The minimal amount of money you have to use when paying"
|
||||
verbose_name=_("Minimum payment"),
|
||||
help_text=_("The minimal amount of money you have to use when paying"
|
||||
" with ComNpay"),
|
||||
max_digits=5,
|
||||
decimal_places=2,
|
||||
|
@ -67,7 +66,7 @@ class ComnpayPayment(PaymentMethodMixin, models.Model):
|
|||
)
|
||||
production = models.BooleanField(
|
||||
default=True,
|
||||
verbose_name=_l("Production mode enabled (production url, instead of homologation)"),
|
||||
verbose_name=_("Production mode enabled (production URL, instead of homologation)"),
|
||||
)
|
||||
|
||||
def return_url_comnpay(self):
|
||||
|
@ -102,7 +101,7 @@ class ComnpayPayment(PaymentMethodMixin, models.Model):
|
|||
'action': self.return_url_comnpay(),
|
||||
'method': 'POST',
|
||||
'content': p.buildSecretHTML(
|
||||
_("Pay invoice no : ")+str(invoice.id),
|
||||
_("Pay invoice number ")+str(invoice.id),
|
||||
invoice.prix_total(),
|
||||
idTransaction=str(invoice.id)
|
||||
),
|
||||
|
@ -114,6 +113,6 @@ class ComnpayPayment(PaymentMethodMixin, models.Model):
|
|||
"""Checks that the price meets the requirement to be paid with ComNpay.
|
||||
"""
|
||||
return ((price >= self.minimum_payment),
|
||||
_('In order to pay your invoice with ComNpay'
|
||||
', the price must be grater than {} €')
|
||||
.format(self.minimum_payment))
|
||||
_("In order to pay your invoice with ComNpay, the price must"
|
||||
" be greater than {} €.").format(self.minimum_payment))
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ def accept_payment(request, factureid):
|
|||
if invoice.valid:
|
||||
messages.success(
|
||||
request,
|
||||
_("The payment of %(amount)s € has been accepted.") % {
|
||||
_("The payment of %(amount)s € was accepted.") % {
|
||||
'amount': invoice.prix_total()
|
||||
}
|
||||
)
|
||||
|
@ -60,8 +60,8 @@ def accept_payment(request, factureid):
|
|||
for purchase in invoice.vente_set.all()):
|
||||
messages.success(
|
||||
request,
|
||||
_("The cotisation of %(member_name)s has been \
|
||||
extended to %(end_date)s.") % {
|
||||
_("The subscription of %(member_name)s was extended to"
|
||||
" %(end_date)s.") % {
|
||||
'member_name': request.user.pseudo,
|
||||
'end_date': request.user.end_adhesion()
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ def refuse_payment(request):
|
|||
"""
|
||||
messages.error(
|
||||
request,
|
||||
_("The payment has been refused.")
|
||||
_("The payment was refused.")
|
||||
)
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
|
@ -136,3 +136,4 @@ def ipn(request):
|
|||
# Everything worked we send a reponse to Comnpay indicating that
|
||||
# it's ok for them to proceed
|
||||
return HttpResponse("HTTP/1.0 200 OK")
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as _l
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from . import PAYMENT_METHODS
|
||||
from cotisations.utils import find_payment_method
|
||||
|
@ -58,8 +57,8 @@ class PaymentMethodForm(forms.Form):
|
|||
"""
|
||||
|
||||
payment_method = forms.ChoiceField(
|
||||
label=_l("Special payment method"),
|
||||
help_text=_l("Warning : You will not be able to change the payment "
|
||||
label=_("Special payment method"),
|
||||
help_text=_("Warning: you will not be able to change the payment "
|
||||
"method later. But you will be allowed to edit the other "
|
||||
"options."
|
||||
),
|
||||
|
@ -70,7 +69,7 @@ class PaymentMethodForm(forms.Form):
|
|||
super(PaymentMethodForm, self).__init__(*args, **kwargs)
|
||||
prefix = kwargs.get('prefix', None)
|
||||
self.fields['payment_method'].choices = [(i,p.NAME) for (i,p) in enumerate(PAYMENT_METHODS)]
|
||||
self.fields['payment_method'].choices.insert(0, ('', _l('no')))
|
||||
self.fields['payment_method'].choices.insert(0, ('', _('no')))
|
||||
self.fields['payment_method'].widget.attrs = {
|
||||
'id': 'paymentMethodSelect'
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<tr>
|
||||
<th>{% trans "Article" %}</th>
|
||||
<th>{% trans "Price" %}</th>
|
||||
<th>{% trans "Cotisation type" %}</th>
|
||||
<th>{% trans "Duration (month)" %}</th>
|
||||
<th>{% trans "Subscription type" %}</th>
|
||||
<th>{% trans "Duration (in months)" %}</th>
|
||||
<th>{% trans "Concerned users" %}</th>
|
||||
<th>{% trans "Available for everyone" %}</th>
|
||||
<th></th>
|
||||
|
|
|
@ -26,25 +26,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load i18n %}
|
||||
{% load logs_extra %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Bank" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for banque in banque_list %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ banque.name }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit banque %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="{% trans "Edit" %}" href="{% url 'cotisations:edit-banque' banque.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button banque %}
|
||||
</td>
|
||||
<th>{% trans "Bank" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</thead>
|
||||
{% for banque in banque_list %}
|
||||
<tr>
|
||||
<td>{{ banque.name }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit banque %}
|
||||
{% include 'buttons/edit.html' with href='cotisations:edit-banque' id=banque.id %}
|
||||
{% acl_end %}
|
||||
{% history_button banque %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% include 'buttons/sort.html' with prefix='cotis' col='date' text=tr_date %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Invoice id" as tr_invoice_id %}
|
||||
{% trans "Invoice ID" as tr_invoice_id %}
|
||||
{% include 'buttons/sort.html' with prefix='cotis' col='id' text=tr_invoice_id %}
|
||||
</th>
|
||||
<th></th>
|
||||
|
@ -65,32 +65,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<td>{{ facture.date }}</td>
|
||||
<td>{{ facture.id }}</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="editinvoice" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
{% trans "Edit" %}<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="editinvoice">
|
||||
{% can_edit facture %}
|
||||
<li>
|
||||
<a href="{% url 'cotisations:edit-facture' facture.id %}">
|
||||
<i class="fa fa-dollar-sign"></i> {% trans "Edit" %}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_else %}
|
||||
<li>{% trans "Controlled invoice" %}</li>
|
||||
{% acl_end %}
|
||||
{% can_delete facture %}
|
||||
<li>
|
||||
<a href="{% url 'cotisations:del-facture' facture.id %}">
|
||||
<i class="fa fa-trash"></i> {% trans "Delete" %}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
<li>
|
||||
{% history_button facture text=True html_class=False%}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% can_edit facture %}
|
||||
{% include 'buttons/edit.html' with href='cotisations:edit-facture' id=facture.id %}
|
||||
{% acl_else %}
|
||||
{% trans "Controlled invoice" %}
|
||||
{% acl_end %}
|
||||
{% can_delete facture %}
|
||||
{% include 'buttons/suppr.html' with href='cotisations:del-facture' id=facture.id %}
|
||||
{% acl_end %}
|
||||
{% history_button facture text=True html_class=False %}
|
||||
</td>
|
||||
<td>
|
||||
{% if facture.valid %}
|
||||
|
@ -109,3 +92,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% include 'pagination.html' with list=facture_list %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% include 'buttons/sort.html' with prefix='invoice' col='date' text=tr_date %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Invoice id" as tr_invoice_id %}
|
||||
{% trans "Invoice ID" as tr_invoice_id %}
|
||||
{% include 'buttons/sort.html' with prefix='invoice' col='id' text=tr_invoice_id %}
|
||||
</th>
|
||||
<th>
|
||||
|
|
|
@ -41,7 +41,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<td>{{ paiement.moyen }}</td>
|
||||
<td>{{ paiement.available_for_everyone|tick }}</td>
|
||||
<td>
|
||||
{{paiement.get_payment_method_name}}
|
||||
{{ paiement.get_payment_method_name }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% can_edit paiement %}
|
||||
|
|
|
@ -30,17 +30,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% block title %}{% trans "Invoice control" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>{% trans "Invoice control and validation" %}</h2>
|
||||
|
||||
{% if facture_list.paginator %}
|
||||
{% include 'pagination.html' with list=facture_list %}
|
||||
{% endif %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{{ controlform.management_form }}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Profil" %}</th>
|
||||
<th>{% trans "Profile" %}</th>
|
||||
<th>
|
||||
{% trans "Last name" as tr_last_name %}
|
||||
{% include 'buttons/sort.html' with prefix='control' col='name' text=tr_last_name %}
|
||||
|
@ -50,11 +53,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% include 'buttons/sort.html' with prefix='control' col='surname' text=tr_first_name %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Invoice id" as tr_invoice_id %}
|
||||
{% trans "Invoice ID" as tr_invoice_id %}
|
||||
{% include 'buttons/sort.html' with prefix='control' col='id' text=tr_invoice_id %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "User id" as tr_user_id %}
|
||||
{% trans "User ID" as tr_user_id %}
|
||||
{% include 'buttons/sort.html' with prefix='control' col='user-id' text=tr_user_id %}
|
||||
</th>
|
||||
<th>{% trans "Designation" %}</th>
|
||||
|
@ -65,7 +68,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</th>
|
||||
<th>
|
||||
{% trans "Date" as tr_date %}
|
||||
{% include 'buttons/sort.html' with prefix='control' col='date' text=tr_date %}i
|
||||
{% include 'buttons/sort.html' with prefix='control' col='date' text=tr_date %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Validated" as tr_validated %}
|
||||
|
@ -109,3 +112,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% if facture_list.paginator %}
|
||||
{% include 'pagination.html' with list=facture_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -26,18 +26,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Deletion of cotisations" %}{% endblock %}
|
||||
{% block title %}{% trans "Deletion of subscriptions" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
<h4>
|
||||
{% blocktrans %}
|
||||
Warning. Are you sure you really want te delete this {{ object_name }} object ( {{ objet }} ) ?
|
||||
{% endblocktrans %}
|
||||
{% blocktrans %}Warning: are you sure you really want to delete this {{ object_name }} object ( {{ objet }} )?{% endblocktrans %}
|
||||
</h4>
|
||||
{% trans "Confirm" as tr_confirm %}
|
||||
{% bootstrap_button tr_confirm button_type='submit' icon='trash' %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load massive_bootstrap_form %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Invoices creation and edition" %}{% endblock %}
|
||||
{% block title %}{% trans "Creation and editing of invoices" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% bootstrap_form_errors factureform %}
|
||||
|
@ -62,3 +62,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -27,20 +27,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load staticfiles%}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Invoices creation and edition" %}{% endblock %}
|
||||
{% block title %}{% trans "Creation and editing of invoices" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if title %}
|
||||
<h3>{{title}}</h3>
|
||||
<h3>{{ title }}</h3>
|
||||
{% else %}
|
||||
<h3>{% trans "New invoice" %}</h3>
|
||||
{% endif %}
|
||||
{% if max_balance %}
|
||||
<h4>{% trans "Maximum allowed balance : "%}{{max_balance}} €</h4>
|
||||
<h4>{% blocktrans %}Maximum allowed balance: {{ max_balance }} €{% endblocktrans %}</h4>
|
||||
{% endif %}
|
||||
{% if balance is not None %}
|
||||
<p>
|
||||
{% trans "Current balance :" %} {{ balance }} €
|
||||
{% blocktrans %}Current balance: {{ balance }} €{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
|
@ -68,9 +69,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</div>
|
||||
<input class="btn btn-primary btn-sm" role="button" value="{% trans "Add an article"%}" id="add_one">
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
Total price : <span id="total_price">0,00</span> €
|
||||
{% endblocktrans %}
|
||||
{% blocktrans %}Total price: <span id="total_price">0,00</span> €{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% bootstrap_button action_name button_type='submit' icon='star' %}
|
||||
|
@ -183,3 +182,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% block title %}{% trans "Invoices" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Cotisations" %}</h2>
|
||||
<h2>{% trans "Subscriptions" %}</h2>
|
||||
{% include 'cotisations/aff_cotisations.html' with facture_list=facture_list %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-article' %}">
|
||||
<i class="fa fa-trash"></i> {% trans "Delete article types" %}
|
||||
<i class="fa fa-trash"></i> {% trans "Delete one or several article types" %}
|
||||
</a>
|
||||
{% include 'cotisations/aff_article.html' with article_list=article_list %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-banque' %}">
|
||||
<i class="fa fa-trash"></i> {% trans "Delete banks" %}
|
||||
<i class="fa fa-trash"></i> {% trans "Delete one or several banks" %}
|
||||
</a>
|
||||
{% include 'cotisations/aff_banque.html' with banque_list=banque_list %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -27,17 +27,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Payments" %}{% endblock %}
|
||||
{% block title %}{% trans "Payment methods" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Payment types list" %}</h2>
|
||||
<h2>{% trans "List of payment methods" %}</h2>
|
||||
{% can_create Paiement %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-paiement' %}">
|
||||
<i class="fa fa-cart-plus"></i> {% trans "Add a payment type" %}
|
||||
<i class="fa fa-cart-plus"></i> {% trans "Add a payment method" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-paiement' %}">
|
||||
<i class="fa fa-trash"></i> {% trans "Delete payment types" %}
|
||||
<i class="fa fa-trash"></i> {% trans "Delete one or several payment methods" %}
|
||||
</a>
|
||||
{% include 'cotisations/aff_paiement.html' with paiement_list=paiement_list %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -31,11 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% block content %}
|
||||
<h3>
|
||||
{% blocktrans %}
|
||||
Pay {{ amount }} €
|
||||
{% endblocktrans %}
|
||||
{% blocktrans %}Pay {{ amount }} €{% endblocktrans %}
|
||||
</h3>
|
||||
<form class="form" method="{{ method | default:"post" }}" action="{{ action }}">
|
||||
<form class="form" method="{{ method|default:"post" }}" action="{{ action }}">
|
||||
{{ content | safe }}
|
||||
{% if form %}
|
||||
{% csrf_token %}
|
||||
|
@ -45,3 +43,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% bootstrap_button tr_pay button_type='submit' icon='piggy-bank' %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -61,3 +61,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</a>
|
||||
{% acl_end %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -17,5 +17,6 @@ def check_no_balance(is_balance):
|
|||
p = Paiement.objects.filter(is_balance=True)
|
||||
if len(p) > 0:
|
||||
raise ValidationError(
|
||||
_("There are already payment method(s) for user balance")
|
||||
_("There is already a payment method for user balance.")
|
||||
)
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ def new_custom_invoice(request):
|
|||
)
|
||||
messages.success(
|
||||
request,
|
||||
_('The custom invoice was successfully created.')
|
||||
_("The custom invoice was created.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-custom-invoice'))
|
||||
|
||||
|
@ -313,7 +313,7 @@ def edit_facture(request, facture, **_kwargs):
|
|||
purchase_form.save()
|
||||
messages.success(
|
||||
request,
|
||||
_("The invoice has been successfully edited.")
|
||||
_("The invoice was edited.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index'))
|
||||
return form({
|
||||
|
@ -333,7 +333,7 @@ def del_facture(request, facture, **_kwargs):
|
|||
facture.delete()
|
||||
messages.success(
|
||||
request,
|
||||
_("The invoice has been successfully deleted.")
|
||||
_("The invoice was deleted.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index'))
|
||||
return form({
|
||||
|
@ -367,7 +367,7 @@ def edit_custom_invoice(request, invoice, **kwargs):
|
|||
purchase_form.save()
|
||||
messages.success(
|
||||
request,
|
||||
_("The invoice has been successfully edited.")
|
||||
_("The invoice was edited.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-custom-invoice'))
|
||||
|
||||
|
@ -427,7 +427,7 @@ def del_custom_invoice(request, invoice, **_kwargs):
|
|||
invoice.delete()
|
||||
messages.success(
|
||||
request,
|
||||
_("The invoice has been successfully deleted.")
|
||||
_("The invoice was deleted.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-custom-invoice'))
|
||||
return form({
|
||||
|
@ -453,7 +453,7 @@ def add_article(request):
|
|||
article.save()
|
||||
messages.success(
|
||||
request,
|
||||
_("The article has been successfully created.")
|
||||
_("The article was created.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-article'))
|
||||
return form({
|
||||
|
@ -475,7 +475,7 @@ def edit_article(request, article_instance, **_kwargs):
|
|||
article.save()
|
||||
messages.success(
|
||||
request,
|
||||
_("The article has been successfully edited.")
|
||||
_("The article was edited.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-article'))
|
||||
return form({
|
||||
|
@ -497,7 +497,7 @@ def del_article(request, instances):
|
|||
article_del.delete()
|
||||
messages.success(
|
||||
request,
|
||||
_("The article(s) have been successfully deleted.")
|
||||
_("The articles were deleted.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-article'))
|
||||
return form({
|
||||
|
@ -525,7 +525,7 @@ def add_paiement(request):
|
|||
payment_method.save(payment)
|
||||
messages.success(
|
||||
request,
|
||||
_("The payment method has been successfully created.")
|
||||
_("The payment method was created.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-paiement'))
|
||||
return form({
|
||||
|
@ -561,8 +561,7 @@ def edit_paiement(request, paiement_instance, **_kwargs):
|
|||
if payment_method is not None:
|
||||
payment_method.save()
|
||||
messages.success(
|
||||
request,
|
||||
_("The payement method has been successfully edited.")
|
||||
request,_("The payment method was edited.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-paiement'))
|
||||
return form({
|
||||
|
@ -588,8 +587,7 @@ def del_paiement(request, instances):
|
|||
payment_del.delete()
|
||||
messages.success(
|
||||
request,
|
||||
_("The payment method %(method_name)s has been \
|
||||
successfully deleted.") % {
|
||||
_("The payment method %(method_name)s was deleted.") % {
|
||||
'method_name': payment_del
|
||||
}
|
||||
)
|
||||
|
@ -621,7 +619,7 @@ def add_banque(request):
|
|||
bank.save()
|
||||
messages.success(
|
||||
request,
|
||||
_("The bank has been successfully created.")
|
||||
_("The bank was created.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-banque'))
|
||||
return form({
|
||||
|
@ -644,7 +642,7 @@ def edit_banque(request, banque_instance, **_kwargs):
|
|||
bank.save()
|
||||
messages.success(
|
||||
request,
|
||||
_("The bank has been successfully edited")
|
||||
_("The bank was edited.")
|
||||
)
|
||||
return redirect(reverse('cotisations:index-banque'))
|
||||
return form({
|
||||
|
@ -669,8 +667,7 @@ def del_banque(request, instances):
|
|||
bank_del.delete()
|
||||
messages.success(
|
||||
request,
|
||||
_("The bank %(bank_name)s has been successfully \
|
||||
deleted.") % {
|
||||
_("The bank %(bank_name)s was deleted.") % {
|
||||
'bank_name': bank_del
|
||||
}
|
||||
)
|
||||
|
@ -873,3 +870,4 @@ def credit_solde(request, user, **_kwargs):
|
|||
'action_name': _("Pay"),
|
||||
'max_balance': p.payment_method.maximum_balance,
|
||||
}, 'cotisations/facture.html', request)
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
Here are defined some functions to check acl on the application.
|
||||
"""
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
|
||||
def can_view(user):
|
||||
|
@ -38,4 +39,6 @@ def can_view(user):
|
|||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_module_perms('admin')
|
||||
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.")
|
||||
|
||||
|
|
BIN
logs/locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
logs/locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
338
logs/locale/fr/LC_MESSAGES/django.po
Normal file
338
logs/locale/fr/LC_MESSAGES/django.po
Normal file
|
@ -0,0 +1,338 @@
|
|||
# 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 © 2018 Maël Kervella
|
||||
#
|
||||
# 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.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 2.5\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-15 20:12+0200\n"
|
||||
"PO-Revision-Date: 2018-06-23 16:01+0200\n"
|
||||
"Last-Translator: Laouen Fernet <laouen.fernet@supelec.fr>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr_FR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: acl.py:42
|
||||
msgid "You don't have the right to view this application."
|
||||
msgstr "Vous n'avez pas le droit de voir cette application."
|
||||
|
||||
#: templates/logs/aff_stats_logs.html:36
|
||||
msgid "Edited object"
|
||||
msgstr "Objet modifié"
|
||||
|
||||
#: templates/logs/aff_stats_logs.html:37
|
||||
#: templates/logs/aff_stats_models.html:32
|
||||
msgid "Object type"
|
||||
msgstr "Type d'objet"
|
||||
|
||||
#: templates/logs/aff_stats_logs.html:38
|
||||
msgid "Edited by"
|
||||
msgstr "Modifié par"
|
||||
|
||||
#: templates/logs/aff_stats_logs.html:40
|
||||
msgid "Date of editing"
|
||||
msgstr "Date de modification"
|
||||
|
||||
#: templates/logs/aff_stats_logs.html:42
|
||||
msgid "Comment"
|
||||
msgstr "Commentaire"
|
||||
|
||||
#: templates/logs/aff_stats_logs.html:58 templates/logs/aff_summary.html:62
|
||||
#: templates/logs/aff_summary.html:85 templates/logs/aff_summary.html:104
|
||||
#: templates/logs/aff_summary.html:123 templates/logs/aff_summary.html:142
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: templates/logs/aff_stats_models.html:29
|
||||
#, python-format
|
||||
msgid "Statistics of the set %(key)s"
|
||||
msgstr "Statistiques de l'ensemble %(key)s"
|
||||
|
||||
#: templates/logs/aff_stats_models.html:33
|
||||
msgid "Number of stored entries"
|
||||
msgstr "Nombre d'entrées enregistrées"
|
||||
|
||||
#: templates/logs/aff_stats_users.html:31
|
||||
#, python-format
|
||||
msgid "Statistics per %(key_dict)s of %(key)s"
|
||||
msgstr "Statistiques par %(key_dict)s de %(key)s"
|
||||
|
||||
#: templates/logs/aff_stats_users.html:34
|
||||
#, python-format
|
||||
msgid "Number of %(key)s per %(key_dict)s"
|
||||
msgstr "Nombre de %(key)s par %(key_dict)s"
|
||||
|
||||
#: templates/logs/aff_stats_users.html:35
|
||||
msgid "Rank"
|
||||
msgstr "Rang"
|
||||
|
||||
#: templates/logs/aff_summary.html:37
|
||||
msgid "Date"
|
||||
msgstr "Date"
|
||||
|
||||
#: templates/logs/aff_summary.html:39
|
||||
msgid "Editing"
|
||||
msgstr "Modification"
|
||||
|
||||
#: templates/logs/aff_summary.html:48
|
||||
#, python-format
|
||||
msgid "%(username)s has banned"
|
||||
msgstr "%(username)s a banni"
|
||||
|
||||
#: templates/logs/aff_summary.html:52 templates/logs/aff_summary.html:75
|
||||
msgid "No reason"
|
||||
msgstr "Aucun motif"
|
||||
|
||||
#: templates/logs/aff_summary.html:71
|
||||
#, python-format
|
||||
msgid "%(username)s has graciously authorised"
|
||||
msgstr "%(username)s a autorisé gracieusement"
|
||||
|
||||
#: templates/logs/aff_summary.html:94
|
||||
#, python-format
|
||||
msgid "%(username)s has updated"
|
||||
msgstr "%(username)s a mis à jour"
|
||||
|
||||
#: templates/logs/aff_summary.html:113
|
||||
#, python-format
|
||||
msgid "%(username)s has sold %(number)sx %(name)s to"
|
||||
msgstr "%(username)s a vendu %(number)sx %(name)s à"
|
||||
|
||||
#: templates/logs/aff_summary.html:116
|
||||
#, python-format
|
||||
msgid "+%(duration)s months"
|
||||
msgstr "+%(duration)s mois"
|
||||
|
||||
#: templates/logs/aff_summary.html:132
|
||||
#, python-format
|
||||
msgid "%(username)s has edited an interface of"
|
||||
msgstr "%(username)s a modifié une interface de"
|
||||
|
||||
#: templates/logs/delete.html:29
|
||||
msgid "Deletion of actions"
|
||||
msgstr "Suppression d'actions"
|
||||
|
||||
#: templates/logs/delete.html:35
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Warning: are you sure you want to delete this action %(objet_name)s "
|
||||
"( %(objet)s )?"
|
||||
msgstr ""
|
||||
"Attention: voulez-vous vraiment supprimer cette action %(objet_name)s "
|
||||
"( %(objet)s ) ?"
|
||||
|
||||
#: templates/logs/delete.html:36
|
||||
msgid "Confirm"
|
||||
msgstr "Confirmer"
|
||||
|
||||
#: templates/logs/index.html:29 templates/logs/stats_general.html:29
|
||||
#: templates/logs/stats_logs.html:29 templates/logs/stats_models.html:29
|
||||
#: templates/logs/stats_users.html:29
|
||||
msgid "Statistics"
|
||||
msgstr "Statistiques"
|
||||
|
||||
#: templates/logs/index.html:32 templates/logs/stats_logs.html:32 views.py:403
|
||||
msgid "Actions performed"
|
||||
msgstr "Actions effectuées"
|
||||
|
||||
#: templates/logs/sidebar.html:33
|
||||
msgid "Summary"
|
||||
msgstr "Résumé"
|
||||
|
||||
#: templates/logs/sidebar.html:37
|
||||
msgid "Events"
|
||||
msgstr "Évènements"
|
||||
|
||||
#: templates/logs/sidebar.html:41
|
||||
msgid "General"
|
||||
msgstr "Général"
|
||||
|
||||
#: templates/logs/sidebar.html:45
|
||||
msgid "Database"
|
||||
msgstr "Base de données"
|
||||
|
||||
#: templates/logs/sidebar.html:49
|
||||
msgid "Wiring actions"
|
||||
msgstr "Actions de câblage"
|
||||
|
||||
#: templates/logs/sidebar.html:53 views.py:325
|
||||
msgid "Users"
|
||||
msgstr "Utilisateurs"
|
||||
|
||||
#: templates/logs/stats_general.html:32
|
||||
msgid "General statistics"
|
||||
msgstr "Statistiques générales"
|
||||
|
||||
#: templates/logs/stats_models.html:32
|
||||
msgid "Database statistics"
|
||||
msgstr "Statistiques sur la base de données"
|
||||
|
||||
#: templates/logs/stats_users.html:32
|
||||
msgid "Statistics about users"
|
||||
msgstr "Statistiques sur les utilisateurs"
|
||||
|
||||
#: views.py:191
|
||||
msgid "Nonexistent revision."
|
||||
msgstr "Révision inexistante."
|
||||
|
||||
#: views.py:194
|
||||
msgid "The action was deleted."
|
||||
msgstr "L'action a été supprimée."
|
||||
|
||||
#: views.py:227
|
||||
msgid "Category"
|
||||
msgstr "Catégorie"
|
||||
|
||||
#: views.py:228
|
||||
msgid "Number of users (members and clubs)"
|
||||
msgstr "Nombre d'utilisateurs (adhérents et clubs)"
|
||||
|
||||
#: views.py:229
|
||||
msgid "Number of members"
|
||||
msgstr "Nombre d'adhérents"
|
||||
|
||||
#: views.py:230
|
||||
msgid "Number of clubs"
|
||||
msgstr "Nombre de clubs"
|
||||
|
||||
#: views.py:234
|
||||
msgid "Activated users"
|
||||
msgstr "Utilisateurs activés"
|
||||
|
||||
#: views.py:242
|
||||
msgid "Disabled users"
|
||||
msgstr "Utilisateurs désactivés"
|
||||
|
||||
#: views.py:250
|
||||
msgid "Archived users"
|
||||
msgstr "Utilisateurs archivés"
|
||||
|
||||
#: views.py:258
|
||||
msgid "Contributing members"
|
||||
msgstr "Adhérents cotisants"
|
||||
|
||||
#: views.py:264
|
||||
msgid "Users benefiting from a connection"
|
||||
msgstr "Utilisateurs bénéficiant d'une connexion"
|
||||
|
||||
#: views.py:270
|
||||
msgid "Banned users"
|
||||
msgstr "Utilisateurs bannis"
|
||||
|
||||
#: views.py:276
|
||||
msgid "Users benefiting from a free connection"
|
||||
msgstr "Utilisateurs bénéficiant d'une connexion gratuite"
|
||||
|
||||
#: views.py:282
|
||||
msgid "Active interfaces (with access to the network)"
|
||||
msgstr "Interfaces actives (ayant accès au réseau)"
|
||||
|
||||
#: views.py:292
|
||||
msgid "Active interfaces assigned IPv4"
|
||||
msgstr "Interfaces actives assignées IPv4"
|
||||
|
||||
#: views.py:305
|
||||
msgid "IP range"
|
||||
msgstr "Plage d'IP"
|
||||
|
||||
#: views.py:306
|
||||
msgid "VLAN"
|
||||
msgstr "VLAN"
|
||||
|
||||
#: views.py:307
|
||||
msgid "Total number of IP addresses"
|
||||
msgstr "Nombre total d'adresses IP"
|
||||
|
||||
#: views.py:308
|
||||
msgid "Number of assigned IP addresses"
|
||||
msgstr "Nombre d'adresses IP non assignées"
|
||||
|
||||
#: views.py:309
|
||||
msgid "Number of IP address assigned to an activated machine"
|
||||
msgstr "Nombre d'adresses IP assignées à une machine activée"
|
||||
|
||||
#: views.py:310
|
||||
msgid "Number of nonassigned IP addresses"
|
||||
msgstr "Nombre d'adresses IP non assignées"
|
||||
|
||||
#: views.py:337
|
||||
msgid "Subscriptions"
|
||||
msgstr "Cotisations"
|
||||
|
||||
#: views.py:359 views.py:420
|
||||
msgid "Machines"
|
||||
msgstr "Machines"
|
||||
|
||||
#: views.py:386
|
||||
msgid "Topology"
|
||||
msgstr "Topologie"
|
||||
|
||||
#: views.py:405
|
||||
msgid "Number of actions"
|
||||
msgstr "Nombre d'actions"
|
||||
|
||||
#: views.py:419 views.py:437 views.py:442 views.py:447 views.py:462
|
||||
msgid "User"
|
||||
msgstr "Utilisateur"
|
||||
|
||||
#: views.py:423
|
||||
msgid "Invoice"
|
||||
msgstr "Facture"
|
||||
|
||||
#: views.py:426
|
||||
msgid "Ban"
|
||||
msgstr "Bannissement"
|
||||
|
||||
#: views.py:429
|
||||
msgid "Whitelist"
|
||||
msgstr "Accès gracieux"
|
||||
|
||||
#: views.py:432
|
||||
msgid "Rights"
|
||||
msgstr "Droits"
|
||||
|
||||
#: views.py:436
|
||||
msgid "School"
|
||||
msgstr "Établissement"
|
||||
|
||||
#: views.py:441
|
||||
msgid "Payment method"
|
||||
msgstr "Moyen de paiement"
|
||||
|
||||
#: views.py:446
|
||||
msgid "Bank"
|
||||
msgstr "Banque"
|
||||
|
||||
#: views.py:463
|
||||
msgid "Action"
|
||||
msgstr "Action"
|
||||
|
||||
#: views.py:494
|
||||
msgid "No model found."
|
||||
msgstr "Aucun modèle trouvé."
|
||||
|
||||
#: views.py:500
|
||||
msgid "Nonexistent entry."
|
||||
msgstr "Entrée inexistante."
|
||||
|
||||
#: views.py:507
|
||||
msgid "You don't have the right to access this menu."
|
||||
msgstr "Vous n'avez pas le droit d'accéder à ce menu."
|
|
@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
{% endcomment %}
|
||||
|
||||
{% for stats in stats_list %}
|
||||
{% for stats in stats_list %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -32,11 +32,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</tr>
|
||||
</thead>
|
||||
{% for key, stat in stats.1.items %}
|
||||
<tr>
|
||||
{% for item in stat %}
|
||||
<td>{{ item }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
{% for item in stat %}
|
||||
<td>{{ item }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
@ -28,39 +28,43 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load logs_extra %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Edited object" %}</th>
|
||||
<th>{% trans "Object type" %}</th>
|
||||
{% trans "Edited by" as tr_edited_by %}
|
||||
<th>{% include "buttons/sort.html" with prefix='logs' col='author' text=tr_edited_by %}</th>
|
||||
{% trans "Date of editing" as tr_date_of_editing %}
|
||||
<th>{% include "buttons/sort.html" with prefix='logs' col='date' text=tr_date_of_editing %}</th>
|
||||
<th>{% trans "Comment" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for revision in revisions_list %}
|
||||
{% for reversion in revision.version_set.all %}
|
||||
<tr>
|
||||
<th>Objet modifié</th>
|
||||
<th>Type de l'objet</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='logs' col='author' text='Modification par' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='logs' col='date' text='Date de modification' %}</th>
|
||||
<th>Commentaire</th>
|
||||
<th></th>
|
||||
<td>{{ reversion.object|truncatechars:20 }}</td>
|
||||
<td>{{ reversion.object|classname }}</td>
|
||||
<td>{{ revision.user }}</td>
|
||||
<td>{{ revision.date_created }}</td>
|
||||
<td>{{ revision.comment }}</td>
|
||||
{% can_edit_history %}
|
||||
<td>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}">
|
||||
<i class="fa fa-times"></i>
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</td>
|
||||
{% acl_end %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% for revision in revisions_list %}
|
||||
{% for reversion in revision.version_set.all %}
|
||||
<tr>
|
||||
<td>{{ reversion.object|truncatechars:20 }}</td>
|
||||
<td>{{ reversion.object|classname }}</td>
|
||||
<td>{{ revision.user }}</td>
|
||||
<td>{{ revision.date_created }}</td>
|
||||
<td>{{ revision.comment }}</td>
|
||||
{% can_edit_history %}
|
||||
<td>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}">
|
||||
<i class="fa fa-times"></i>
|
||||
Annuler
|
||||
</a>
|
||||
</td>
|
||||
{% acl_end %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if revisions_list.paginator %}
|
||||
{% include "pagination.html" with list=revisions_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -22,20 +22,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
{% endcomment %}
|
||||
|
||||
{% for key, stats in stats_list.items %}
|
||||
{% load i18n %}
|
||||
|
||||
{% for key, stats in stats_list.items %}
|
||||
<table class="table table-striped">
|
||||
<h4>Statistiques de l'ensemble {{ key }}</h4>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type d'objet</th>
|
||||
<th>Nombre d'entrée stockées</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for key, stat in stats.items %}
|
||||
<tr>
|
||||
<td>{{ stat.0 }}</td>
|
||||
<td>{{ stat.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<h4>{% blocktrans %}Statistics of the set {{ key }}{% endblocktrans %}</h4>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Object type" %}</th>
|
||||
<th>{% trans "Number of stored entries" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for key, stat in stats.items %}
|
||||
<tr>
|
||||
<td>{{ stat.0 }}</td>
|
||||
<td>{{ stat.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
@ -22,24 +22,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
{% endcomment %}
|
||||
|
||||
{% for key_dict, stats_dict in stats_list.items %}
|
||||
{% load i18n %}
|
||||
|
||||
{% for key_dict, stats_dict in stats_list.items %}
|
||||
{% for key, stats in stats_dict.items %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<h4>Statistiques par {{ key_dict }} de {{ key }}</h4>
|
||||
<tr>
|
||||
<th>{{ key_dict }}</th>
|
||||
<th>Nombre de {{ key }} par {{ key_dict }}</th>
|
||||
<th>Rang</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for stat in stats %}
|
||||
<tr>
|
||||
<td>{{ stat|truncatechars:25 }}</td>
|
||||
<td>{{ stat.num }}</td>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<h4>{% blocktrans %}Statistics per {{ key_dict }} of {{ key }}{% endblocktrans %}</h4>
|
||||
<tr>
|
||||
<th>{{ key_dict }}</th>
|
||||
<th>{% blocktrans %}Number of {{ key }} per {{ key_dict }}{% endblocktrans %}</th>
|
||||
<th>{% trans "Rank" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for stat in stats %}
|
||||
<tr>
|
||||
<td>{{ stat|truncatechars:25 }}</td>
|
||||
<td>{{ stat.num }}</td>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
@ -28,122 +28,127 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load logs_extra %}
|
||||
{% load acl %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='sum' col='date' text='Date' %}</th>
|
||||
<th>Modification</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
{% trans "Date" as tr_date %}
|
||||
<th>{% include "buttons/sort.html" with prefix='sum' col='date' text=tr_date %}</th>
|
||||
<th>{% trans "Editing" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for v in versions_list %}
|
||||
{% if v.version.content_type.model == 'ban' %}
|
||||
<tr class="danger">
|
||||
<td>{{ v.datetime }}</td>
|
||||
<td>
|
||||
{{ v.username }} a banni
|
||||
{% blocktrans with username=v.username %}{{ username }} has banned{% endblocktrans %}
|
||||
<a href="{% url 'users:profil' v.version.object.user_id %}">{{ v.version.object.user.get_username }}</a>
|
||||
(<i>
|
||||
(<i>
|
||||
{% if v.version.object.raison == '' %}
|
||||
Aucune raison
|
||||
{% trans "No reason" %}
|
||||
{% else %}
|
||||
{{ v.version.object.raison }}
|
||||
{% endif %}
|
||||
</i>)
|
||||
</td>
|
||||
{% can_edit_history %}
|
||||
{% can_edit_history %}
|
||||
<td>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
|
||||
<i class="fa fa-times"></i>
|
||||
Annuler
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</td>
|
||||
{% acl_end %}
|
||||
{% acl_end %}
|
||||
</tr>
|
||||
{% elif v.version.content_type.model == 'whitelist' %}
|
||||
<tr class="success">
|
||||
<td>{{ v.datetime }}</td>
|
||||
<td>
|
||||
{{ v.username }} a autorisé gracieusement
|
||||
{% blocktrans with username=v.username %}{{ username }} has graciously authorised{% endblocktrans %}
|
||||
<a href="{% url 'users:profil' v.version.object.user_id %}">{{ v.version.object.user.get_username }}</a>
|
||||
(<i>
|
||||
{% if v.version.object.raison == '' %}
|
||||
Aucune raison
|
||||
{% trans "No reason" %}
|
||||
{% else %}
|
||||
{{ v.version.object.raison }}
|
||||
{% endif %}
|
||||
</i>)
|
||||
</td>
|
||||
{% can_edit_history%}
|
||||
{% can_edit_history%}
|
||||
<td>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
|
||||
<i class="fa fa-times"></i>
|
||||
Annuler
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</td>
|
||||
{% acl_end %}
|
||||
{% acl_end %}
|
||||
</tr>
|
||||
{% elif v.version.content_type.model == 'user' %}
|
||||
<tr>
|
||||
<td>{{ v.datetime }}</td>
|
||||
<td>
|
||||
{{ v.username }} a mis à jour
|
||||
{% blocktrans with username=v.username %}{{ username }} has updated{% endblocktrans %}
|
||||
<a href="{% url 'users:profil' v.version.object.id %}">{{ v.version.object.get_username }}</a>
|
||||
{% if v.comment != '' %}
|
||||
(<i>{{ v.comment }}</i>)
|
||||
{% endif %}
|
||||
{% if v.comment != '' %}
|
||||
(<i>{{ v.comment }}</i>)
|
||||
{% endif %}
|
||||
</td>
|
||||
{% can_edit_history %}
|
||||
{% can_edit_history %}
|
||||
<td>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
|
||||
<i class="fa fa-times"></i>
|
||||
Annuler
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</td>
|
||||
{% acl_end %}
|
||||
{% acl_end %}
|
||||
</tr>
|
||||
{% elif v.version.content_type.model == 'vente' %}
|
||||
<tr>
|
||||
<td>{{ v.datetime }}</td>
|
||||
<td>
|
||||
{{ v.username }} a vendu {{ v.version.object.number }}x {{ v.version.object.name }} à
|
||||
{% blocktrans with username=v.username number=v.version.object.number name=v.version.object.name %}{{ username }} has sold {{ number }}x {{ name }} to{% endblocktrans %}
|
||||
<a href="{% url 'users:profil' v.version.object.facture.user_id %}">{{ v.version.object.facture.user.get_username }}</a>
|
||||
{% if v.version.object.iscotisation %}
|
||||
(<i>+{{ v.version.object.duration }} mois</i>)
|
||||
{% endif %}
|
||||
{% if v.version.object.iscotisation %}
|
||||
(<i>{% blocktrans with duration=v.version.object.duration %}+{{ duration }} months{% endblocktrans %}</i>)
|
||||
{% endif %}
|
||||
</td>
|
||||
{% can_edit_history %}
|
||||
{% can_edit_history %}
|
||||
<td>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
|
||||
<i class="fa fa-times"></i>
|
||||
Annuler
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</td>
|
||||
{% acl_end %}
|
||||
{% acl_end %}
|
||||
</tr>
|
||||
{% elif v.version.content_type.model == 'interface' %}
|
||||
<tr>
|
||||
<td>{{ v.datetime }}</td>
|
||||
<td>
|
||||
{{ v.username }} a modifié une interface de
|
||||
{% blocktrans with username=v.username %}{{ username }} has edited an interface of{% endblocktrans %}
|
||||
<a href="{% url 'users:profil' v.version.object.machine.user_id %}">{{ v.version.object.machine.user.get_username }}</a>
|
||||
{% if v.comment != '' %}
|
||||
(<i>{{ v.comment }}</i>)
|
||||
{% endif %}
|
||||
{% if v.comment != '' %}
|
||||
(<i>{{ v.comment }}</i>)
|
||||
{% endif %}
|
||||
</td>
|
||||
{% can_edit_history %}
|
||||
{% can_edit_history %}
|
||||
<td>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
|
||||
<i class="fa fa-times"></i>
|
||||
Annuler
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</td>
|
||||
{% acl_end %}
|
||||
{% acl_end %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</table>
|
||||
|
||||
{% if versions_list.paginator %}
|
||||
{% include "pagination.html" with list=versions_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -24,17 +24,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Supression d'action{% endblock %}
|
||||
{% block title %}{% trans "Deletion of actions" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
<h4>Attention, voulez-vous vraiment annuler cette action {{ objet_name }} ( {{ objet }} ) ?</h4>
|
||||
{% bootstrap_button "Confirmer" button_type="submit" icon="trash" %}
|
||||
<h4>{% blocktrans %}Warning: are you sure you want to delete this action {{ objet_name }} ( {{ objet }} )?{% endblocktrans %}</h4>
|
||||
{% trans "Confirm" as tr_confirm %}
|
||||
{% bootstrap_button tr_confirm button_type="submit" icon="trash" %}
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,13 +24,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Statistiques{% endblock %}
|
||||
{% block title %}{%trans "Statistics" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Actions effectuées</h2>
|
||||
{% include "logs/aff_summary.html" with versions_list=versions_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
<h2>{% trans "Actions performed" %}</h2>
|
||||
{% include "logs/aff_summary.html" with versions_list=versions_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,32 +24,34 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% can_view_app logs %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "logs:index" %}">
|
||||
<i class="fa fa-clipboard-list"></i>
|
||||
Résumé
|
||||
{% trans "Summary" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-logs" %}">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
Évènements
|
||||
{% trans "Events" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-general" %}">
|
||||
<i class="fa fa-chart-area"></i>
|
||||
Général
|
||||
{% trans "General" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-models" %}">
|
||||
<i class="fa fa-database"></i>
|
||||
Base de données
|
||||
{% trans "Database" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-actions" %}">
|
||||
<i class="fa fa-plug"></i>
|
||||
Actions de cablage
|
||||
{% trans "Wiring actions" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-users" %}">
|
||||
<i class="fa fa-users"></i>
|
||||
Utilisateurs
|
||||
{% trans "Users" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,13 +24,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Statistiques générales{% endblock %}
|
||||
{% block title %}{% trans "Statistics" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Statistiques générales</h2>
|
||||
{% include "logs/aff_stats_general.html" with stats_list=stats_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
<h2>{% trans "General statistics" %}</h2>
|
||||
{% include "logs/aff_stats_general.html" with stats_list=stats_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,13 +24,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Statistiques{% endblock %}
|
||||
{% block title %}{% trans "Statistics" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Actions effectuées</h2>
|
||||
{% include "logs/aff_stats_logs.html" with revisions_list=revisions_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
<h2>{% trans "Actions performed" %}</h2>
|
||||
{% include "logs/aff_stats_logs.html" with revisions_list=revisions_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,13 +24,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Statistiques des objets base de données{% endblock %}
|
||||
{% block title %}{% trans "Statistics" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Statistiques bdd</h2>
|
||||
{% include "logs/aff_stats_models.html" with stats_list=stats_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
<h2>{% trans "Database statistics" %}</h2>
|
||||
{% include "logs/aff_stats_models.html" with stats_list=stats_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,13 +24,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Statistiques par utilisateur{% endblock %}
|
||||
{% block title %}{% trans "Statistics" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Statistiques par utilisateur</h2>
|
||||
{% include "logs/aff_stats_users.html" with stats_list=stats_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
<h2>{% trans "Statistics about users" %}</h2>
|
||||
{% include "logs/aff_stats_users.html" with stats_list=stats_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
165
logs/views.py
165
logs/views.py
|
@ -188,10 +188,10 @@ def revert_action(request, revision_id):
|
|||
try:
|
||||
revision = Revision.objects.get(id=revision_id)
|
||||
except Revision.DoesNotExist:
|
||||
messages.error(request, u"Revision inexistante")
|
||||
messages.error(request, _("Nonexistent revision."))
|
||||
if request.method == "POST":
|
||||
revision.revert()
|
||||
messages.success(request, "L'action a été supprimée")
|
||||
messages.success(request, _("The action was deleted."))
|
||||
return redirect(reverse('logs:index'))
|
||||
return form({
|
||||
'objet': revision,
|
||||
|
@ -224,14 +224,14 @@ def stats_general(request):
|
|||
stats = [
|
||||
[ # First set of data (about users)
|
||||
[ # Headers
|
||||
"Categorie",
|
||||
"Nombre d'utilisateurs (total club et adhérents)",
|
||||
"Nombre d'adhérents",
|
||||
"Nombre de clubs"
|
||||
_("Category"),
|
||||
_("Number of users (members and clubs)"),
|
||||
_("Number of members"),
|
||||
_("Number of clubs")
|
||||
],
|
||||
{ # Data
|
||||
'active_users': [
|
||||
"Users actifs",
|
||||
_("Activated users"),
|
||||
User.objects.filter(state=User.STATE_ACTIVE).count(),
|
||||
(Adherent.objects
|
||||
.filter(state=Adherent.STATE_ACTIVE)
|
||||
|
@ -239,7 +239,7 @@ def stats_general(request):
|
|||
Club.objects.filter(state=Club.STATE_ACTIVE).count()
|
||||
],
|
||||
'inactive_users': [
|
||||
"Users désactivés",
|
||||
_("Disabled users"),
|
||||
User.objects.filter(state=User.STATE_DISABLED).count(),
|
||||
(Adherent.objects
|
||||
.filter(state=Adherent.STATE_DISABLED)
|
||||
|
@ -247,7 +247,7 @@ def stats_general(request):
|
|||
Club.objects.filter(state=Club.STATE_DISABLED).count()
|
||||
],
|
||||
'archive_users': [
|
||||
"Users archivés",
|
||||
_("Archived users"),
|
||||
User.objects.filter(state=User.STATE_ARCHIVE).count(),
|
||||
(Adherent.objects
|
||||
.filter(state=Adherent.STATE_ARCHIVE)
|
||||
|
@ -255,31 +255,31 @@ def stats_general(request):
|
|||
Club.objects.filter(state=Club.STATE_ARCHIVE).count()
|
||||
],
|
||||
'adherent_users': [
|
||||
"Cotisant à l'association",
|
||||
_("Contributing members"),
|
||||
_all_adherent.count(),
|
||||
_all_adherent.exclude(adherent__isnull=True).count(),
|
||||
_all_adherent.exclude(club__isnull=True).count()
|
||||
],
|
||||
'connexion_users': [
|
||||
"Utilisateurs bénéficiant d'une connexion",
|
||||
_("Users benefiting from a connection"),
|
||||
_all_has_access.count(),
|
||||
_all_has_access.exclude(adherent__isnull=True).count(),
|
||||
_all_has_access.exclude(club__isnull=True).count()
|
||||
],
|
||||
'ban_users': [
|
||||
"Utilisateurs bannis",
|
||||
_("Banned users"),
|
||||
_all_baned.count(),
|
||||
_all_baned.exclude(adherent__isnull=True).count(),
|
||||
_all_baned.exclude(club__isnull=True).count()
|
||||
],
|
||||
'whitelisted_user': [
|
||||
"Utilisateurs bénéficiant d'une connexion gracieuse",
|
||||
_("Users benefiting from a free connection"),
|
||||
_all_whitelisted.count(),
|
||||
_all_whitelisted.exclude(adherent__isnull=True).count(),
|
||||
_all_whitelisted.exclude(club__isnull=True).count()
|
||||
],
|
||||
'actives_interfaces': [
|
||||
"Interfaces actives (ayant accès au reseau)",
|
||||
_("Active interfaces (with access to the network)"),
|
||||
_all_active_interfaces_count.count(),
|
||||
(_all_active_interfaces_count
|
||||
.exclude(machine__user__adherent__isnull=True)
|
||||
|
@ -289,7 +289,7 @@ def stats_general(request):
|
|||
.count())
|
||||
],
|
||||
'actives_assigned_interfaces': [
|
||||
"Interfaces actives et assignées ipv4",
|
||||
_("Active interfaces assigned IPv4"),
|
||||
_all_active_assigned_interfaces_count.count(),
|
||||
(_all_active_assigned_interfaces_count
|
||||
.exclude(machine__user__adherent__isnull=True)
|
||||
|
@ -302,12 +302,12 @@ def stats_general(request):
|
|||
],
|
||||
[ # Second set of data (about ip adresses)
|
||||
[ # Headers
|
||||
"Range d'ip",
|
||||
"Vlan",
|
||||
"Nombre d'ip totales",
|
||||
"Ip assignées",
|
||||
"Ip assignées à une machine active",
|
||||
"Ip non assignées"
|
||||
_("IP range"),
|
||||
_("VLAN"),
|
||||
_("Total number of IP addresses"),
|
||||
_("Number of assigned IP addresses"),
|
||||
_("Number of IP address assigned to an activated machine"),
|
||||
_("Number of nonassigned IP addresses")
|
||||
],
|
||||
ip_dict # Data already prepared
|
||||
]
|
||||
|
@ -322,79 +322,87 @@ def stats_models(request):
|
|||
nombre d'users, d'écoles, de droits, de bannissements,
|
||||
de factures, de ventes, de banque, de machines, etc"""
|
||||
stats = {
|
||||
'Users': {
|
||||
'users': [User.PRETTY_NAME, User.objects.count()],
|
||||
'adherents': [Adherent.PRETTY_NAME, Adherent.objects.count()],
|
||||
'clubs': [Club.PRETTY_NAME, Club.objects.count()],
|
||||
'serviceuser': [ServiceUser.PRETTY_NAME,
|
||||
_("Users"): {
|
||||
'users': [User._meta.verbose_name, User.objects.count()],
|
||||
'adherents': [Adherent._meta.verbose_name, Adherent.objects.count()],
|
||||
'clubs': [Club._meta.verbose_name, Club.objects.count()],
|
||||
'serviceuser': [ServiceUser._meta.verbose_name,
|
||||
ServiceUser.objects.count()],
|
||||
'school': [School.PRETTY_NAME, School.objects.count()],
|
||||
'listright': [ListRight.PRETTY_NAME, ListRight.objects.count()],
|
||||
'listshell': [ListShell.PRETTY_NAME, ListShell.objects.count()],
|
||||
'ban': [Ban.PRETTY_NAME, Ban.objects.count()],
|
||||
'whitelist': [Whitelist.PRETTY_NAME, Whitelist.objects.count()]
|
||||
'school': [School._meta.verbose_name, School.objects.count()],
|
||||
'listright': [ListRight._meta.verbose_name, ListRight.objects.count()],
|
||||
'listshell': [ListShell._meta.verbose_name, ListShell.objects.count()],
|
||||
'ban': [Ban._meta.verbose_name, Ban.objects.count()],
|
||||
'whitelist': [Whitelist._meta.verbose_name, Whitelist.objects.count()]
|
||||
},
|
||||
'Cotisations': {
|
||||
_("Subscriptions"): {
|
||||
'factures': [
|
||||
Facture._meta.verbose_name.title(),
|
||||
Facture._meta.verbose_name,
|
||||
Facture.objects.count()
|
||||
],
|
||||
'vente': [
|
||||
Vente._meta.verbose_name.title(),
|
||||
Vente._meta.verbose_name,
|
||||
Vente.objects.count()
|
||||
],
|
||||
'cotisation': [
|
||||
Cotisation._meta.verbose_name.title(),
|
||||
Cotisation._meta.verbose_name,
|
||||
Cotisation.objects.count()
|
||||
],
|
||||
'article': [
|
||||
Article._meta.verbose_name.title(),
|
||||
Article._meta.verbose_name,
|
||||
Article.objects.count()
|
||||
],
|
||||
'banque': [
|
||||
Banque._meta.verbose_name.title(),
|
||||
Banque._meta.verbose_name,
|
||||
Banque.objects.count()
|
||||
],
|
||||
},
|
||||
'Machines': {
|
||||
'machine': [Machine.PRETTY_NAME, Machine.objects.count()],
|
||||
'typemachine': [MachineType.PRETTY_NAME,
|
||||
_("Machines"): {
|
||||
'machine': [Machine._meta.verbose_name,
|
||||
Machine.objects.count()],
|
||||
'typemachine': [MachineType._meta.verbose_name,
|
||||
MachineType.objects.count()],
|
||||
'typeip': [IpType.PRETTY_NAME, IpType.objects.count()],
|
||||
'extension': [Extension.PRETTY_NAME, Extension.objects.count()],
|
||||
'interface': [Interface.PRETTY_NAME, Interface.objects.count()],
|
||||
'alias': [Domain.PRETTY_NAME,
|
||||
'typeip': [IpType._meta.verbose_name,
|
||||
IpType.objects.count()],
|
||||
'extension': [Extension._meta.verbose_name,
|
||||
Extension.objects.count()],
|
||||
'interface': [Interface._meta.verbose_name,
|
||||
Interface.objects.count()],
|
||||
'alias': [Domain._meta.verbose_name,
|
||||
Domain.objects.exclude(cname=None).count()],
|
||||
'iplist': [IpList.PRETTY_NAME, IpList.objects.count()],
|
||||
'service': [Service.PRETTY_NAME, Service.objects.count()],
|
||||
'iplist': [IpList._meta.verbose_name,
|
||||
IpList.objects.count()],
|
||||
'service': [Service._meta.verbose_name,
|
||||
Service.objects.count()],
|
||||
'ouvertureportlist': [
|
||||
OuverturePortList.PRETTY_NAME,
|
||||
OuverturePortList._meta.verbose_name,
|
||||
OuverturePortList.objects.count()
|
||||
],
|
||||
'vlan': [Vlan.PRETTY_NAME, Vlan.objects.count()],
|
||||
'SOA': [SOA.PRETTY_NAME, SOA.objects.count()],
|
||||
'Mx': [Mx.PRETTY_NAME, Mx.objects.count()],
|
||||
'Ns': [Ns.PRETTY_NAME, Ns.objects.count()],
|
||||
'nas': [Nas.PRETTY_NAME, Nas.objects.count()],
|
||||
'vlan': [Vlan._meta.verbose_name, Vlan.objects.count()],
|
||||
'SOA': [SOA._meta.verbose_name, SOA.objects.count()],
|
||||
'Mx': [Mx._meta.verbose_name, Mx.objects.count()],
|
||||
'Ns': [Ns._meta.verbose_name, Ns.objects.count()],
|
||||
'nas': [Nas._meta.verbose_name, Nas.objects.count()],
|
||||
},
|
||||
'Topologie': {
|
||||
'switch': [Switch.PRETTY_NAME, Switch.objects.count()],
|
||||
'bornes': [AccessPoint.PRETTY_NAME, AccessPoint.objects.count()],
|
||||
'port': [Port.PRETTY_NAME, Port.objects.count()],
|
||||
'chambre': [Room.PRETTY_NAME, Room.objects.count()],
|
||||
'stack': [Stack.PRETTY_NAME, Stack.objects.count()],
|
||||
_("Topology"): {
|
||||
'switch': [Switch._meta.verbose_name,
|
||||
Switch.objects.count()],
|
||||
'bornes': [AccessPoint._meta.verbose_name,
|
||||
AccessPoint.objects.count()],
|
||||
'port': [Port._meta.verbose_name, Port.objects.count()],
|
||||
'chambre': [Room._meta.verbose_name, Room.objects.count()],
|
||||
'stack': [Stack._meta.verbose_name, Stack.objects.count()],
|
||||
'modelswitch': [
|
||||
ModelSwitch.PRETTY_NAME,
|
||||
ModelSwitch._meta.verbose_name,
|
||||
ModelSwitch.objects.count()
|
||||
],
|
||||
'constructorswitch': [
|
||||
ConstructorSwitch.PRETTY_NAME,
|
||||
ConstructorSwitch._meta.verbose_name,
|
||||
ConstructorSwitch.objects.count()
|
||||
],
|
||||
},
|
||||
'Actions effectuées sur la base':
|
||||
_("Actions performed"):
|
||||
{
|
||||
'revision': ["Nombre d'actions", Revision.objects.count()],
|
||||
'revision': [_("Number of actions"), Revision.objects.count()],
|
||||
},
|
||||
}
|
||||
return render(request, 'logs/stats_models.html', {'stats_list': stats})
|
||||
|
@ -408,35 +416,35 @@ def stats_users(request):
|
|||
de moyens de paiements par user, de banque par user,
|
||||
de bannissement par user, etc"""
|
||||
stats = {
|
||||
'Utilisateur': {
|
||||
'Machines': User.objects.annotate(
|
||||
_("User"): {
|
||||
_("Machines"): User.objects.annotate(
|
||||
num=Count('machine')
|
||||
).order_by('-num')[:10],
|
||||
'Facture': User.objects.annotate(
|
||||
_("Invoice"): User.objects.annotate(
|
||||
num=Count('facture')
|
||||
).order_by('-num')[:10],
|
||||
'Bannissement': User.objects.annotate(
|
||||
_("Ban"): User.objects.annotate(
|
||||
num=Count('ban')
|
||||
).order_by('-num')[:10],
|
||||
'Accès gracieux': User.objects.annotate(
|
||||
_("Whitelist"): User.objects.annotate(
|
||||
num=Count('whitelist')
|
||||
).order_by('-num')[:10],
|
||||
'Droits': User.objects.annotate(
|
||||
_("Rights"): User.objects.annotate(
|
||||
num=Count('groups')
|
||||
).order_by('-num')[:10],
|
||||
},
|
||||
'Etablissement': {
|
||||
'Utilisateur': School.objects.annotate(
|
||||
_("School"): {
|
||||
_("User"): School.objects.annotate(
|
||||
num=Count('user')
|
||||
).order_by('-num')[:10],
|
||||
},
|
||||
'Moyen de paiement': {
|
||||
'Utilisateur': Paiement.objects.annotate(
|
||||
_("Payment method"): {
|
||||
_("User"): Paiement.objects.annotate(
|
||||
num=Count('facture')
|
||||
).order_by('-num')[:10],
|
||||
},
|
||||
'Banque': {
|
||||
'Utilisateur': Banque.objects.annotate(
|
||||
_("Bank"): {
|
||||
_("User"): Banque.objects.annotate(
|
||||
num=Count('facture')
|
||||
).order_by('-num')[:10],
|
||||
},
|
||||
|
@ -451,8 +459,8 @@ def stats_actions(request):
|
|||
utilisateurs.
|
||||
Affiche le nombre de modifications aggrégées par utilisateurs"""
|
||||
stats = {
|
||||
'Utilisateur': {
|
||||
'Action': User.objects.annotate(
|
||||
_("User"): {
|
||||
_("Action"): User.objects.annotate(
|
||||
num=Count('revision')
|
||||
).order_by('-num')[:40],
|
||||
},
|
||||
|
@ -489,14 +497,14 @@ def history(request, application, object_name, object_id):
|
|||
try:
|
||||
instance = model.get_instance(**kwargs)
|
||||
except model.DoesNotExist:
|
||||
messages.error(request, _("No entry found."))
|
||||
messages.error(request, _("Nonexistent entry."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
))
|
||||
can, msg = instance.can_view(request.user)
|
||||
if not can:
|
||||
messages.error(request, msg or _("You cannot acces to this menu"))
|
||||
messages.error(request, msg or _("You don't have the right to access this menu."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
|
@ -513,3 +521,4 @@ def history(request, application, object_name, object_id):
|
|||
're2o/history.html',
|
||||
{'reversions': reversions, 'object': instance}
|
||||
)
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
Here are defined some functions to check acl on the application.
|
||||
"""
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
|
||||
def can_view(user):
|
||||
|
@ -38,4 +39,6 @@ def can_view(user):
|
|||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
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
|
|||
|
||||
from django.forms import ModelForm, Form
|
||||
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.mixins import FormRevMixin
|
||||
|
@ -75,7 +75,7 @@ class EditMachineForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
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):
|
||||
|
@ -94,12 +94,11 @@ class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
|
|||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
user = kwargs.get('user')
|
||||
super(EditInterfaceForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||
self.fields['mac_address'].label = 'Adresse mac'
|
||||
self.fields['type'].label = 'Type de machine'
|
||||
self.fields['type'].empty_label = "Séléctionner un type de machine"
|
||||
self.fields['mac_address'].label = _("MAC address")
|
||||
self.fields['type'].label = _("Machine type")
|
||||
self.fields['type'].empty_label = _("Select a machine type")
|
||||
if "ipv4" in self.fields:
|
||||
self.fields['ipv4'].empty_label = ("Assignation automatique de "
|
||||
"l'ipv4")
|
||||
self.fields['ipv4'].empty_label = _("Automatic IPv4 assignment")
|
||||
self.fields['ipv4'].queryset = IpList.objects.filter(
|
||||
interface__isnull=True
|
||||
)
|
||||
|
@ -170,7 +169,7 @@ class DelAliasForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs objets alias"""
|
||||
alias = forms.ModelMultipleChoiceField(
|
||||
queryset=Domain.objects.all(),
|
||||
label="Alias actuels",
|
||||
label=_("Current aliases"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -191,15 +190,15 @@ class MachineTypeForm(FormRevMixin, ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
super(MachineTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||
self.fields['type'].label = 'Type de machine à ajouter'
|
||||
self.fields['ip_type'].label = "Type d'ip relié"
|
||||
self.fields['type'].label = _("Machine type to add")
|
||||
self.fields['ip_type'].label = _("Related IP type")
|
||||
|
||||
|
||||
class DelMachineTypeForm(FormRevMixin, Form):
|
||||
"""Suppression d'un ou plusieurs machinetype"""
|
||||
machinetypes = forms.ModelMultipleChoiceField(
|
||||
queryset=MachineType.objects.none(),
|
||||
label="Types de machines actuelles",
|
||||
label=_("Current machine types"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -222,7 +221,7 @@ class IpTypeForm(FormRevMixin, ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
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):
|
||||
|
@ -239,7 +238,7 @@ class DelIpTypeForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs iptype"""
|
||||
iptypes = forms.ModelMultipleChoiceField(
|
||||
queryset=IpType.objects.none(),
|
||||
label="Types d'ip actuelles",
|
||||
label=_("Current IP types"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -261,17 +260,17 @@ class ExtensionForm(FormRevMixin, ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
super(ExtensionForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||
self.fields['name'].label = 'Extension à ajouter'
|
||||
self.fields['origin'].label = 'Enregistrement A origin'
|
||||
self.fields['origin_v6'].label = 'Enregistrement AAAA origin'
|
||||
self.fields['soa'].label = 'En-tête SOA à utiliser'
|
||||
self.fields['name'].label = _("Extension to add")
|
||||
self.fields['origin'].label = _("A record origin")
|
||||
self.fields['origin_v6'].label = _("AAAA record origin")
|
||||
self.fields['soa'].label = _("SOA record to use")
|
||||
|
||||
|
||||
class DelExtensionForm(FormRevMixin, Form):
|
||||
"""Suppression d'une ou plusieurs extensions"""
|
||||
extensions = forms.ModelMultipleChoiceField(
|
||||
queryset=Extension.objects.none(),
|
||||
label="Extensions actuelles",
|
||||
label=_("Current extensions"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -310,7 +309,7 @@ class DelSOAForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs SOA"""
|
||||
soa = forms.ModelMultipleChoiceField(
|
||||
queryset=SOA.objects.none(),
|
||||
label="SOA actuels",
|
||||
label=_("Current SOA records"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -341,7 +340,7 @@ class DelMxForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs MX"""
|
||||
mx = forms.ModelMultipleChoiceField(
|
||||
queryset=Mx.objects.none(),
|
||||
label="MX actuels",
|
||||
label=_("Current MX records"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -374,7 +373,7 @@ class DelNsForm(FormRevMixin, Form):
|
|||
"""Suppresion d'un ou plusieurs NS"""
|
||||
ns = forms.ModelMultipleChoiceField(
|
||||
queryset=Ns.objects.none(),
|
||||
label="Enregistrements NS actuels",
|
||||
label=_("Current NS records"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -402,7 +401,7 @@ class DelTxtForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs TXT"""
|
||||
txt = forms.ModelMultipleChoiceField(
|
||||
queryset=Txt.objects.none(),
|
||||
label="Enregistrements Txt actuels",
|
||||
label=_("Current TXT records"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -430,7 +429,7 @@ class DelDNameForm(FormRevMixin, Form):
|
|||
"""Delete a set of DNAME entries"""
|
||||
dnames = forms.ModelMultipleChoiceField(
|
||||
queryset=Txt.objects.none(),
|
||||
label="Existing DNAME entries",
|
||||
label=_("Current DNAME records"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -458,7 +457,7 @@ class DelSrvForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs Srv"""
|
||||
srv = forms.ModelMultipleChoiceField(
|
||||
queryset=Srv.objects.none(),
|
||||
label="Enregistrements Srv actuels",
|
||||
label=_("Current SRV records"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -487,7 +486,7 @@ class DelNasForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs nas"""
|
||||
nas = forms.ModelMultipleChoiceField(
|
||||
queryset=Nas.objects.none(),
|
||||
label="Enregistrements Nas actuels",
|
||||
label=_("Current NAS devices"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -519,7 +518,7 @@ class DelRoleForm(FormRevMixin, Form):
|
|||
"""Deletion of one or several roles."""
|
||||
role = forms.ModelMultipleChoiceField(
|
||||
queryset=Role.objects.none(),
|
||||
label=_l("Current roles"),
|
||||
label=_("Current roles"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -560,7 +559,7 @@ class DelServiceForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs service"""
|
||||
service = forms.ModelMultipleChoiceField(
|
||||
queryset=Service.objects.none(),
|
||||
label="Services actuels",
|
||||
label=_("Current services"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -588,7 +587,7 @@ class DelVlanForm(FormRevMixin, Form):
|
|||
"""Suppression d'un ou plusieurs vlans"""
|
||||
vlan = forms.ModelMultipleChoiceField(
|
||||
queryset=Vlan.objects.none(),
|
||||
label="Vlan actuels",
|
||||
label=_("Current VLANs"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -646,3 +645,4 @@ class SshFpForm(FormRevMixin, ModelForm):
|
|||
prefix=prefix,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
|
BIN
machines/locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
machines/locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
1748
machines/locale/fr/LC_MESSAGES/django.po
Normal file
1748
machines/locale/fr/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load diff
221
machines/migrations/0094_auto_20180815_1918.py
Normal file
221
machines/migrations/0094_auto_20180815_1918.py
Normal file
|
@ -0,0 +1,221 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2018-08-15 17:18
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('machines', '0093_auto_20180807_1115'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='dname',
|
||||
options={'permissions': (('view_dname', 'Can view a DNAME record object'),), 'verbose_name': 'DNAME record', 'verbose_name_plural': 'DNAME records'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='domain',
|
||||
options={'permissions': (('view_domain', 'Can view a domain object'),), 'verbose_name': 'domain', 'verbose_name_plural': 'domains'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='extension',
|
||||
options={'permissions': (('view_extension', 'Can view an extension object'), ('use_all_extension', 'Can use all extensions')), 'verbose_name': 'DNS extension', 'verbose_name_plural': 'DNS extensions'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='interface',
|
||||
options={'permissions': (('view_interface', 'Can view an interface object'), ('change_interface_machine', 'Can change the owner of an interface')), 'verbose_name': 'interface', 'verbose_name_plural': 'interfaces'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='iplist',
|
||||
options={'permissions': (('view_iplist', 'Can view an IPv4 addresses list object'),), 'verbose_name': 'IPv4 addresses list', 'verbose_name_plural': 'IPv4 addresses lists'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='iptype',
|
||||
options={'permissions': (('view_iptype', 'Can view an IP type object'), ('use_all_iptype', 'Can use all IP types')), 'verbose_name': 'IP type', 'verbose_name_plural': 'IP types'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='ipv6list',
|
||||
options={'permissions': (('view_ipv6list', 'Can view an IPv6 addresses list object'), ('change_ipv6list_slaac_ip', 'Can change the SLAAC value of an IPv6 addresses list')), 'verbose_name': 'IPv6 addresses list', 'verbose_name_plural': 'IPv6 addresses lists'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='machine',
|
||||
options={'permissions': (('view_machine', 'Can view a machine object'), ('change_machine_user', 'Can change the user of a machine')), 'verbose_name': 'machine', 'verbose_name_plural': 'machines'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='machinetype',
|
||||
options={'permissions': (('view_machinetype', 'Can view a machine type object'), ('use_all_machinetype', 'Can use all machine types')), 'verbose_name': 'machine type', 'verbose_name_plural': 'machine types'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='mx',
|
||||
options={'permissions': (('view_mx', 'Can view an MX record object'),), 'verbose_name': 'MX record', 'verbose_name_plural': 'MX records'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='nas',
|
||||
options={'permissions': (('view_nas', 'Can view a NAS device object'),), 'verbose_name': 'NAS device', 'verbose_name_plural': 'NAS devices'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='ns',
|
||||
options={'permissions': (('view_ns', 'Can view an NS record object'),), 'verbose_name': 'NS record', 'verbose_name_plural': 'NS records'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='ouvertureport',
|
||||
options={'verbose_name': 'ports openings'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='ouvertureportlist',
|
||||
options={'permissions': (('view_ouvertureportlist', 'Can view a ports opening list object'),), 'verbose_name': 'ports opening list', 'verbose_name_plural': 'ports opening lists'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='role',
|
||||
options={'permissions': (('view_role', 'Can view a role object'),), 'verbose_name': 'server role', 'verbose_name_plural': 'server roles'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='service',
|
||||
options={'permissions': (('view_service', 'Can view a service object'),), 'verbose_name': 'service to generate (DHCP, DNS, ...)', 'verbose_name_plural': 'services to generate (DHCP, DNS, ...)'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='service_link',
|
||||
options={'permissions': (('view_service_link', 'Can view a service server link object'),), 'verbose_name': 'link between service and server', 'verbose_name_plural': 'links between service and server'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='soa',
|
||||
options={'permissions': (('view_soa', 'Can view an SOA record object'),), 'verbose_name': 'SOA record', 'verbose_name_plural': 'SOA records'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='srv',
|
||||
options={'permissions': (('view_srv', 'Can view an SRV record object'),), 'verbose_name': 'SRV record', 'verbose_name_plural': 'SRV records'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sshfp',
|
||||
options={'permissions': (('view_sshfp', 'Can view an SSHFP record object'),), 'verbose_name': 'SSHFP record', 'verbose_name_plural': 'SSHFP records'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='txt',
|
||||
options={'permissions': (('view_txt', 'Can view a TXT record object'),), 'verbose_name': 'TXT record', 'verbose_name_plural': 'TXT records'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='vlan',
|
||||
options={'permissions': (('view_vlan', 'Can view a VLAN object'),), 'verbose_name': 'VLAN', 'verbose_name_plural': 'VLANs'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='domain',
|
||||
name='name',
|
||||
field=models.CharField(help_text='Mandatory and unique, must not contain dots.', max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='extension',
|
||||
name='name',
|
||||
field=models.CharField(help_text='Zone name, must begin with a dot (.example.org)', max_length=255, unique=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='extension',
|
||||
name='origin',
|
||||
field=models.ForeignKey(blank=True, help_text='A record associated with the zone', null=True, on_delete=django.db.models.deletion.PROTECT, to='machines.IpList'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='extension',
|
||||
name='origin_v6',
|
||||
field=models.GenericIPAddressField(blank=True, help_text='AAAA record associated with the zone', null=True, protocol='IPv6'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='iptype',
|
||||
name='domaine_ip_netmask',
|
||||
field=models.IntegerField(default=24, help_text="Netmask for the domain's IPv4 range", validators=[django.core.validators.MaxValueValidator(31), django.core.validators.MinValueValidator(8)]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='iptype',
|
||||
name='domaine_ip_network',
|
||||
field=models.GenericIPAddressField(blank=True, help_text="Network containing the domain's IPv4 range (optional)", null=True, protocol='IPv4'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='iptype',
|
||||
name='reverse_v4',
|
||||
field=models.BooleanField(default=False, help_text='Enable reverse DNS for IPv4'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='iptype',
|
||||
name='reverse_v6',
|
||||
field=models.BooleanField(default=False, help_text='Enable reverse DNS for IPv6'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='machine',
|
||||
name='name',
|
||||
field=models.CharField(blank=True, help_text='Optional', max_length=255, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='ouvertureportlist',
|
||||
name='name',
|
||||
field=models.CharField(help_text='Name of the ports configuration', max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='role',
|
||||
name='specific_role',
|
||||
field=models.CharField(blank=True, choices=[('dhcp-server', 'DHCP server'), ('switch-conf-server', 'Switches configuration server'), ('dns-recursif-server', 'Recursive DNS server'), ('ntp-server', 'NTP server'), ('radius-server', 'RADIUS server'), ('log-server', 'Log server'), ('ldap-master-server', 'LDAP master server'), ('ldap-backup-server', 'LDAP backup server'), ('smtp-server', 'SMTP server'), ('postgresql-server', 'postgreSQL server'), ('mysql-server', 'mySQL server'), ('sql-client', 'SQL client'), ('gateway', 'Gateway')], max_length=32, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='service',
|
||||
name='min_time_regen',
|
||||
field=models.DurationField(default=datetime.timedelta(0, 60), help_text='Minimal time before regeneration of the service.'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='service',
|
||||
name='regular_time_regen',
|
||||
field=models.DurationField(default=datetime.timedelta(0, 3600), help_text='Maximal time before regeneration of the service.'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='soa',
|
||||
name='expire',
|
||||
field=models.PositiveIntegerField(default=3600000, help_text='Seconds before the secondary DNS stop answering requests in case of primary DNS timeout'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='soa',
|
||||
name='mail',
|
||||
field=models.EmailField(help_text='Contact email address for the zone', max_length=254),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='soa',
|
||||
name='refresh',
|
||||
field=models.PositiveIntegerField(default=86400, help_text='Seconds before the secondary DNS have to ask the primary DNS serial to detect a modification'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='soa',
|
||||
name='retry',
|
||||
field=models.PositiveIntegerField(default=7200, help_text='Seconds before the secondary DNS ask the serial again in case of a primary DNS timeout'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='soa',
|
||||
name='ttl',
|
||||
field=models.PositiveIntegerField(default=172800, help_text='Time to Live'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='srv',
|
||||
name='port',
|
||||
field=models.PositiveIntegerField(help_text='TCP/UDP port', validators=[django.core.validators.MaxValueValidator(65535)]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='srv',
|
||||
name='priority',
|
||||
field=models.PositiveIntegerField(default=0, help_text='Priority of the target server (positive integer value, the lower it is, the more the server will be used if available)', validators=[django.core.validators.MaxValueValidator(65535)]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='srv',
|
||||
name='target',
|
||||
field=models.ForeignKey(help_text='Target server', on_delete=django.db.models.deletion.PROTECT, to='machines.Domain'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='srv',
|
||||
name='ttl',
|
||||
field=models.PositiveIntegerField(default=172800, help_text='Time to Live'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='srv',
|
||||
name='weight',
|
||||
field=models.PositiveIntegerField(default=0, help_text='Relative weight for records with the same priority (integer value between 0 and 65535)', validators=[django.core.validators.MaxValueValidator(65535)]),
|
||||
),
|
||||
]
|
File diff suppressed because it is too large
Load diff
|
@ -23,25 +23,26 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
{% load logs_extra %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Alias</th>
|
||||
<th>{% trans "Aliases" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for alias in alias_list %}
|
||||
<tr>
|
||||
<td>{{ alias }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit alias %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
|
||||
{% acl_end %}
|
||||
{% history_button alias %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ alias }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit alias %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
|
||||
{% acl_end %}
|
||||
{% history_button alias %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -22,16 +22,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Target zone</th>
|
||||
<th>Record</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for dname in dname_list %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Target zone" %}</th>
|
||||
<th>{% trans "Record" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for dname in dname_list %}
|
||||
<tr>
|
||||
<td>{{ dname.zone }}</td>
|
||||
<td>{{ dname.dns_entry }}</td>
|
||||
|
@ -39,10 +40,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% can_edit dname %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
|
||||
{% acl_end %}
|
||||
{% history_button dname %}
|
||||
{% history_button dname %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -25,17 +25,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load design %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Extension</th>
|
||||
<th>Droit infra pour utiliser ?</th>
|
||||
<th>Enregistrement SOA</th>
|
||||
<th>Enregistrement A origin</th>
|
||||
<th>{% trans "Extension" %}</th>
|
||||
<th>{% trans "'infra' right required" %}</th>
|
||||
<th>{% trans "SOA record" %}</th>
|
||||
<th>{% trans "A record origin" %}</th>
|
||||
{% if ipv6_enabled %}
|
||||
<th>Enregistrement AAAA origin</th>
|
||||
<th>{% trans "AAAA record origin" %}</th>
|
||||
{% endif %}
|
||||
<th></th>
|
||||
</tr>
|
||||
|
@ -44,7 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<tr>
|
||||
<td>{{ extension.name }}</td>
|
||||
<td>{{ extension.need_infra|tick }}</td>
|
||||
<td>{{ extension.soa}}</td>
|
||||
<td>{{ extension.soa }}</td>
|
||||
<td>{{ extension.origin }}</td>
|
||||
{% if ipv6_enabled %}
|
||||
<td>{{ extension.origin_v6 }}</td>
|
||||
|
@ -59,3 +60,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -26,18 +26,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type d'ip</th>
|
||||
<th>Extension</th>
|
||||
<th>Nécessite l'autorisation infra</th>
|
||||
<th>Plage ipv4</th>
|
||||
<th>Préfixe v6</th>
|
||||
<th>DNSSEC reverse v4/v6</th>
|
||||
<th>Sur vlan</th>
|
||||
<th>Ouverture ports par défault</th>
|
||||
<th>{% trans "IP type" %}</th>
|
||||
<th>{% trans "Extension" %}</th>
|
||||
<th>{% trans "'infra' right required" %}</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>
|
||||
|
@ -61,3 +63,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,29 +24,30 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Ipv6</th>
|
||||
<th>Slaac</th>
|
||||
<th>{% trans "IPv6 addresses" %}</th>
|
||||
<th>{% trans "SLAAC" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
{% for ipv6 in ipv6_list %}
|
||||
<tr>
|
||||
<td>{{ ipv6.ipv6 }}</td>
|
||||
<td>{{ ipv6.slaac_ip }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit ipv6 %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
|
||||
{% acl_end %}
|
||||
{% can_delete ipv6 %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
|
||||
{% acl_end %}
|
||||
{% history_button ipv6 %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ ipv6.ipv6 }}</td>
|
||||
<td>{{ ipv6.slaac_ip }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit ipv6 %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
|
||||
{% acl_end %}
|
||||
{% can_delete ipv6 %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
|
||||
{% acl_end %}
|
||||
{% history_button ipv6 %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
{% if machines_list.paginator %}
|
||||
|
@ -39,23 +40,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<col width="144px">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<th>{% include "buttons/sort.html" with prefix='machine' col='name' text='Nom DNS' %}</th>
|
||||
<th>Type</th>
|
||||
<th>MAC</th>
|
||||
<th>IP</th>
|
||||
<th>Actions</th>
|
||||
{% trans "DNS name" as tr_dns_name %}
|
||||
<th>{% include "buttons/sort.html" with prefix='machine' col='name' text=tr_dns_name %}</th>
|
||||
<th>{% trans "Type" %}</th>
|
||||
<th>{% trans "MAC address" %}</th>
|
||||
<th>{% trans "IP address" %}</th>
|
||||
<th>{% trans "Actions" %}</th>
|
||||
<tbody>
|
||||
{% for machine in machines_list %}
|
||||
{% for machine in machines_list %}
|
||||
<tr class="info">
|
||||
<td colspan="4">
|
||||
<b>{{ machine.name|default:'<i>Pas de nom</i>' }}</b> <i class="fa-angle-right"></i>
|
||||
<a href="{% url 'users:profil' userid=machine.user.id %}" title="Voir le profil">
|
||||
{% trans "No name" as tr_no_name %}
|
||||
{% trans "View the profile" as tr_view_the_profile %}
|
||||
<b>{{ machine.name|default:'<i>tr_no_name</i>' }}</b> <i class="fa-angle-right"></i>
|
||||
<a href="{% url 'users:profil' userid=machine.user.id %}" title=tr_view_the_profile>
|
||||
<i class="fa fa-user"></i> {{ machine.user }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% can_create Interface machine.id %}
|
||||
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc='Ajouter une interface' %}
|
||||
{% trans "Create an interface" as tr_create_an_interface %}
|
||||
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc=tr_create_an_interface %}
|
||||
{% acl_end %}
|
||||
{% history_button machine %}
|
||||
{% can_delete machine %}
|
||||
|
@ -68,8 +73,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<td>
|
||||
{% if interface.domain.related_domain.all %}
|
||||
{{ interface.domain }}
|
||||
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseDomain_{{interface.id}}" aria-expanded="true" aria-controls="collapseDomain_{{interface.id}}">
|
||||
Afficher les alias
|
||||
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseDomain_{{ interface.id }}" aria-expanded="true" aria-controls="collapseDomain_{{ interface.id }}">
|
||||
{% trans "Display the aliases" %}
|
||||
</button>
|
||||
{% else %}
|
||||
{{ interface.domain }}
|
||||
|
@ -77,7 +82,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</td>
|
||||
<td>
|
||||
{{ interface.type }}
|
||||
</td>
|
||||
</td>
|
||||
<td>
|
||||
{{ interface.mac_address }}
|
||||
</td>
|
||||
|
@ -86,8 +91,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br>
|
||||
{% if ipv6_enabled and interface.ipv6 != 'None'%}
|
||||
<b>IPv6</b>
|
||||
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseIpv6_{{interface.id}}" aria-expanded="true" aria-controls="collapseIpv6_{{interface.id}}">
|
||||
Afficher l'IPV6
|
||||
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseIpv6_{{ interface.id }}" aria-expanded="true" aria-controls="collapseIpv6_{{ interface.id }}">
|
||||
{% trans "Display the IPv6 address" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@ -97,39 +102,44 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<i class="fa fa-edit"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" aria-labelledby="editioninterface">
|
||||
<ul class="dropdown-menu" aria-labelledby="editioninterface">
|
||||
{% can_edit interface %}
|
||||
<li>
|
||||
<a href="{% url 'machines:edit-interface' interface.id %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans " Edit"%}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_create Domain interface.id %}
|
||||
<li>
|
||||
<a href="{% url 'machines:index-alias' interface.id %}">
|
||||
<i class="fa fa-edit"></i> Gerer les alias
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans " Manage the aliases" %}
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_create Ipv6List interface.id %}
|
||||
<li>
|
||||
<a href="{% url 'machines:index-ipv6' interface.id %}">
|
||||
<i class="fa fa-edit"></i> Gerer les ipv6
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans " Manage the IPv6 addresses" %}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_create SshFp interface.machine.id %}
|
||||
<li>
|
||||
<a href="{% url 'machines:index-sshfp' interface.machine.id %}">
|
||||
<i class="fa fa-edit"></i> Manage the SSH fingerprints
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans " Manage the SSH fingerprints" %}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_create OuverturePortList %}
|
||||
<li>
|
||||
<a href="{% url 'machines:port-config' interface.id%}">
|
||||
<i class="fa fa-edit"></i> Gerer la configuration des ports
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans " Manage the ports configuration" %}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
|
@ -142,61 +152,57 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% if ipv6_enabled and interface.ipv6 != 'None'%}
|
||||
<tr>
|
||||
<td colspan=5 style="border-top: none; padding: 1px;">
|
||||
<div class="collapse in" id="collapseIpv6_{{interface.id}}">
|
||||
<ul class="list-group" style="margin-bottom: 0px;">
|
||||
{% for ipv6 in interface.ipv6.all %}
|
||||
{% for ipv6 in interface.ipv6.all %}
|
||||
<li class="list-group-item col-xs-6 col-sm-6 col-md-6" style="border: none;">
|
||||
{{ipv6}}
|
||||
{{ ipv6 }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<tr>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if interface.domain.related_domain.all %}
|
||||
<tr>
|
||||
<td colspan=5 style="border-top: none; padding: 1px;">
|
||||
<div class="collapse in" id="collapseDomain_{{interface.id}}">
|
||||
<ul class="list-group" style="margin-bottom: 0px;">
|
||||
{% for al in interface.domain.related_domain.all %}
|
||||
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">
|
||||
<a href="http://{{ al }}">
|
||||
{{ al }}
|
||||
<i class="fa fa-share"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td colspan="8"></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if interface.domain.related_domain.all %}
|
||||
<tr>
|
||||
<td colspan=5 style="border-top: none; padding: 1px;">
|
||||
<div class="collapse in" id="collapseDomain_{{interface.id}}">
|
||||
<ul class="list-group" style="margin-bottom: 0px;">
|
||||
{% for al in interface.domain.related_domain.all %}
|
||||
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">
|
||||
<a href="http://{{ al }}">
|
||||
{{ al }}
|
||||
<i class="fa fa-share"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td colspan="8"></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$("#machines_table").ready( function() {
|
||||
var alias_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.domain.related_domain.all %}$("#collapseDomain_{{interface.id}}"), {% endif %}{% endfor %}{% endfor %}];
|
||||
var alias_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.domain.related_domain.all %}$("#collapseDomain_{{ interface.id }}"), {% endif %}{% endfor %}{% endfor %}];
|
||||
for (var i=0 ; i<alias_div.length ; i++) {
|
||||
alias_div[i].collapse('hide');
|
||||
}
|
||||
} );
|
||||
$("#machines_table").ready( function() {
|
||||
var ipv6_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.ipv6.all %}$("#collapseIpv6_{{interface.id}}"), {% endif %}{% endfor %}{% endfor %}];
|
||||
var ipv6_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.ipv6.all %}$("#collapseIpv6_{{ interface.id }}"), {% endif %}{% endfor %}{% endfor %}];
|
||||
for (var i=0 ; i<ipv6_div.length ; i++) {
|
||||
ipv6_div[i].collapse('hide');
|
||||
}
|
||||
|
@ -207,3 +213,4 @@ $("#machines_table").ready( function() {
|
|||
{% include "pagination.html" with list=machines_list %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,26 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type de machine</th>
|
||||
<th>Type d'ip correspondant</th>
|
||||
<th>{% trans "Machine type" %}</th>
|
||||
<th>{% trans "Matching IP type" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for type in machinetype_list %}
|
||||
<tr>
|
||||
<td>{{ type.type }}</td>
|
||||
<td>{{ type.ip_type }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit type %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
|
||||
{% acl_end %}
|
||||
{% history_button type %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ type.type }}</td>
|
||||
<td>{{ type.ip_type }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit type %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
|
||||
{% acl_end %}
|
||||
{% history_button type %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -24,30 +24,29 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zone concernée</th>
|
||||
<th>Priorité</th>
|
||||
<th>Enregistrement</th>
|
||||
<th></th>
|
||||
<th>{% trans "Concerned zone" %}</th>
|
||||
<th>{% trans "Priority" %}</th>
|
||||
<th>{% trans "Record" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for mx in mx_list %}
|
||||
<tr>
|
||||
<td>{{ mx.zone }}</td>
|
||||
<td>{{ mx.priority }}</td>
|
||||
<td>{{ mx.name }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit mx %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
|
||||
{% acl_end %}
|
||||
{% history_button mx %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ mx.zone }}</td>
|
||||
<td>{{ mx.priority }}</td>
|
||||
<td>{{ mx.name }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit mx %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
|
||||
{% acl_end %}
|
||||
{% history_button mx %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
|
|
|
@ -25,32 +25,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load design %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Type du nas</th>
|
||||
<th>Type de machine reliées au nas</th>
|
||||
<th>Mode d'accès</th>
|
||||
<th>Autocapture mac</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "NAS device type" %}</th>
|
||||
<th>{% trans "Machine type linked to the NAS device" %}</th>
|
||||
<th>{% trans "Access mode" %}</th>
|
||||
<th>{% trans "MAC address auto capture" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for nas in nas_list %}
|
||||
<tr>
|
||||
<td>{{ nas.name }}</td>
|
||||
<td>{{ nas.nas_type }}</td>
|
||||
<td>{{ nas.machine_type }}</td>
|
||||
<td>{{ nas.port_access_mode }}</td>
|
||||
<td>{{ nas.autocapture_mac|tick }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit nas %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
|
||||
{% acl_end %}
|
||||
{% history_button nas %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ nas.name }}</td>
|
||||
<td>{{ nas.nas_type }}</td>
|
||||
<td>{{ nas.machine_type }}</td>
|
||||
<td>{{ nas.port_access_mode }}</td>
|
||||
<td>{{ nas.autocapture_mac|tick }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit nas %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
|
||||
{% acl_end %}
|
||||
{% history_button nas %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -24,28 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zone concernée</th>
|
||||
<th>Interface autoritaire de la zone</th>
|
||||
<th></th>
|
||||
<th>{% trans "Concerned zone" %}</th>
|
||||
<th>{% trans "Authoritarian interface for the concerned zone" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for ns in ns_list %}
|
||||
<tr>
|
||||
<td>{{ ns.zone }}</td>
|
||||
<td>{{ ns.ns }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit ns %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
|
||||
{% acl_end %}
|
||||
{% history_button ns %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ ns.zone }}</td>
|
||||
<td>{{ ns.ns }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit ns %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
|
||||
{% acl_end %}
|
||||
{% history_button ns %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
|
|
|
@ -38,14 +38,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</tr>
|
||||
</thead>
|
||||
{% for role in role_list %}
|
||||
<tr>
|
||||
<td>{{ role.role_type }}</td>
|
||||
<td>{{ role.specific_role }}</td>
|
||||
<td>{% for serv in role.servers.all %}{{ serv }}, {% endfor %}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit role %}
|
||||
<tr>
|
||||
<td>{{ role.role_type }}</td>
|
||||
<td>{{ role.specific_role }}</td>
|
||||
<td>{% for serv in role.servers.all %}{{ serv }}, {% endfor %}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit role %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-role' id=role.id %}
|
||||
{% acl_end %}
|
||||
{% acl_end %}
|
||||
{% history_button role %}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -23,27 +23,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load design %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom du service</th>
|
||||
<th>Serveur</th>
|
||||
<th>Dernière régénération</th>
|
||||
<th>Régénération nécessaire</th>
|
||||
<th>Régénération activée</th>
|
||||
<th>{% trans "Service name" %}</th>
|
||||
<th>{% trans "Server" %}</th>
|
||||
<th>{% trans "Last regeneration" %}</th>
|
||||
<th>{% trans "Regeneration required" %}</th>
|
||||
<th>{% trans "Regeneration activated" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for server in servers_list %}
|
||||
<tr>
|
||||
<td>{{ server.service }}</td>
|
||||
<td>{{ server.server }}</td>
|
||||
<td>{{ server.last_regen }}</td>
|
||||
<td>{{ server.asked_regen| tick }}</td>
|
||||
<td>{{ server.need_regen | tick }}</td>
|
||||
<td class="text-right">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ server.service }}</td>
|
||||
<td>{{ server.server }}</td>
|
||||
<td>{{ server.last_regen }}</td>
|
||||
<td>{{ server.asked_regen|tick }}</td>
|
||||
<td>{{ server.need_regen|tick }}</td>
|
||||
<td class="text-right">
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -24,32 +24,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom du service</th>
|
||||
<th>Temps minimum avant nouvelle régénération</th>
|
||||
<th>Temps avant nouvelle génération obligatoire (max)</th>
|
||||
<th>Serveurs inclus</th>
|
||||
<th>Demander la regeneration</th>
|
||||
<th>{% trans "Service name" %}</th>
|
||||
<th>{% trans "Minimal time before regeneration" %}</th>
|
||||
<th>{% trans "Maximal time before regeneration" %}</th>
|
||||
<th>{% trans "Included servers" %}</th>
|
||||
<th>{% trans "Ask for regeneration" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for service in service_list %}
|
||||
<tr>
|
||||
<td>{{ service.service_type }}</td>
|
||||
<td>{{ service.min_time_regen }}</td>
|
||||
<td>{{ service.regular_time_regen }}</td>
|
||||
<td>{% for serv in service.servers.all %}{{ serv }}, {% endfor %}</td>
|
||||
<td><a role="button" class="btn btn-danger" href="{% url 'machines:regen-service' service.id %}"><i class="fas fa-sync"></i></a></td>
|
||||
<td class="text-right">
|
||||
{% can_edit service %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-service' id=service.id %}
|
||||
{% acl_end %}
|
||||
{% history_button service %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ service.service_type }}</td>
|
||||
<td>{{ service.min_time_regen }}</td>
|
||||
<td>{{ service.regular_time_regen }}</td>
|
||||
<td>{% for serv in service.servers.all %}{{ serv }}, {% endfor %}</td>
|
||||
<td><a role="button" class="btn btn-danger" href="{% url 'machines:regen-service' service.id %}"><i class="fa fa-sync"></i></a></td>
|
||||
<td class="text-right">
|
||||
{% can_edit service %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-service' id=service.id %}
|
||||
{% acl_end %}
|
||||
{% history_button service %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -24,36 +24,35 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Mail</th>
|
||||
<th>Refresh</th>
|
||||
<th>Retry</th>
|
||||
<th>Expire</th>
|
||||
<th>TTL</th>
|
||||
<th></th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "Mail" %}</th>
|
||||
<th>{% trans "Refresh" %}</th>
|
||||
<th>{% trans "Retry" %}</th>
|
||||
<th>{% trans "Expire" %}</th>
|
||||
<th>{% trans "TTL" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for soa in soa_list %}
|
||||
<tr>
|
||||
<td>{{ soa.name }}</td>
|
||||
<td>{{ soa.mail }}</td>
|
||||
<td>{{ soa.refresh }}</td>
|
||||
<td>{{ soa.retry }}</td>
|
||||
<td>{{ soa.expire }}</td>
|
||||
<td>{{ soa.ttl }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit soa %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-soa' id=soa.id %}
|
||||
{% acl_end %}
|
||||
{% history_button soa %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ soa.name }}</td>
|
||||
<td>{{ soa.mail }}</td>
|
||||
<td>{{ soa.refresh }}</td>
|
||||
<td>{{ soa.retry }}</td>
|
||||
<td>{{ soa.expire }}</td>
|
||||
<td>{{ soa.ttl }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit soa %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-soa' id=soa.id %}
|
||||
{% acl_end %}
|
||||
{% history_button soa %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
|
|
|
@ -24,40 +24,39 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Service</th>
|
||||
<th>Protocole</th>
|
||||
<th>Extension</th>
|
||||
<th>TTL</th>
|
||||
<th>Priorité</th>
|
||||
<th>Poids</th>
|
||||
<th>Port</th>
|
||||
<th>Cible</th>
|
||||
<th></th>
|
||||
<th>{% trans "Service" %}</th>
|
||||
<th>{% trans "Protocol" %}</th>
|
||||
<th>{% trans "Extension" %}</th>
|
||||
<th>{% trans "TTL" %}</th>
|
||||
<th>{% trans "Priority" %}</th>
|
||||
<th>{% trans "Weight" %}</th>
|
||||
<th>{% trans "Port" %}</th>
|
||||
<th>{% trans "Target" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for srv in srv_list %}
|
||||
<tr>
|
||||
<td>{{ srv.service }}</td>
|
||||
<td>{{ srv.protocole }}</td>
|
||||
<td>{{ srv.extension }}</td>
|
||||
<td>{{ srv.ttl }}</td>
|
||||
<td>{{ srv.priority }}</td>
|
||||
<td>{{ srv.weight }}</td>
|
||||
<td>{{ srv.port }}</td>
|
||||
<td>{{ srv.target }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit srv %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-srv' id=srv.id %}
|
||||
{% acl_end %}
|
||||
{% history_button srv %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ srv.service }}</td>
|
||||
<td>{{ srv.protocole }}</td>
|
||||
<td>{{ srv.extension }}</td>
|
||||
<td>{{ srv.ttl }}</td>
|
||||
<td>{{ srv.priority }}</td>
|
||||
<td>{{ srv.weight }}</td>
|
||||
<td>{{ srv.port }}</td>
|
||||
<td>{{ srv.target }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit srv %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-srv' id=srv.id %}
|
||||
{% acl_end %}
|
||||
{% history_button srv %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
|
|
|
@ -21,33 +21,34 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
{% load logs_extra %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped long_text">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="long_text">SSH public key</th>
|
||||
<th>Algorithm used</th>
|
||||
<th>Comment</th>
|
||||
<th class="long_text">{% trans "SSH public key" %}</th>
|
||||
<th>{% trans "Algorithm used" %}</th>
|
||||
<th>{% trans "Comment" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for sshfp in sshfp_list %}
|
||||
<tr>
|
||||
<td class="long_text">{{ sshfp.pub_key_entry }}</td>
|
||||
<td>{{ sshfp.algo }}</td>
|
||||
<td>{{ sshfp.comment }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit sshfp %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-sshfp' id=sshfp.id %}
|
||||
{% acl_end %}
|
||||
{% can_delete sshfp %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-sshfp' id=sshfp.id %}
|
||||
{% acl_end %}
|
||||
{% history_button sshfp %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="long_text">{{ sshfp.pub_key_entry }}</td>
|
||||
<td>{{ sshfp.algo }}</td>
|
||||
<td>{{ sshfp.comment }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit sshfp %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-sshfp' id=sshfp.id %}
|
||||
{% acl_end %}
|
||||
{% history_button sshfp %}
|
||||
{% can_delete sshfp %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-sshfp' id=sshfp.id %}
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -24,28 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zone concernée</th>
|
||||
<th>Enregistrement</th>
|
||||
<th></th>
|
||||
<th>{% trans "Concerned zone" %}</th>
|
||||
<th>{% trans "Record" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for txt in text_list %}
|
||||
<tr>
|
||||
<td>{{ txt.zone }}</td>
|
||||
<td>{{ txt.dns_entry }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit txt %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-txt' id=txt.id %}
|
||||
{% acl_end %}
|
||||
{% history_button txt %}
|
||||
</td>
|
||||
</tr>
|
||||
{% for txt in txt_list %}
|
||||
<tr>
|
||||
<td>{{ txt.zone }}</td>
|
||||
<td>{{ txt.dns_entry }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit txt %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-txt' id=txt.id %}
|
||||
{% acl_end %}
|
||||
{% history_button txt %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
|
|
|
@ -24,31 +24,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Nom</th>
|
||||
<th>Commentaire</th>
|
||||
<th>Ranges ip</th>
|
||||
<th>{% trans "ID" %}</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "Comment" %}</th>
|
||||
<th>{% trans "IP ranges" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for vlan in vlan_list %}
|
||||
<tr>
|
||||
<td>{{ vlan.vlan_id }}</td>
|
||||
<td>{{ vlan.name }}</td>
|
||||
<td>{{ vlan.comment }}</td>
|
||||
<td>{% for range in vlan.iptype_set.all %}{{ range }}, {% endfor%}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit vlan %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-vlan' id=vlan.id %}
|
||||
{% acl_end %}
|
||||
{% history_button vlan %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ vlan.vlan_id }}</td>
|
||||
<td>{{ vlan.name }}</td>
|
||||
<td>{{ vlan.comment }}</td>
|
||||
<td>{% for range in vlan.iptype_set.all %}{{ range }}, {% endfor%}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit vlan %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-vlan' id=vlan.id %}
|
||||
{% acl_end %}
|
||||
{% history_button vlan %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,17 +24,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification de machines{% endblock %}
|
||||
{% block title %}{% trans "Creation and editing of machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
<h4>Attention, voulez-vous vraiment supprimer cet objet {{ objet_name }} ( {{ objet }} ) ?</h4>
|
||||
{% bootstrap_button "Confirmer" button_type="submit" icon="trash" %}
|
||||
<h4>{% blocktrans %}Warning: are you sure you want to delete this object {{ objet_name }} ( {{ objet }} )?{% endblocktrans %}</h4>
|
||||
{% trans "Confirm" as tr_confirm %}
|
||||
{% bootstrap_button tr_confirm button_type="submit" icon="trash" %}
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,8 +24,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification de machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% bootstrap_form_errors port_list %}
|
||||
|
@ -46,10 +47,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</div>
|
||||
|
||||
<p>
|
||||
<input class="btn btn-primary btn-sm" role="button" value="Ajouter un port" id="add_one">
|
||||
{% trans "Add a port" as value %}
|
||||
<input class="btn btn-primary btn-sm" role="button" value=value id="add_one">
|
||||
</p>
|
||||
|
||||
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
|
||||
{% trans "Create or edit" as tr_create_or_edit %}
|
||||
{% bootstrap_button tr_create_or_edit button_type="submit" icon="star" %}
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var template = `{{ports.empty_form}}`;
|
||||
|
@ -67,3 +69,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,11 +24,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Machines</h2>
|
||||
<h2>{% trans "Machines" %}</h2>
|
||||
{% include "machines/aff_machines.html" with machines_list=machines_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -24,16 +24,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des alias de l'interface</h2>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-alias' interface_id %}"><i class="fa fa-plus"></i> Ajouter un alias</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-alias' interface_id %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs alias</a>
|
||||
{% include "machines/aff_alias.html" with alias_list=alias_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<h2>{% trans "List of the aliases of the interface" %}</h2>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-alias' interface_id %}"><i class="fa fa-plus"></i>{% trans " Add an alias" %}</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-alias' interface_id %}"><i class="fa fa-trash"></i>{% trans " Delete one or several aliases" %}</a>
|
||||
{% include "machines/aff_alias.html" with alias_list=alias_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -28,57 +28,60 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des extensions</h2>
|
||||
<h2>{% trans "List of extensions" %}</h2>
|
||||
{% can_create Extension %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-extension' %}"><i class="fa fa-plus"></i> Ajouter une extension</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-extension' %}"><i class="fa fa-plus"></i>{% trans " Add an extension" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-extension' %}"><i class="fa fa-trash"></i> Supprimer une ou plusieurs extensions</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-extension' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several extensions" %}</a>
|
||||
{% include "machines/aff_extension.html" with extension_list=extension_list %}
|
||||
|
||||
<h2>Liste des enregistrements SOA</h2>
|
||||
<h2>{% trans "List of SOA records" %}</h2>
|
||||
{% can_create SOA %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-soa' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement SOA</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-soa' %}"><i class="fa fa-plus"></i>{% trans " Add an SOA record" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-soa' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement SOA</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-soa' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several SOA records" %}</a>
|
||||
{% include "machines/aff_soa.html" with soa_list=soa_list %}
|
||||
<h2>Liste des enregistrements MX</h2>
|
||||
|
||||
<h2>{% trans "List of MX records" %}</h2>
|
||||
{% can_create Mx %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-mx' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement MX</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-mx' %}"><i class="fa fa-plus"></i>{% trans " Add an MX record" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-mx' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement MX</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-mx' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several MX records" %}</a>
|
||||
{% include "machines/aff_mx.html" with mx_list=mx_list %}
|
||||
<h2>Liste des enregistrements NS</h2>
|
||||
|
||||
<h2>{% trans "List of NS records" %}</h2>
|
||||
{% can_create Ns %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-ns' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement NS</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-ns' %}"><i class="fa fa-plus"></i>{% trans " Add an NS record" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-ns' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement NS</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-ns' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several NS records" %}</a>
|
||||
{% include "machines/aff_ns.html" with ns_list=ns_list %}
|
||||
<h2>Liste des enregistrements TXT</h2>
|
||||
|
||||
<h2>{% trans "List of TXT records" %}</h2>
|
||||
{% can_create Txt %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-txt' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement TXT</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-txt' %}"><i class="fa fa-plus"></i>{% trans " Add a TXT record" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-txt' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement TXT</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-txt' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several TXT records" %}</a>
|
||||
{% include "machines/aff_txt.html" with txt_list=txt_list %}
|
||||
|
||||
<h2>DNAME records</h2>
|
||||
<h2>{% trans "List of DNAME records" %}</h2>
|
||||
{% can_create DName %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-dname' %}">
|
||||
<i class="fa fa-plus"></i> {% trans "Add a DNAME record" %}
|
||||
<i class="fa fa-plus"></i> {% trans " Add a DNAME record" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-dname' %}">
|
||||
<i class="fa fa-trash"></i> {% trans "Delete DNAME records" %}
|
||||
<i class="fa fa-trash"></i> {% trans " Delete one or several DNAME records" %}
|
||||
</a>
|
||||
{% include "machines/aff_dname.html" with dname_list=dname_list %}
|
||||
|
||||
<h2>Liste des enregistrements SRV</h2>
|
||||
<h2>{% trans "List of SRV records" %}</h2>
|
||||
{% can_create Srv %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-srv' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement SRV</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-srv' %}"><i class="fa fa-plus"></i>{% trans " Add an SRV record" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-srv' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement SRV</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-srv' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several SRV records" %}</a>
|
||||
{% include "machines/aff_srv.html" with srv_list=srv_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -26,15 +26,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load bootstrap3 %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Ip{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des types d'ip</h2>
|
||||
<h2>{% trans "List of IP types" %}</h2>
|
||||
{% can_create IpType %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-iptype' %}"><i class="fa fa-plus"></i> Ajouter un type d'ip</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-iptype' %}"><i class="fa fa-plus"></i>{% trans " Add an IP type" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-iptype' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types d'ip</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-iptype' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several IP types" %}</a>
|
||||
{% include "machines/aff_iptype.html" with iptype_list=iptype_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -25,13 +25,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des ipv6 de l'interface</h2>
|
||||
<h2>{% trans "List of the IPv6 addresses of the interface" %}</h2>
|
||||
{% can_create Ipv6List interface_id %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-ipv6list' interface_id %}"><i class="fa fa-plus"></i> Ajouter une ipv6</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-ipv6list' interface_id %}"><i class="fa fa-plus"></i>{% trans " Add an IPv6 address" %}</a>
|
||||
{% acl_end %}
|
||||
{% include "machines/aff_ipv6.html" with ipv6_list=ipv6_list %}
|
||||
<br />
|
||||
|
|
|
@ -26,15 +26,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load bootstrap3 %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des types de machines</h2>
|
||||
<h2>{% trans "List of machine types" %}</h2>
|
||||
{% can_create MachineType %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-machinetype' %}"><i class="fa fa-plus"></i> Ajouter un type de machine</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-machinetype' %}"><i class="fa fa-plus"></i>{% trans " Add a machine type" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-machinetype' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types de machines</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-machinetype' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several machine types" %}</a>
|
||||
{% include "machines/aff_machinetype.html" with machinetype_list=machinetype_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -26,17 +26,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load bootstrap3 %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des nas</h2>
|
||||
<h5>La correpondance nas-machinetype relie le type de nas à un type de machine.
|
||||
Elle est utile pour l'autoenregistrement des macs par radius, et permet de choisir le type de machine à affecter aux machines en fonction du type de nas</h5>
|
||||
<h2>{% trans "List of NAS devices" %}</h2>
|
||||
<h5>{% trans "The NAS device type and machine type are linked. It is useful for MAC address auto capture by RADIUS, and allows to choose the machine type to assign to the machines according to the NAS device type." %}</h5>
|
||||
{% can_create Nas %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-nas' %}"><i class="fa fa-plus"></i> Ajouter un type de nas</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-nas' %}"><i class="fa fa-plus"></i>{% trans " Add a NAS device type" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-nas' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types nas</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-nas' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several NAS device types" %}</a>
|
||||
{% include "machines/aff_nas.html" with nas_list=nas_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -3,23 +3,24 @@
|
|||
{% load bootstrap3 %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Configuration de ports{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des configurations de ports</h2>
|
||||
<h2>{% trans "List of ports configurations" %}</h2>
|
||||
{% can_create OuverturePortList %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-portlist' %}"><i class="fa fa-plus"></i>Ajouter une configuration</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-portlist' %}"><i class="fa fa-plus"></i>{% trans " Add a configuration" %}</a>
|
||||
{% acl_end %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>TCP (entrée)</th>
|
||||
<th>TCP (sortie)</th>
|
||||
<th>UDP (entrée)</th>
|
||||
<th>UDP (sortie)</th>
|
||||
<th>Machines</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "TCP (input)" %}</th>
|
||||
<th>{% trans "TCP (output)" %}</th>
|
||||
<th>{% trans "UDP (input)" %}</th>
|
||||
<th>{% trans "UDP (output)" %}</th>
|
||||
<th>{% trans "Machines" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -48,13 +49,13 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
<td class="text-right">
|
||||
{% can_delete pl %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-portlist' id=pl.id %}
|
||||
{% acl_end %}
|
||||
{% can_edit pl %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-portlist' id=pl.id %}
|
||||
{% acl_end %}
|
||||
</td>
|
||||
{% can_delete pl %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-portlist' id=pl.id %}
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{%endfor%}
|
||||
</table>
|
||||
|
@ -63,3 +64,4 @@
|
|||
<br />
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -27,14 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Roles list" %}</h2>
|
||||
<h2>{% trans "List of roles" %}</h2>
|
||||
{% can_create Role %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-role' %}"><i class="fa fa-plus"></i> {% trans "Add role"%}</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-role' %}"><i class="fa fa-plus"></i>{% trans " Add a role"%}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-role' %}"><i class="fa fa-trash"></i> {% trans "Delete one or several roles" %}</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-role' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several roles" %}</a>
|
||||
{% include "machines/aff_role.html" with role_list=role_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -25,17 +25,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des services</h2>
|
||||
<h2>{% trans "List of services" %}</h2>
|
||||
{% can_create machines.Service %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="fa fa-plus"></i> Ajouter un service</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="fa fa-plus"></i>{% trans " Add a service" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs service</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several services" %}</a>
|
||||
{% include "machines/aff_service.html" with service_list=service_list %}
|
||||
<h2>Etat des serveurs</h2>
|
||||
<h2>{% trans "States of servers" %}</h2>
|
||||
{% include "machines/aff_servers.html" with servers_list=servers_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -23,16 +23,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>SSH fingerprints</h2>
|
||||
{% can_create SshFp machine_id %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-sshfp' machine_id %}">
|
||||
<i class="fa fa-plus"></i> Add an SSH fingerprint
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% include "machines/aff_sshfp.html" with sshfp_list=sshfp_list %}
|
||||
<h2>{% trans "SSH fingerprints" %}</h2>
|
||||
{% can_create SshFp machine_id %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-sshfp' machine_id %}">
|
||||
<i class="fa fa-plus"></i>{% trans " Add an SSH fingerprint" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% include "machines/aff_sshfp.html" with sshfp_list=sshfp_list %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -26,15 +26,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load bootstrap3 %}
|
||||
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des vlans</h2>
|
||||
<h2>{% trans "List of VLANs" %}</h2>
|
||||
{% can_create Vlan %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-vlan' %}"><i class="fa fa-plus"></i> Ajouter un vlan</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-vlan' %}"><i class="fa fa-plus"></i>{% trans " Add a VLAN" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-vlan' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs vlan</a>
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-vlan' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several VLANs" %}</a>
|
||||
{% include "machines/aff_vlan.html" with vlan_list=vlan_list %}
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -26,8 +26,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load massive_bootstrap_form %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification de machines{% endblock %}
|
||||
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if machineform %}
|
||||
|
@ -88,11 +89,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% if machineform %}
|
||||
<h3>Machine</h3>
|
||||
<h3>{% trans "Machine" %}</h3>
|
||||
{% massive_bootstrap_form machineform 'user' %}
|
||||
{% endif %}
|
||||
{% if interfaceform %}
|
||||
<h3>Interface</h3>
|
||||
<h3>{% trans "Interface" %}</h3>
|
||||
{% if i_mbf_param %}
|
||||
{% massive_bootstrap_form interfaceform 'ipv4,machine' mbf_param=i_mbf_param %}
|
||||
{% else %}
|
||||
|
@ -100,55 +101,55 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% if domainform %}
|
||||
<h3>Domaine</h3>
|
||||
<h3>{% trans "Domain" %}</h3>
|
||||
{% bootstrap_form domainform %}
|
||||
{% endif %}
|
||||
{% if iptypeform %}
|
||||
<h3>Type d'IP</h3>
|
||||
<h3>{% trans "IP type" %}</h3>
|
||||
{% bootstrap_form iptypeform %}
|
||||
{% endif %}
|
||||
{% if machinetypeform %}
|
||||
<h3>Type de machine</h3>
|
||||
<h3>{% trans "Machine type" %}</h3>
|
||||
{% bootstrap_form machinetypeform %}
|
||||
{% endif %}
|
||||
{% if extensionform %}
|
||||
<h3>Extension</h3>
|
||||
<h3>{% trans "Extension" %}</h3>
|
||||
{% massive_bootstrap_form extensionform 'origin' %}
|
||||
{% endif %}
|
||||
{% if soaform %}
|
||||
<h3>Enregistrement SOA</h3>
|
||||
<h3>{% trans "SOA record" %}</h3>
|
||||
{% bootstrap_form soaform %}
|
||||
{% endif %}
|
||||
{% if mxform %}
|
||||
<h3>Enregistrement MX</h3>
|
||||
<h3>{% trans "MX record" %}</h3>
|
||||
{% massive_bootstrap_form mxform 'name' %}
|
||||
{% endif %}
|
||||
{% if nsform %}
|
||||
<h3>Enregistrement NS</h3>
|
||||
<h3>{% trans "NS record" %}</h3>
|
||||
{% massive_bootstrap_form nsform 'ns' %}
|
||||
{% endif %}
|
||||
{% if txtform %}
|
||||
<h3>Enregistrement TXT</h3>
|
||||
<h3>{% trans "TXT record" %}</h3>
|
||||
{% bootstrap_form txtform %}
|
||||
{% endif %}
|
||||
{% if dnameform %}
|
||||
<h3>DNAME record</h3>
|
||||
<h3>{% trans "DNAME record" %}</h3>
|
||||
{% bootstrap_form dnameform %}
|
||||
{% endif %}
|
||||
{% if srvform %}
|
||||
<h3>Enregistrement SRV</h3>
|
||||
<h3>{% trans "SRV record" %}</h3>
|
||||
{% massive_bootstrap_form srvform 'target' %}
|
||||
{% endif %}
|
||||
{% if sshfpform %}
|
||||
<h3>SSHFP record</h3>
|
||||
<h3>{% trans "SSHFP record" %}</h3>
|
||||
{% bootstrap_form sshfpform %}
|
||||
{% endif %}
|
||||
{% if aliasform %}
|
||||
<h3>Alias</h3>
|
||||
<h3>{% trans "Alias" %}</h3>
|
||||
{% bootstrap_form aliasform %}
|
||||
{% endif %}
|
||||
{% if serviceform %}
|
||||
<h3>Service</h3>
|
||||
<h3>{% trans "Service" %}</h3>
|
||||
{% massive_bootstrap_form serviceform 'servers' %}
|
||||
{% endif %}
|
||||
{% if roleform %}
|
||||
|
@ -156,15 +157,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% massive_bootstrap_form roleform 'servers' %}
|
||||
{% endif %}
|
||||
{% if vlanform %}
|
||||
<h3>Vlan</h3>
|
||||
<h3>{% trans "VLAN" %}</h3>
|
||||
{% bootstrap_form vlanform %}
|
||||
{% endif %}
|
||||
{% if nasform %}
|
||||
<h3>NAS</h3>
|
||||
<h3>{% trans "NAS device" %}</h3>
|
||||
{% bootstrap_form nasform %}
|
||||
{% endif %}
|
||||
{% if ipv6form %}
|
||||
<h3>Ipv6</h3>
|
||||
<h3>{% trans "IPv6 address" %}</h3>
|
||||
{% bootstrap_form ipv6form %}
|
||||
{% endif %}
|
||||
{% bootstrap_button action_name button_type="submit" icon="star" %}
|
||||
|
@ -173,3 +174,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -30,43 +30,43 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% can_view_all Machine %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Machines
|
||||
{% trans "Machines" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_view_all MachineType %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-machinetype" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Types de machines
|
||||
{% trans "Machine types" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_view_all Extension %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-extension" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Extensions et zones
|
||||
{% trans "Extensions and zones" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_view_all IpType %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-iptype" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Plages d'IP
|
||||
{% trans "IP ranges" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_view_all Vlan %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-vlan" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Vlans
|
||||
{% trans "VLANs" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_view_all Nas %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-nas" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Gestion des nas
|
||||
{% trans "NAS devices" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_view_all machines.Service %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Services (dhcp, dns...)
|
||||
{% trans "Services (DHCP, DNS, ...)" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_view_all Role %}
|
||||
|
@ -78,7 +78,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% can_view_all OuverturePortList %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-portlist" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Ouverture de ports
|
||||
{% trans "Ports openings" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ def generate_ipv4_choices(form_obj):
|
|||
"""
|
||||
f_ipv4 = form_obj.fields['ipv4']
|
||||
used_mtype_id = []
|
||||
choices = '{"":[{key:"",value:"Choisissez d\'abord un type de machine"},'
|
||||
choices = '{"":[{key:"",value:'+_("Select a machine type first.},")
|
||||
mtype_id = -1
|
||||
|
||||
for ip in (f_ipv4.queryset
|
||||
|
@ -255,7 +255,7 @@ def new_machine(request, user, **_kwargs):
|
|||
new_interface_obj.save()
|
||||
new_domain.interface_parent = new_interface_obj
|
||||
new_domain.save()
|
||||
messages.success(request, "La machine a été créée")
|
||||
messages.success(request, _("The machine was created."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(user.id)}
|
||||
|
@ -267,7 +267,7 @@ def new_machine(request, user, **_kwargs):
|
|||
'interfaceform': interface,
|
||||
'domainform': domain,
|
||||
'i_mbf_param': i_mbf_param,
|
||||
'action_name': 'Créer une machine'
|
||||
'action_name': _("Create a machine")
|
||||
},
|
||||
'machines/machine.html',
|
||||
request
|
||||
|
@ -307,7 +307,7 @@ def edit_interface(request, interface_instance, **_kwargs):
|
|||
new_interface_obj.save()
|
||||
if domain_form.changed_data:
|
||||
new_domain_obj.save()
|
||||
messages.success(request, "La machine a été modifiée")
|
||||
messages.success(request, _("The machine was edited."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(interface_instance.machine.user.id)}
|
||||
|
@ -319,7 +319,7 @@ def edit_interface(request, interface_instance, **_kwargs):
|
|||
'interfaceform': interface_form,
|
||||
'domainform': domain_form,
|
||||
'i_mbf_param': i_mbf_param,
|
||||
'action_name': 'Editer une interface'
|
||||
'action_name': _("Edit")
|
||||
},
|
||||
'machines/machine.html',
|
||||
request
|
||||
|
@ -332,7 +332,7 @@ def del_machine(request, machine, **_kwargs):
|
|||
""" Supprime une machine, interfaces en mode cascade"""
|
||||
if request.method == "POST":
|
||||
machine.delete()
|
||||
messages.success(request, "La machine a été détruite")
|
||||
messages.success(request, _("The machine was deleted."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(machine.user.id)}
|
||||
|
@ -361,7 +361,7 @@ def new_interface(request, machine, **_kwargs):
|
|||
new_interface_obj.save()
|
||||
new_domain_obj.interface_parent = new_interface_obj
|
||||
new_domain_obj.save()
|
||||
messages.success(request, "L'interface a été ajoutée")
|
||||
messages.success(request, _("The interface was created."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(machine.user.id)}
|
||||
|
@ -372,7 +372,7 @@ def new_interface(request, machine, **_kwargs):
|
|||
'interfaceform': interface_form,
|
||||
'domainform': domain_form,
|
||||
'i_mbf_param': i_mbf_param,
|
||||
'action_name': 'Créer une interface'
|
||||
'action_name': _("Create an interface")
|
||||
},
|
||||
'machines/machine.html',
|
||||
request
|
||||
|
@ -388,7 +388,7 @@ def del_interface(request, interface, **_kwargs):
|
|||
interface.delete()
|
||||
if not machine.interface_set.all():
|
||||
machine.delete()
|
||||
messages.success(request, "L'interface a été détruite")
|
||||
messages.success(request, _("The interface was deleted."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
|
@ -413,13 +413,13 @@ def new_ipv6list(request, interface, **_kwargs):
|
|||
)
|
||||
if ipv6.is_valid():
|
||||
ipv6.save()
|
||||
messages.success(request, "Ipv6 ajoutée")
|
||||
messages.success(request, _("The IPv6 addresses list was created."))
|
||||
return redirect(reverse(
|
||||
'machines:index-ipv6',
|
||||
kwargs={'interfaceid': str(interface.id)}
|
||||
))
|
||||
return form(
|
||||
{'ipv6form': ipv6, 'action_name': 'Créer'},
|
||||
{'ipv6form': ipv6, 'action_name': _("Create an IPv6 addresses list")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -437,13 +437,13 @@ def edit_ipv6list(request, ipv6list_instance, **_kwargs):
|
|||
if ipv6.is_valid():
|
||||
if ipv6.changed_data:
|
||||
ipv6.save()
|
||||
messages.success(request, "Ipv6 modifiée")
|
||||
messages.success(request, _("The IPv6 addresses list was edited."))
|
||||
return redirect(reverse(
|
||||
'machines:index-ipv6',
|
||||
kwargs={'interfaceid': str(ipv6list_instance.interface.id)}
|
||||
))
|
||||
return form(
|
||||
{'ipv6form': ipv6, 'action_name': 'Editer'},
|
||||
{'ipv6form': ipv6, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -456,7 +456,7 @@ def del_ipv6list(request, ipv6list, **_kwargs):
|
|||
if request.method == "POST":
|
||||
interfaceid = ipv6list.interface.id
|
||||
ipv6list.delete()
|
||||
messages.success(request, "L'ipv6 a été détruite")
|
||||
messages.success(request, _("The IPv6 addresses list was deleted."))
|
||||
return redirect(reverse(
|
||||
'machines:index-ipv6',
|
||||
kwargs={'interfaceid': str(interfaceid)}
|
||||
|
@ -480,13 +480,13 @@ def new_sshfp(request, machine, **_kwargs):
|
|||
)
|
||||
if sshfp.is_valid():
|
||||
sshfp.save()
|
||||
messages.success(request, "The SSHFP record was added")
|
||||
messages.success(request, _("The SSHFP record was created."))
|
||||
return redirect(reverse(
|
||||
'machines:index-sshfp',
|
||||
kwargs={'machineid': str(machine.id)}
|
||||
))
|
||||
return form(
|
||||
{'sshfpform': sshfp, 'action_name': 'Create'},
|
||||
{'sshfpform': sshfp, 'action_name': _("Create a SSHFP record")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -503,13 +503,13 @@ def edit_sshfp(request, sshfp_instance, **_kwargs):
|
|||
if sshfp.is_valid():
|
||||
if sshfp.changed_data:
|
||||
sshfp.save()
|
||||
messages.success(request, "The SSHFP record was edited")
|
||||
messages.success(request, _("The SSHFP record was edited."))
|
||||
return redirect(reverse(
|
||||
'machines:index-sshfp',
|
||||
kwargs={'machineid': str(sshfp_instance.machine.id)}
|
||||
))
|
||||
return form(
|
||||
{'sshfpform': sshfp, 'action_name': 'Edit'},
|
||||
{'sshfpform': sshfp, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -522,7 +522,7 @@ def del_sshfp(request, sshfp, **_kwargs):
|
|||
if request.method == "POST":
|
||||
machineid = sshfp.machine.id
|
||||
sshfp.delete()
|
||||
messages.success(request, "The SSHFP record was deleted")
|
||||
messages.success(request, _("The SSHFP record was deleted."))
|
||||
return redirect(reverse(
|
||||
'machines:index-sshfp',
|
||||
kwargs={'machineid': str(machineid)}
|
||||
|
@ -543,10 +543,10 @@ def add_iptype(request):
|
|||
iptype = IpTypeForm(request.POST or None)
|
||||
if iptype.is_valid():
|
||||
iptype.save()
|
||||
messages.success(request, "Ce type d'ip a été ajouté")
|
||||
messages.success(request, _("The IP type was created."))
|
||||
return redirect(reverse('machines:index-iptype'))
|
||||
return form(
|
||||
{'iptypeform': iptype, 'action_name': 'Créer'},
|
||||
{'iptypeform': iptype, 'action_name': _("Create an IP type")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -562,10 +562,10 @@ def edit_iptype(request, iptype_instance, **_kwargs):
|
|||
if iptype.is_valid():
|
||||
if iptype.changed_data:
|
||||
iptype.save()
|
||||
messages.success(request, "Type d'ip modifié")
|
||||
messages.success(request, _("The IP type was edited."))
|
||||
return redirect(reverse('machines:index-iptype'))
|
||||
return form(
|
||||
{'iptypeform': iptype, 'action_name': 'Editer'},
|
||||
{'iptypeform': iptype, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -581,16 +581,16 @@ def del_iptype(request, instances):
|
|||
for iptype_del in iptype_dels:
|
||||
try:
|
||||
iptype_del.delete()
|
||||
messages.success(request, "Le type d'ip a été supprimé")
|
||||
messages.success(request, _("The IP type was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Le type d'ip %s est affectée à au moins une machine, "
|
||||
"vous ne pouvez pas le supprimer" % iptype_del)
|
||||
(_("The IP type %s is assigned to at least one machine,"
|
||||
" you can't delete it.") % iptype_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-iptype'))
|
||||
return form(
|
||||
{'iptypeform': iptype, 'action_name': 'Supprimer'},
|
||||
{'iptypeform': iptype, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -603,10 +603,11 @@ def add_machinetype(request):
|
|||
machinetype = MachineTypeForm(request.POST or None)
|
||||
if machinetype.is_valid():
|
||||
machinetype.save()
|
||||
messages.success(request, "Ce type de machine a été ajouté")
|
||||
messages.success(request, _("The machine type was created."))
|
||||
return redirect(reverse('machines:index-machinetype'))
|
||||
return form(
|
||||
{'machinetypeform': machinetype, 'action_name': 'Créer'},
|
||||
{'machinetypeform': machinetype, 'action_name': _("Create a machine"
|
||||
" type")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -623,10 +624,10 @@ def edit_machinetype(request, machinetype_instance, **_kwargs):
|
|||
if machinetype.is_valid():
|
||||
if machinetype.changed_data:
|
||||
machinetype.save()
|
||||
messages.success(request, "Type de machine modifié")
|
||||
messages.success(request, _("The machine type was edited."))
|
||||
return redirect(reverse('machines:index-machinetype'))
|
||||
return form(
|
||||
{'machinetypeform': machinetype, 'action_name': 'Editer'},
|
||||
{'machinetypeform': machinetype, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -642,17 +643,16 @@ def del_machinetype(request, instances):
|
|||
for machinetype_del in machinetype_dels:
|
||||
try:
|
||||
machinetype_del.delete()
|
||||
messages.success(request, "Le type de machine a été supprimé")
|
||||
messages.success(request, _("The machine type was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Le type de machine %s est affectée à au moins une "
|
||||
"machine, vous ne pouvez pas le supprimer"
|
||||
% machinetype_del)
|
||||
(_("The machine type %s is assigned to at least one"
|
||||
" machine, you can't delete it.") % machinetype_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-machinetype'))
|
||||
return form(
|
||||
{'machinetypeform': machinetype, 'action_name': 'Supprimer'},
|
||||
{'machinetypeform': machinetype, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -665,10 +665,10 @@ def add_extension(request):
|
|||
extension = ExtensionForm(request.POST or None)
|
||||
if extension.is_valid():
|
||||
extension.save()
|
||||
messages.success(request, "Cette extension a été ajoutée")
|
||||
messages.success(request, _("The extension was created."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'extensionform': extension, 'action_name': 'Créer'},
|
||||
{'extensionform': extension, 'action_name': _("Create an extension")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -685,10 +685,10 @@ def edit_extension(request, extension_instance, **_kwargs):
|
|||
if extension.is_valid():
|
||||
if extension.changed_data:
|
||||
extension.save()
|
||||
messages.success(request, "Extension modifiée")
|
||||
messages.success(request, _("The extension was edited."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'extensionform': extension, 'action_name': 'Editer'},
|
||||
{'extensionform': extension, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -704,17 +704,16 @@ def del_extension(request, instances):
|
|||
for extension_del in extension_dels:
|
||||
try:
|
||||
extension_del.delete()
|
||||
messages.success(request, "L'extension a été supprimée")
|
||||
messages.success(request, _("The extension was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("L'extension %s est affectée à au moins un type de "
|
||||
"machine, vous ne pouvez pas la supprimer"
|
||||
% extension_del)
|
||||
(_("The extension %s is assigned to at least one machine"
|
||||
" type, you can't delete it." % extension_del))
|
||||
)
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'extensionform': extension, 'action_name': 'Supprimer'},
|
||||
{'extensionform': extension, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -727,10 +726,10 @@ def add_soa(request):
|
|||
soa = SOAForm(request.POST or None)
|
||||
if soa.is_valid():
|
||||
soa.save()
|
||||
messages.success(request, "Cet enregistrement SOA a été ajouté")
|
||||
messages.success(request, _("The SOA record was created."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'soaform': soa, 'action_name': 'Créer'},
|
||||
{'soaform': soa, 'action_name': _("Create an SOA record")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -744,10 +743,10 @@ def edit_soa(request, soa_instance, **_kwargs):
|
|||
if soa.is_valid():
|
||||
if soa.changed_data:
|
||||
soa.save()
|
||||
messages.success(request, "SOA modifié")
|
||||
messages.success(request, _("The SOA record was edited."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'soaform': soa, 'action_name': 'Editer'},
|
||||
{'soaform': soa, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -763,16 +762,15 @@ def del_soa(request, instances):
|
|||
for soa_del in soa_dels:
|
||||
try:
|
||||
soa_del.delete()
|
||||
messages.success(request, "Le SOA a été supprimée")
|
||||
messages.success(request, _("The SOA record was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le SOA suivant %s ne peut être supprimé"
|
||||
% soa_del)
|
||||
(_("Error: the SOA record %s can't be deleted.") % soa_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'soaform': soa, 'action_name': 'Supprimer'},
|
||||
{'soaform': soa, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -785,10 +783,10 @@ def add_mx(request):
|
|||
mx = MxForm(request.POST or None)
|
||||
if mx.is_valid():
|
||||
mx.save()
|
||||
messages.success(request, "Cet enregistrement mx a été ajouté")
|
||||
messages.success(request, _("The MX record was created."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'mxform': mx, 'action_name': 'Créer'},
|
||||
{'mxform': mx, 'action_name': _("Create an MX record")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -802,10 +800,10 @@ def edit_mx(request, mx_instance, **_kwargs):
|
|||
if mx.is_valid():
|
||||
if mx.changed_data:
|
||||
mx.save()
|
||||
messages.success(request, "Mx modifié")
|
||||
messages.success(request, _("The MX record was edited."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'mxform': mx, 'action_name': 'Editer'},
|
||||
{'mxform': mx, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -821,16 +819,15 @@ def del_mx(request, instances):
|
|||
for mx_del in mx_dels:
|
||||
try:
|
||||
mx_del.delete()
|
||||
messages.success(request, "L'mx a été supprimée")
|
||||
messages.success(request, _("The MX record was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le Mx suivant %s ne peut être supprimé"
|
||||
% mx_del)
|
||||
(_("Error: the MX record %s can't be deleted.") % mx_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'mxform': mx, 'action_name': 'Supprimer'},
|
||||
{'mxform': mx, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -843,10 +840,10 @@ def add_ns(request):
|
|||
ns = NsForm(request.POST or None)
|
||||
if ns.is_valid():
|
||||
ns.save()
|
||||
messages.success(request, "Cet enregistrement ns a été ajouté")
|
||||
messages.success(request, _("The NS record was created."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'nsform': ns, 'action_name': 'Créer'},
|
||||
{'nsform': ns, 'action_name': _("Create an NS record")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -860,10 +857,10 @@ def edit_ns(request, ns_instance, **_kwargs):
|
|||
if ns.is_valid():
|
||||
if ns.changed_data:
|
||||
ns.save()
|
||||
messages.success(request, "Ns modifié")
|
||||
messages.success(request, _("The NS record was edited."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'nsform': ns, 'action_name': 'Editer'},
|
||||
{'nsform': ns, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -879,16 +876,15 @@ def del_ns(request, instances):
|
|||
for ns_del in ns_dels:
|
||||
try:
|
||||
ns_del.delete()
|
||||
messages.success(request, "Le ns a été supprimée")
|
||||
messages.success(request, _("The NS record was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le Ns suivant %s ne peut être supprimé"
|
||||
% ns_del)
|
||||
(_("Error: the NS record %s can't be deleted.") % ns_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'nsform': ns, 'action_name': 'Supprimer'},
|
||||
{'nsform': ns, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -900,10 +896,10 @@ def add_dname(request):
|
|||
dname = DNameForm(request.POST or None)
|
||||
if dname.is_valid():
|
||||
dname.save()
|
||||
messages.success(request, "This DNAME record has been added")
|
||||
messages.success(request, _("The DNAME record was created."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'dnameform': dname, 'action_name': "Create"},
|
||||
{'dnameform': dname, 'action_name': _("Create a DNAME record")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -917,10 +913,10 @@ def edit_dname(request, dname_instance, **_kwargs):
|
|||
if dname.is_valid():
|
||||
if dname.changed_data:
|
||||
dname.save()
|
||||
messages.success(request, "DName successfully edited")
|
||||
messages.success(request, _("The DNAME record was edited."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'dnameform': dname, 'action_name': "Edit"},
|
||||
{'dnameform': dname, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -936,16 +932,16 @@ def del_dname(request, instances):
|
|||
for dname_del in dname_dels:
|
||||
try:
|
||||
dname_del.delete()
|
||||
messages.success(request,
|
||||
"The DNAME %s has been deleted" % dname_del)
|
||||
messages.success(request, _("The DNAME record was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
"The DNAME %s can not be deleted" % dname_del
|
||||
request,
|
||||
_("Error: the DNAME record %s can't be deleted.")
|
||||
% dname_del
|
||||
)
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'dnameform': dname, 'action_name': 'Delete'},
|
||||
{'dnameform': dname, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -958,10 +954,10 @@ def add_txt(request):
|
|||
txt = TxtForm(request.POST or None)
|
||||
if txt.is_valid():
|
||||
txt.save()
|
||||
messages.success(request, "Cet enregistrement text a été ajouté")
|
||||
messages.success(request, _("The TXT record was created."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'txtform': txt, 'action_name': 'Créer'},
|
||||
{'txtform': txt, 'action_name': _("Create a TXT record")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -975,10 +971,10 @@ def edit_txt(request, txt_instance, **_kwargs):
|
|||
if txt.is_valid():
|
||||
if txt.changed_data:
|
||||
txt.save()
|
||||
messages.success(request, "Txt modifié")
|
||||
messages.success(request, _("The TXT record was edited."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'txtform': txt, 'action_name': 'Editer'},
|
||||
{'txtform': txt, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -994,16 +990,15 @@ def del_txt(request, instances):
|
|||
for txt_del in txt_dels:
|
||||
try:
|
||||
txt_del.delete()
|
||||
messages.success(request, "Le txt a été supprimé")
|
||||
messages.success(request, _("The TXT record was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le Txt suivant %s ne peut être supprimé"
|
||||
% txt_del)
|
||||
(_("Error: the TXT record %s can't be deleted.") % txt_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'txtform': txt, 'action_name': 'Supprimer'},
|
||||
{'txtform': txt, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1016,10 +1011,10 @@ def add_srv(request):
|
|||
srv = SrvForm(request.POST or None)
|
||||
if srv.is_valid():
|
||||
srv.save()
|
||||
messages.success(request, "Cet enregistrement srv a été ajouté")
|
||||
messages.success(request, _("The SRV record was created."))
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'srvform': srv, 'action_name': 'Créer'},
|
||||
{'srvform': srv, 'action_name': _("Create an SRV record")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1033,10 +1028,10 @@ def edit_srv(request, srv_instance, **_kwargs):
|
|||
if srv.is_valid():
|
||||
if srv.changed_data:
|
||||
srv.save()
|
||||
messages.success(request, "Srv modifié")
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
messages.success(request, _("The SRV record was edited."))
|
||||
return redirect(reverse('machines:1index-extension'))
|
||||
return form(
|
||||
{'srvform': srv, 'action_name': 'Editer'},
|
||||
{'srvform': srv, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1052,16 +1047,15 @@ def del_srv(request, instances):
|
|||
for srv_del in srv_dels:
|
||||
try:
|
||||
srv_del.delete()
|
||||
messages.success(request, "L'srv a été supprimée")
|
||||
messages.success(request, _("The SRV record was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le Srv suivant %s ne peut être supprimé"
|
||||
% srv_del)
|
||||
(_("Error: the SRV record %s can't be deleted.") % srv_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-extension'))
|
||||
return form(
|
||||
{'srvform': srv, 'action_name': 'Supprimer'},
|
||||
{'srvform': srv, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1077,13 +1071,13 @@ def add_alias(request, interface, interfaceid):
|
|||
alias = alias.save(commit=False)
|
||||
alias.cname = interface.domain
|
||||
alias.save()
|
||||
messages.success(request, "Cet alias a été ajouté")
|
||||
messages.success(request, _("The alias was created."))
|
||||
return redirect(reverse(
|
||||
'machines:index-alias',
|
||||
kwargs={'interfaceid': str(interfaceid)}
|
||||
))
|
||||
return form(
|
||||
{'aliasform': alias, 'action_name': 'Créer'},
|
||||
{'aliasform': alias, 'action_name': _("Create an alias")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1101,7 +1095,7 @@ def edit_alias(request, domain_instance, **_kwargs):
|
|||
if alias.is_valid():
|
||||
if alias.changed_data:
|
||||
domain_instance = alias.save()
|
||||
messages.success(request, "Alias modifié")
|
||||
messages.success(request, _("The alias was edited."))
|
||||
return redirect(reverse(
|
||||
'machines:index-alias',
|
||||
kwargs={
|
||||
|
@ -1109,7 +1103,7 @@ def edit_alias(request, domain_instance, **_kwargs):
|
|||
}
|
||||
))
|
||||
return form(
|
||||
{'aliasform': alias, 'action_name': 'Editer'},
|
||||
{'aliasform': alias, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1127,20 +1121,19 @@ def del_alias(request, interface, interfaceid):
|
|||
alias_del.delete()
|
||||
messages.success(
|
||||
request,
|
||||
"L'alias %s a été supprimé" % alias_del
|
||||
_("The alias %s was deleted.") % alias_del
|
||||
)
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur l'alias suivant %s ne peut être supprimé"
|
||||
% alias_del)
|
||||
(_("Error: the alias %s can't be deleted.") % alias_del)
|
||||
)
|
||||
return redirect(reverse(
|
||||
'machines:index-alias',
|
||||
kwargs={'interfaceid': str(interfaceid)}
|
||||
))
|
||||
return form(
|
||||
{'aliasform': alias, 'action_name': 'Supprimer'},
|
||||
{'aliasform': alias, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1153,10 +1146,10 @@ def add_role(request):
|
|||
role = RoleForm(request.POST or None)
|
||||
if role.is_valid():
|
||||
role.save()
|
||||
messages.success(request, "Cet enregistrement role a été ajouté")
|
||||
messages.success(request, _("The role was created."))
|
||||
return redirect(reverse('machines:index-role'))
|
||||
return form(
|
||||
{'roleform': role, 'action_name': 'Créer'},
|
||||
{'roleform': role, 'action_name': _("Create a role")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1170,10 +1163,10 @@ def edit_role(request, role_instance, **_kwargs):
|
|||
if role.is_valid():
|
||||
if role.changed_data:
|
||||
role.save()
|
||||
messages.success(request, _("Role updated"))
|
||||
messages.success(request, _("The role was edited."))
|
||||
return redirect(reverse('machines:index-role'))
|
||||
return form(
|
||||
{'roleform': role, 'action_name': _('Edit')},
|
||||
{'roleform': role, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1189,17 +1182,15 @@ def del_role(request, instances):
|
|||
for role_del in role_dels:
|
||||
try:
|
||||
role_del.delete()
|
||||
messages.success(request, _("The role has been deleted."))
|
||||
messages.success(request, _("The role was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
(_("Error: The following role cannot be deleted: %(role)")
|
||||
% {'role': role_del}
|
||||
)
|
||||
(_("Error: the role %s can't be deleted.") % role_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-role'))
|
||||
return form(
|
||||
{'roleform': role, 'action_name': _('Delete')},
|
||||
{'roleform': role, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1212,10 +1203,10 @@ def add_service(request):
|
|||
service = ServiceForm(request.POST or None)
|
||||
if service.is_valid():
|
||||
service.save()
|
||||
messages.success(request, "Cet enregistrement service a été ajouté")
|
||||
messages.success(request, _("The service was created."))
|
||||
return redirect(reverse('machines:index-service'))
|
||||
return form(
|
||||
{'serviceform': service, 'action_name': 'Créer'},
|
||||
{'serviceform': service, 'action_name': _("Create a service")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1229,10 +1220,10 @@ def edit_service(request, service_instance, **_kwargs):
|
|||
if service.is_valid():
|
||||
if service.changed_data:
|
||||
service.save()
|
||||
messages.success(request, "Service modifié")
|
||||
messages.success(request, _("The service was edited."))
|
||||
return redirect(reverse('machines:index-service'))
|
||||
return form(
|
||||
{'serviceform': service, 'action_name': 'Editer'},
|
||||
{'serviceform': service, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1248,16 +1239,15 @@ def del_service(request, instances):
|
|||
for service_del in service_dels:
|
||||
try:
|
||||
service_del.delete()
|
||||
messages.success(request, "Le service a été supprimée")
|
||||
messages.success(request, _("The service was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le service suivant %s ne peut être supprimé"
|
||||
% service_del)
|
||||
(_("Error: the service %s can't be deleted.") % service_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-service'))
|
||||
return form(
|
||||
{'serviceform': service, 'action_name': 'Supprimer'},
|
||||
{'serviceform': service, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1279,10 +1269,10 @@ def add_vlan(request):
|
|||
vlan = VlanForm(request.POST or None)
|
||||
if vlan.is_valid():
|
||||
vlan.save()
|
||||
messages.success(request, "Cet enregistrement vlan a été ajouté")
|
||||
messages.success(request, _("The VLAN was created."))
|
||||
return redirect(reverse('machines:index-vlan'))
|
||||
return form(
|
||||
{'vlanform': vlan, 'action_name': 'Créer'},
|
||||
{'vlanform': vlan, 'action_name': _("Create a VLAN")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1296,10 +1286,10 @@ def edit_vlan(request, vlan_instance, **_kwargs):
|
|||
if vlan.is_valid():
|
||||
if vlan.changed_data:
|
||||
vlan.save()
|
||||
messages.success(request, "Vlan modifié")
|
||||
messages.success(request, _("The VLAN was edited."))
|
||||
return redirect(reverse('machines:index-vlan'))
|
||||
return form(
|
||||
{'vlanform': vlan, 'action_name': 'Editer'},
|
||||
{'vlanform': vlan, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1315,16 +1305,15 @@ def del_vlan(request, instances):
|
|||
for vlan_del in vlan_dels:
|
||||
try:
|
||||
vlan_del.delete()
|
||||
messages.success(request, "Le vlan a été supprimée")
|
||||
messages.success(request, _("The VLAN was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le Vlan suivant %s ne peut être supprimé"
|
||||
% vlan_del)
|
||||
(_("Error: the VLAN %s can't be deleted.") % vlan_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-vlan'))
|
||||
return form(
|
||||
{'vlanform': vlan, 'action_name': 'Supprimer'},
|
||||
{'vlanform': vlan, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1337,10 +1326,10 @@ def add_nas(request):
|
|||
nas = NasForm(request.POST or None)
|
||||
if nas.is_valid():
|
||||
nas.save()
|
||||
messages.success(request, "Cet enregistrement nas a été ajouté")
|
||||
messages.success(request, _("The NAS device was created."))
|
||||
return redirect(reverse('machines:index-nas'))
|
||||
return form(
|
||||
{'nasform': nas, 'action_name': 'Créer'},
|
||||
{'nasform': nas, 'action_name': _("Create a NAS device")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1354,10 +1343,10 @@ def edit_nas(request, nas_instance, **_kwargs):
|
|||
if nas.is_valid():
|
||||
if nas.changed_data:
|
||||
nas.save()
|
||||
messages.success(request, "Nas modifié")
|
||||
messages.success(request, _("The NAS device was edited."))
|
||||
return redirect(reverse('machines:index-nas'))
|
||||
return form(
|
||||
{'nasform': nas, 'action_name': 'Editer'},
|
||||
{'nasform': nas, 'action_name': _("Edit")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1373,16 +1362,15 @@ def del_nas(request, instances):
|
|||
for nas_del in nas_dels:
|
||||
try:
|
||||
nas_del.delete()
|
||||
messages.success(request, "Le nas a été supprimé")
|
||||
messages.success(request, _("The NAS device was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Erreur le Nas suivant %s ne peut être supprimé"
|
||||
% nas_del)
|
||||
(_("Error: the NAS device %s can't be deleted.") % nas_del)
|
||||
)
|
||||
return redirect(reverse('machines:index-nas'))
|
||||
return form(
|
||||
{'nasform': nas, 'action_name': 'Supprimer'},
|
||||
{'nasform': nas, 'action_name': _("Delete")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1634,7 +1622,7 @@ def edit_portlist(request, ouvertureportlist_instance, **_kwargs):
|
|||
for port in instances:
|
||||
port.port_list = pl
|
||||
port.save()
|
||||
messages.success(request, "Liste de ports modifiée")
|
||||
messages.success(request, _("The ports list was edited."))
|
||||
return redirect(reverse('machines:index-portlist'))
|
||||
return form(
|
||||
{'port_list': port_list, 'ports': port_formset},
|
||||
|
@ -1648,7 +1636,7 @@ def edit_portlist(request, ouvertureportlist_instance, **_kwargs):
|
|||
def del_portlist(request, port_list_instance, **_kwargs):
|
||||
""" View used to delete a port policy """
|
||||
port_list_instance.delete()
|
||||
messages.success(request, "La liste de ports a été supprimée")
|
||||
messages.success(request, _("The ports list was deleted."))
|
||||
return redirect(reverse('machines:index-portlist'))
|
||||
|
||||
|
||||
|
@ -1673,7 +1661,7 @@ def add_portlist(request):
|
|||
for port in instances:
|
||||
port.port_list = pl
|
||||
port.save()
|
||||
messages.success(request, "Liste de ports créée")
|
||||
messages.success(request, _("The ports list was created."))
|
||||
return redirect(reverse('machines:index-portlist'))
|
||||
return form(
|
||||
{'port_list': port_list, 'ports': port_formset},
|
||||
|
@ -1691,8 +1679,8 @@ def configure_ports(request, interface_instance, **_kwargs):
|
|||
if not interface_instance.may_have_port_open():
|
||||
messages.error(
|
||||
request,
|
||||
("Attention, l'ipv4 n'est pas publique, l'ouverture n'aura pas "
|
||||
"d'effet en v4")
|
||||
(_("Warning: the IPv4 isn't public, the opening won't have effect"
|
||||
" in v4."))
|
||||
)
|
||||
interface = EditOuverturePortConfigForm(
|
||||
request.POST or None,
|
||||
|
@ -1701,10 +1689,11 @@ def configure_ports(request, interface_instance, **_kwargs):
|
|||
if interface.is_valid():
|
||||
if interface.changed_data:
|
||||
interface.save()
|
||||
messages.success(request, "Configuration des ports mise à jour.")
|
||||
messages.success(request, _("The ports configuration was edited."))
|
||||
return redirect(reverse('machines:index'))
|
||||
return form(
|
||||
{'interfaceform': interface, 'action_name': 'Editer la configuration'},
|
||||
{'interfaceform': interface, 'action_name': _("Edit the"
|
||||
" configuration")},
|
||||
'machines/machine.html',
|
||||
request
|
||||
)
|
||||
|
@ -1950,3 +1939,4 @@ def regen_achieved(request):
|
|||
if obj:
|
||||
obj.first().done_regen()
|
||||
return HttpResponse("Ok")
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
Here are defined some functions to check acl on the application.
|
||||
"""
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
|
||||
def can_view(user):
|
||||
|
@ -38,4 +39,6 @@ def can_view(user):
|
|||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_module_perms('preferences')
|
||||
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.")
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.forms import ModelForm, Form
|
||||
from django import forms
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from re2o.mixins import FormRevMixin
|
||||
from .models import (
|
||||
OptionalUser,
|
||||
|
@ -56,9 +56,13 @@ class EditOptionalUserForm(ModelForm):
|
|||
**kwargs
|
||||
)
|
||||
self.fields['is_tel_mandatory'].label = (
|
||||
'Exiger un numéro de téléphone'
|
||||
_("Telephone number required")
|
||||
)
|
||||
self.fields['self_adhesion'].label = 'Auto inscription'
|
||||
self.fields['gpg_fingerprint'].label = _("GPG fingerprint")
|
||||
self.fields['all_can_create_club'].label = _("All can create a club")
|
||||
self.fields['all_can_create_adherent'].label = _("All can create a member")
|
||||
self.fields['self_adhesion'].label = _("Self registration")
|
||||
self.fields['shell_default'].label = _("Default shell")
|
||||
|
||||
|
||||
class EditOptionalMachineForm(ModelForm):
|
||||
|
@ -74,12 +78,17 @@ class EditOptionalMachineForm(ModelForm):
|
|||
prefix=prefix,
|
||||
**kwargs
|
||||
)
|
||||
self.fields['password_machine'].label = "Possibilité d'attribuer\
|
||||
un mot de passe par interface"
|
||||
self.fields['max_lambdauser_interfaces'].label = "Maximum\
|
||||
d'interfaces autorisées pour un user normal"
|
||||
self.fields['max_lambdauser_aliases'].label = "Maximum d'alias\
|
||||
dns autorisés pour un user normal"
|
||||
self.fields['password_machine'].label = _("Possibility to set a"
|
||||
" password per machine")
|
||||
self.fields['max_lambdauser_interfaces'].label = _("Maximum number of"
|
||||
" interfaces"
|
||||
" allowed for a"
|
||||
" standard user")
|
||||
self.fields['max_lambdauser_aliases'].label = _("Maximum number of DNS"
|
||||
" aliases allowed for"
|
||||
" a standard user")
|
||||
self.fields['ipv6_mode'].label = _("IPv6 mode")
|
||||
self.fields['create_machine'].label = _("Can create a machine")
|
||||
|
||||
|
||||
class EditOptionalTopologieForm(ModelForm):
|
||||
|
@ -95,10 +104,11 @@ class EditOptionalTopologieForm(ModelForm):
|
|||
prefix=prefix,
|
||||
**kwargs
|
||||
)
|
||||
self.fields['vlan_decision_ok'].label = "Vlan où placer les\
|
||||
machines après acceptation RADIUS"
|
||||
self.fields['vlan_decision_nok'].label = "Vlan où placer les\
|
||||
machines après rejet RADIUS"
|
||||
self.fields['radius_general_policy'].label = _("RADIUS general policy")
|
||||
self.fields['vlan_decision_ok'].label = _("VLAN for machines accepted"
|
||||
" by RADIUS")
|
||||
self.fields['vlan_decision_nok'].label = _("VLAN for machines rejected"
|
||||
" by RADIUS")
|
||||
|
||||
|
||||
class EditGeneralOptionForm(ModelForm):
|
||||
|
@ -114,18 +124,25 @@ class EditGeneralOptionForm(ModelForm):
|
|||
prefix=prefix,
|
||||
**kwargs
|
||||
)
|
||||
self.fields['search_display_page'].label = 'Resultats\
|
||||
affichés dans une recherche'
|
||||
self.fields['pagination_number'].label = 'Items par page,\
|
||||
taille normale (ex users)'
|
||||
self.fields['pagination_large_number'].label = 'Items par page,\
|
||||
taille élevée (machines)'
|
||||
self.fields['req_expire_hrs'].label = 'Temps avant expiration du lien\
|
||||
de reinitialisation de mot de passe (en heures)'
|
||||
self.fields['site_name'].label = 'Nom du site web'
|
||||
self.fields['email_from'].label = "Adresse mail d\
|
||||
'expedition automatique"
|
||||
self.fields['GTU_sum_up'].label = "Résumé des CGU"
|
||||
self.fields['general_message'].label = _("General message")
|
||||
self.fields['search_display_page'].label = _("Number of results"
|
||||
" displayed when"
|
||||
" searching")
|
||||
self.fields['pagination_number'].label = _("Number of items per page,"
|
||||
" standard size (e.g."
|
||||
" users)")
|
||||
self.fields['pagination_large_number'].label = _("Number of items per"
|
||||
" page, large size"
|
||||
" (e.g. machines)")
|
||||
self.fields['req_expire_hrs'].label = _("Time before expiration of the"
|
||||
" reset password link (in"
|
||||
" hours)")
|
||||
self.fields['site_name'].label = _("Website name")
|
||||
self.fields['email_from'].label = _("Email address for automatic"
|
||||
" emailing")
|
||||
self.fields['GTU_sum_up'].label = _("Summary of the General Terms of"
|
||||
" Use")
|
||||
self.fields['GTU'].label = _("General Terms of Use")
|
||||
|
||||
|
||||
class EditAssoOptionForm(ModelForm):
|
||||
|
@ -141,15 +158,19 @@ class EditAssoOptionForm(ModelForm):
|
|||
prefix=prefix,
|
||||
**kwargs
|
||||
)
|
||||
self.fields['name'].label = 'Nom de l\'asso'
|
||||
self.fields['siret'].label = 'SIRET'
|
||||
self.fields['adresse1'].label = 'Adresse (ligne 1)'
|
||||
self.fields['adresse2'].label = 'Adresse (ligne 2)'
|
||||
self.fields['contact'].label = 'Email de contact'
|
||||
self.fields['telephone'].label = 'Numéro de téléphone'
|
||||
self.fields['pseudo'].label = 'Pseudo d\'usage'
|
||||
self.fields['utilisateur_asso'].label = 'Compte utilisé pour\
|
||||
faire les modifications depuis /admin'
|
||||
self.fields['name'].label = _("Organisation name")
|
||||
self.fields['siret'].label = _("SIRET number")
|
||||
self.fields['adresse1'].label = _("Address (line 1)")
|
||||
self.fields['adresse2'].label = _("Address (line 2)")
|
||||
self.fields['contact'].label = _("Contact email address")
|
||||
self.fields['telephone'].label = _("Telephone number")
|
||||
self.fields['pseudo'].label = _("Usual name")
|
||||
self.fields['utilisateur_asso'].label = _("Account used for editing"
|
||||
" from /admin")
|
||||
self.fields['payment'].label = _("Payment")
|
||||
self.fields['payment_id'].label = _("Payment ID")
|
||||
self.fields['payment_pass'].label = _("Payment password")
|
||||
self.fields['description'].label = _("Description")
|
||||
|
||||
|
||||
class EditMailMessageOptionForm(ModelForm):
|
||||
|
@ -165,10 +186,10 @@ class EditMailMessageOptionForm(ModelForm):
|
|||
prefix=prefix,
|
||||
**kwargs
|
||||
)
|
||||
self.fields['welcome_mail_fr'].label = 'Message dans le\
|
||||
mail de bienvenue en français'
|
||||
self.fields['welcome_mail_en'].label = 'Message dans le\
|
||||
mail de bienvenue en anglais'
|
||||
self.fields['welcome_mail_fr'].label = _("Message for the French"
|
||||
" welcome email")
|
||||
self.fields['welcome_mail_en'].label = _("Message for the English"
|
||||
" welcome email")
|
||||
|
||||
|
||||
class EditHomeOptionForm(ModelForm):
|
||||
|
@ -184,6 +205,9 @@ class EditHomeOptionForm(ModelForm):
|
|||
prefix=prefix,
|
||||
**kwargs
|
||||
)
|
||||
self.fields['facebook_url'].label = _("Facebook URL")
|
||||
self.fields['twitter_url'].label = _("Twitter URL")
|
||||
self.fields['twitter_account_name'].label = _("Twitter account name")
|
||||
|
||||
|
||||
class ServiceForm(ModelForm):
|
||||
|
@ -195,13 +219,17 @@ class ServiceForm(ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
super(ServiceForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||
self.fields['name'].label = _("Name")
|
||||
self.fields['url'].label = _("URL")
|
||||
self.fields['description'].label = _("Description")
|
||||
self.fields['image'].label = _("Image")
|
||||
|
||||
|
||||
class DelServiceForm(Form):
|
||||
"""Suppression de services sur la page d'accueil"""
|
||||
services = forms.ModelMultipleChoiceField(
|
||||
queryset=Service.objects.none(),
|
||||
label="Enregistrements service actuels",
|
||||
label=_("Current services"),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
|
@ -239,3 +267,4 @@ class DelMailContactForm(Form):
|
|||
self.fields['mailcontacts'].queryset = instances
|
||||
else:
|
||||
self.fields['mailcontacts'].queryset = MailContact.objects.all()
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,70 +1,609 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# 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.
|
||||
#
|
||||
#, fuzzy
|
||||
# Copyright © 2018 Maël Kervella
|
||||
#
|
||||
# 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.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Project-Id-Version: 2.5\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-26 21:49+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: \n"
|
||||
"POT-Creation-Date: 2018-08-18 13:26+0200\n"
|
||||
"PO-Revision-Date: 2018-06-24 15:54+0200\n"
|
||||
"Last-Translator: Laouen Fernet <laouen.fernet@supelec.fr>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr_FR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: models.py:256
|
||||
msgid "Contact email adress"
|
||||
msgstr "Adresse email de contact"
|
||||
#: acl.py:42
|
||||
msgid "You don't have the right to view this application."
|
||||
msgstr "Vous n'avez pas le droit de voir cette application."
|
||||
|
||||
#: models.py:263
|
||||
msgid "Description of the associated email adress."
|
||||
#: forms.py:59 templates/preferences/display_preferences.html:41
|
||||
msgid "Telephone number required"
|
||||
msgstr "Numéro de téléphone requis"
|
||||
|
||||
#: forms.py:61
|
||||
msgid "GPG fingerprint"
|
||||
msgstr "Empreinte GPG"
|
||||
|
||||
#: forms.py:62
|
||||
msgid "All can create a club"
|
||||
msgstr "Tous peuvent créer un club"
|
||||
|
||||
#: forms.py:63
|
||||
msgid "All can create a member"
|
||||
msgstr "Tous peuvent créer un adhérent"
|
||||
|
||||
#: forms.py:64 templates/preferences/display_preferences.html:43
|
||||
msgid "Self registration"
|
||||
msgstr "Autoinscription"
|
||||
|
||||
#: forms.py:65
|
||||
msgid "Default shell"
|
||||
msgstr "Interface système par défaut"
|
||||
|
||||
#: forms.py:81
|
||||
msgid "Possibility to set a password per machine"
|
||||
msgstr "Possibilité de mettre un mot de passe par machine"
|
||||
|
||||
#: forms.py:83 templates/preferences/display_preferences.html:87
|
||||
msgid "Maximum number of interfaces allowed for a standard user"
|
||||
msgstr "Nombre maximum d'interfaces autorisé pour un utilisateur standard"
|
||||
|
||||
#: forms.py:87 templates/preferences/display_preferences.html:91
|
||||
msgid "Maximum number of DNS aliases allowed for a standard user"
|
||||
msgstr "Nombre maximum d'alias DNS autorisé pour un utilisateur standard"
|
||||
|
||||
#: forms.py:90
|
||||
msgid "IPv6 mode"
|
||||
msgstr "Mode IPv6"
|
||||
|
||||
#: forms.py:91
|
||||
msgid "Can create a machine"
|
||||
msgstr "Peut créer une machine"
|
||||
|
||||
#: forms.py:107
|
||||
msgid "RADIUS general policy"
|
||||
msgstr "Politique générale de RADIUS"
|
||||
|
||||
#: forms.py:108 templates/preferences/display_preferences.html:116
|
||||
msgid "VLAN for machines accepted by RADIUS"
|
||||
msgstr "VLAN pour les machines acceptées par RADIUS"
|
||||
|
||||
#: forms.py:110 templates/preferences/display_preferences.html:118
|
||||
msgid "VLAN for machines rejected by RADIUS"
|
||||
msgstr "VLAN pour les machines rejetées par RADIUS"
|
||||
|
||||
#: forms.py:127
|
||||
msgid "General message"
|
||||
msgstr "Message général"
|
||||
|
||||
#: forms.py:128 templates/preferences/display_preferences.html:137
|
||||
msgid "Number of results displayed when searching"
|
||||
msgstr "Nombre de résultats affichés lors de la recherche"
|
||||
|
||||
#: forms.py:131
|
||||
msgid "Number of items per page, standard size (e.g. users)"
|
||||
msgstr "Nombre d'éléments par page, taille standard (ex : utilisateurs)"
|
||||
|
||||
#: forms.py:134
|
||||
msgid "Number of items per page, large size (e.g. machines)"
|
||||
msgstr "Nombre d'éléments par page, taille importante (ex : machines)"
|
||||
|
||||
#: forms.py:137 templates/preferences/display_preferences.html:145
|
||||
msgid "Time before expiration of the reset password link (in hours)"
|
||||
msgstr ""
|
||||
"Temps avant expiration du lien de réinitialisation de mot de passe (en "
|
||||
"heures)"
|
||||
|
||||
#: forms.py:140 templates/preferences/display_preferences.html:131
|
||||
msgid "Website name"
|
||||
msgstr "Nom du site"
|
||||
|
||||
#: forms.py:141 templates/preferences/display_preferences.html:133
|
||||
msgid "Email address for automatic emailing"
|
||||
msgstr "Adresse mail pour les mails automatiques"
|
||||
|
||||
#: forms.py:143 templates/preferences/display_preferences.html:151
|
||||
msgid "Summary of the General Terms of Use"
|
||||
msgstr "Résumé des Conditions Générales d'Utilisation"
|
||||
|
||||
#: forms.py:145 templates/preferences/display_preferences.html:155
|
||||
msgid "General Terms of Use"
|
||||
msgstr "Conditions Générales d'Utilisation"
|
||||
|
||||
#: forms.py:161
|
||||
msgid "Organisation name"
|
||||
msgstr "Nom de l'association"
|
||||
|
||||
#: forms.py:162 templates/preferences/display_preferences.html:170
|
||||
msgid "SIRET number"
|
||||
msgstr "Numéro SIRET"
|
||||
|
||||
#: forms.py:163
|
||||
msgid "Address (line 1)"
|
||||
msgstr "Adresse (ligne 1)"
|
||||
|
||||
#: forms.py:164
|
||||
msgid "Address (line 2)"
|
||||
msgstr "Adresse (ligne 2)"
|
||||
|
||||
#: forms.py:165 models.py:288
|
||||
#: templates/preferences/display_preferences.html:178
|
||||
msgid "Contact email address"
|
||||
msgstr "Adresse mail de contact"
|
||||
|
||||
#: forms.py:166 templates/preferences/display_preferences.html:182
|
||||
msgid "Telephone number"
|
||||
msgstr "Numéro de téléphone"
|
||||
|
||||
#: forms.py:167 templates/preferences/display_preferences.html:184
|
||||
msgid "Usual name"
|
||||
msgstr "Nom d'usage"
|
||||
|
||||
#: forms.py:168
|
||||
msgid "Account used for editing from /admin"
|
||||
msgstr "Compte utilisé pour les modifications depuis /admin"
|
||||
|
||||
#: forms.py:170
|
||||
msgid "Payment"
|
||||
msgstr "Paiement"
|
||||
|
||||
#: forms.py:171
|
||||
msgid "Payment ID"
|
||||
msgstr "ID de paiement"
|
||||
|
||||
#: forms.py:172
|
||||
msgid "Payment password"
|
||||
msgstr "Mot de passe de paiement"
|
||||
|
||||
#: forms.py:173 forms.py:224 templates/preferences/aff_service.html:33
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
#: forms.py:189
|
||||
msgid "Message for the French welcome email"
|
||||
msgstr "Message pour le mail de bienvenue en français"
|
||||
|
||||
#: forms.py:191
|
||||
msgid "Message for the English welcome email"
|
||||
msgstr "Message pour le mail de bienvenue en anglais"
|
||||
|
||||
#: forms.py:208
|
||||
msgid "Facebook URL"
|
||||
msgstr "URL du compte Facebook"
|
||||
|
||||
#: forms.py:209
|
||||
msgid "Twitter URL"
|
||||
msgstr "URL du compte Twitter"
|
||||
|
||||
#: forms.py:210 templates/preferences/display_preferences.html:233
|
||||
msgid "Twitter account name"
|
||||
msgstr "Nom du compte Twitter"
|
||||
|
||||
#: forms.py:222 templates/preferences/aff_service.html:31
|
||||
#: templates/preferences/display_preferences.html:168
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: forms.py:223 templates/preferences/aff_service.html:32
|
||||
msgid "URL"
|
||||
msgstr "URL"
|
||||
|
||||
#: forms.py:225 templates/preferences/aff_service.html:34
|
||||
msgid "Image"
|
||||
msgstr "Image"
|
||||
|
||||
#: forms.py:232
|
||||
msgid "Current services"
|
||||
msgstr "Services actuels"
|
||||
|
||||
#: models.py:71
|
||||
msgid "Users can create a club"
|
||||
msgstr "Les utilisateurs peuvent créer un club"
|
||||
|
||||
#: models.py:75
|
||||
msgid "Users can create a member"
|
||||
msgstr "Les utilisateurs peuvent créer un adhérent"
|
||||
|
||||
#: models.py:79
|
||||
msgid "A new user can create their account on Re2o"
|
||||
msgstr "Un nouvel utilisateur peut créer son compte sur Re2o"
|
||||
|
||||
#: models.py:89 templates/preferences/display_preferences.html:49
|
||||
msgid "Users can edit their shell"
|
||||
msgstr "Les utilisateurs peuvent modifier leur interface système"
|
||||
|
||||
#: models.py:93
|
||||
msgid "Enable local email accounts for users"
|
||||
msgstr "Active les comptes mail locaux pour les utilisateurs"
|
||||
|
||||
#: models.py:98
|
||||
msgid "Domain to use for local email accounts"
|
||||
msgstr "Domaine à utiliser pour les comptes mail locaux"
|
||||
|
||||
#: models.py:102
|
||||
msgid "Maximum number of local email addresses for a standard user"
|
||||
msgstr ""
|
||||
"Nombre maximum d'adresses mail locales autorisé pour un utilisateur standard"
|
||||
|
||||
#: models.py:108
|
||||
msgid "Can view the user options"
|
||||
msgstr "Peut voir les options d'utilisateur"
|
||||
|
||||
#: models.py:110
|
||||
msgid "user options"
|
||||
msgstr "options d'utilisateur"
|
||||
|
||||
#: models.py:117
|
||||
msgid "Email domain must begin with @"
|
||||
msgstr "Un domaine mail doit commencer par @"
|
||||
|
||||
#: models.py:135
|
||||
msgid "Autoconfiguration by RA"
|
||||
msgstr "Configuration automatique par RA"
|
||||
|
||||
#: models.py:136
|
||||
msgid "IP addresses assigning by DHCPv6"
|
||||
msgstr "Attribution d'adresses IP par DHCPv6"
|
||||
|
||||
#: models.py:137
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
#: models.py:159
|
||||
msgid "Can view the machine options"
|
||||
msgstr "Peut voir les options de machine"
|
||||
|
||||
#: models.py:161
|
||||
msgid "machine options"
|
||||
msgstr "options de machine"
|
||||
|
||||
#: models.py:180
|
||||
msgid "On the IP range's VLAN of the machine"
|
||||
msgstr "Sur le VLAN de la plage d'IP de la machine"
|
||||
|
||||
#: models.py:181
|
||||
msgid "Preset in 'VLAN for machines accepted by RADIUS'"
|
||||
msgstr "Prédéfinie dans 'VLAN pour les machines acceptées par RADIUS'"
|
||||
|
||||
#: models.py:206
|
||||
msgid "Can view the topology options"
|
||||
msgstr "Peut voir les options de topologie"
|
||||
|
||||
#: models.py:208
|
||||
msgid "topology options"
|
||||
msgstr "options de topologie"
|
||||
|
||||
#: models.py:225
|
||||
msgid ""
|
||||
"General message displayed on the French version of the website (e.g. in case "
|
||||
"of maintenance)"
|
||||
msgstr ""
|
||||
"Message général affiché sur la version française du site (ex : en cas de "
|
||||
"maintenance)"
|
||||
|
||||
#: models.py:231
|
||||
msgid ""
|
||||
"General message displayed on the English version of the website (e.g. in "
|
||||
"case of maintenance)"
|
||||
msgstr ""
|
||||
"Message général affiché sur la version anglaise du site (ex : en cas de "
|
||||
"maintenance)"
|
||||
|
||||
#: models.py:253
|
||||
msgid "Can view the general options"
|
||||
msgstr "Peut voir les options générales"
|
||||
|
||||
#: models.py:255
|
||||
msgid "general options"
|
||||
msgstr "options générales"
|
||||
|
||||
#: models.py:275
|
||||
msgid "Can view the service options"
|
||||
msgstr "Peut voir les options de service"
|
||||
|
||||
#: models.py:277
|
||||
msgid "service"
|
||||
msgstr "service"
|
||||
|
||||
#: models.py:278
|
||||
msgid "services"
|
||||
msgstr "services"
|
||||
|
||||
#: models.py:295
|
||||
msgid "Description of the associated email address."
|
||||
msgstr "Description de l'adresse mail associée."
|
||||
|
||||
#: models.py:273
|
||||
msgid "Can see contact email"
|
||||
msgstr "Peut voir un mail de contact"
|
||||
#: models.py:305
|
||||
msgid "Can view a contact email address object"
|
||||
msgstr "Peut voir un objet adresse mail de contact"
|
||||
|
||||
#: templates/preferences/aff_mailcontact.html:30
|
||||
msgid "Adress"
|
||||
msgstr "Adresse"
|
||||
#: models.py:307
|
||||
msgid "contact email address"
|
||||
msgstr "adresse mail de contact"
|
||||
|
||||
#: models.py:308
|
||||
msgid "contact email addresses"
|
||||
msgstr "adresses mail de contact"
|
||||
|
||||
#: models.py:318
|
||||
msgid "Networking organisation school Something"
|
||||
msgstr "Association de réseau de l'école Machin"
|
||||
|
||||
#: models.py:322
|
||||
msgid "Threadneedle Street"
|
||||
msgstr "1 rue de la Vrillière"
|
||||
|
||||
#: models.py:323
|
||||
msgid "London EC2R 8AH"
|
||||
msgstr "75001 Paris"
|
||||
|
||||
#: models.py:326
|
||||
msgid "Organisation"
|
||||
msgstr "Association"
|
||||
|
||||
#: models.py:340
|
||||
msgid "Can view the organisation options"
|
||||
msgstr "Peut voir les options d'association"
|
||||
|
||||
#: models.py:342
|
||||
msgid "organisation options"
|
||||
msgstr "options d'association"
|
||||
|
||||
#: models.py:371
|
||||
msgid "Can view the homepage options"
|
||||
msgstr "Peut voir les options de page d'accueil"
|
||||
|
||||
#: models.py:373
|
||||
msgid "homepage options"
|
||||
msgstr "options de page d'accueil"
|
||||
|
||||
#: models.py:391
|
||||
msgid "Can view the email message options"
|
||||
msgstr "Peut voir les options de message pour les mails"
|
||||
|
||||
#: models.py:394
|
||||
msgid "email message options"
|
||||
msgstr "options de messages pour les mails"
|
||||
|
||||
#: templates/preferences/aff_mailcontact.html:31
|
||||
msgid "Remark"
|
||||
#: templates/preferences/display_preferences.html:174
|
||||
msgid "Address"
|
||||
msgstr "Adresse"
|
||||
|
||||
#: templates/preferences/aff_mailcontact.html:32
|
||||
msgid "Comment"
|
||||
msgstr "Commentaire"
|
||||
|
||||
#: templates/preferences/display_preferences.html:205
|
||||
msgid "Contact email adresses list"
|
||||
msgstr "Liste des adresses email de contact"
|
||||
#: templates/preferences/display_preferences.html:31
|
||||
#: templates/preferences/edit_preferences.html:30
|
||||
#: templates/preferences/preferences.html:29
|
||||
msgid "Preferences"
|
||||
msgstr "Préférences"
|
||||
|
||||
#: templates/preferences/display_preferences.html:34
|
||||
msgid "User preferences"
|
||||
msgstr "Préférences d'utilisateur"
|
||||
|
||||
#: templates/preferences/display_preferences.html:37
|
||||
#: templates/preferences/display_preferences.html:79
|
||||
#: templates/preferences/display_preferences.html:104
|
||||
#: templates/preferences/display_preferences.html:125
|
||||
#: templates/preferences/display_preferences.html:162
|
||||
#: templates/preferences/display_preferences.html:197
|
||||
#: templates/preferences/display_preferences.html:219
|
||||
#: templates/preferences/edit_preferences.html:40 views.py:170 views.py:234
|
||||
msgid "Edit"
|
||||
msgstr "Modifier"
|
||||
|
||||
#: templates/preferences/display_preferences.html:47
|
||||
msgid "Default shell for users"
|
||||
msgstr "Interface système par défaut pour les utilisateurs"
|
||||
|
||||
#: templates/preferences/display_preferences.html:53
|
||||
msgid "Creation of members by everyone"
|
||||
msgstr "Création d'adhérents par tous"
|
||||
|
||||
#: templates/preferences/display_preferences.html:55
|
||||
msgid "Creation of clubs by everyone"
|
||||
msgstr "Création de clubs par tous"
|
||||
|
||||
#: templates/preferences/display_preferences.html:59
|
||||
msgid "GPG fingerprint field"
|
||||
msgstr "Champ empreinte GPG"
|
||||
|
||||
#: templates/preferences/display_preferences.html:63
|
||||
msgid "Email accounts preferences"
|
||||
msgstr "Préférences de comptes mail"
|
||||
|
||||
#: templates/preferences/display_preferences.html:66
|
||||
msgid "Local email accounts enabled"
|
||||
msgstr "Comptes mail locaux activés"
|
||||
|
||||
#: templates/preferences/display_preferences.html:68
|
||||
msgid "Local email domain"
|
||||
msgstr "Domaine de mail local"
|
||||
|
||||
#: templates/preferences/display_preferences.html:72
|
||||
msgid "Maximum number of email aliases allowed"
|
||||
msgstr "Nombre maximum d'alias mail autorisé pour un utilisateur standard"
|
||||
|
||||
#: templates/preferences/display_preferences.html:76
|
||||
msgid "Machines preferences"
|
||||
msgstr "Préférences de machines"
|
||||
|
||||
#: templates/preferences/display_preferences.html:85
|
||||
msgid "Password per machine"
|
||||
msgstr "Mot de passe par machine"
|
||||
|
||||
#: templates/preferences/display_preferences.html:93
|
||||
msgid "IPv6 support"
|
||||
msgstr "Support de l'IPv6"
|
||||
|
||||
#: templates/preferences/display_preferences.html:97
|
||||
msgid "Creation of machines"
|
||||
msgstr "Création de machines"
|
||||
|
||||
#: templates/preferences/display_preferences.html:101
|
||||
msgid "Topology preferences"
|
||||
msgstr "Préférences de topologie"
|
||||
|
||||
#: templates/preferences/display_preferences.html:110
|
||||
msgid "General policy for VLAN setting"
|
||||
msgstr "Politique générale pour le placement sur un VLAN"
|
||||
|
||||
#: templates/preferences/display_preferences.html:112
|
||||
msgid ""
|
||||
"This setting defines the VLAN policy after acceptance by RADIUS: either on "
|
||||
"the IP range's VLAN of the machine, or a VLAN preset in 'VLAN for machines "
|
||||
"accepted by RADIUS'"
|
||||
msgstr ""
|
||||
"Ce réglage définit la politique de placement sur un VLAN après acceptation "
|
||||
"par RADIUS: soit sur le VLAN de la plage d'IP de la machine, soit sur le "
|
||||
"VLAN prédéfini dans 'VLAN pour les machines acceptées par RADIUS'"
|
||||
|
||||
#: templates/preferences/display_preferences.html:122
|
||||
msgid "General preferences"
|
||||
msgstr "Préférences générales"
|
||||
|
||||
#: templates/preferences/display_preferences.html:139
|
||||
msgid "Number of items per page (standard size)"
|
||||
msgstr "Nombre d'éléments par page (taille standard)"
|
||||
|
||||
#: templates/preferences/display_preferences.html:143
|
||||
msgid "Number of items per page (large size)"
|
||||
msgstr "Nombre d'éléments par page (taille importante)"
|
||||
|
||||
#: templates/preferences/display_preferences.html:149
|
||||
msgid "General message displayed on the website"
|
||||
msgstr "Message général affiché sur le site"
|
||||
|
||||
#: templates/preferences/display_preferences.html:159
|
||||
msgid "Information about the organisation"
|
||||
msgstr "Informations sur l'association"
|
||||
|
||||
#: templates/preferences/display_preferences.html:188
|
||||
msgid "User object of the organisation"
|
||||
msgstr "Objet utilisateur de l'association"
|
||||
|
||||
#: templates/preferences/display_preferences.html:190
|
||||
msgid "Description of the organisation"
|
||||
msgstr "Description de l'association"
|
||||
|
||||
#: templates/preferences/display_preferences.html:194
|
||||
msgid "Custom email message"
|
||||
msgstr "Message personnalisé pour les mails"
|
||||
|
||||
#: templates/preferences/display_preferences.html:203
|
||||
msgid "Welcome email (in French)"
|
||||
msgstr "Mail de bienvenue (en français)"
|
||||
|
||||
#: templates/preferences/display_preferences.html:207
|
||||
msgid "Add an adress"
|
||||
msgid "Welcome email (in English)"
|
||||
msgstr "Mail de bienvenue (en anglais)"
|
||||
|
||||
#: templates/preferences/display_preferences.html:211
|
||||
msgid "List of services and homepage preferences"
|
||||
msgstr "Liste des services et préférences de page d'accueil"
|
||||
|
||||
#: templates/preferences/display_preferences.html:213
|
||||
msgid " Add a service"
|
||||
msgstr " Ajouter un service"
|
||||
|
||||
#: templates/preferences/display_preferences.html:215
|
||||
msgid " Delete one or several services"
|
||||
msgstr " Supprimer un ou plusieurs services"
|
||||
|
||||
#: templates/preferences/display_preferences.html:221
|
||||
msgid "List of contact email addresses"
|
||||
msgstr "Liste des adresses mail de contact"
|
||||
|
||||
#: templates/preferences/display_preferences.html:223
|
||||
msgid "Add an address"
|
||||
msgstr "Ajouter une adresse"
|
||||
|
||||
#: templates/preferences/display_preferences.html:209
|
||||
msgid "Delete one or multiple adresses"
|
||||
msgstr "Supprimer une ou plusieurs adresses"
|
||||
#: templates/preferences/display_preferences.html:225
|
||||
msgid "Delete one or several addresses"
|
||||
msgstr " Supprimer une ou plusieurs adresses"
|
||||
|
||||
#: views.py:210
|
||||
msgid "The adress was created."
|
||||
msgstr "L'adresse a été créée."
|
||||
#: templates/preferences/display_preferences.html:231
|
||||
msgid "Twitter account URL"
|
||||
msgstr "URL du compte Twitter"
|
||||
|
||||
#: views.py:230
|
||||
msgid "Email adress updated."
|
||||
msgstr "L'adresse email a été mise à jour."
|
||||
#: templates/preferences/display_preferences.html:237
|
||||
msgid "Facebook account URL"
|
||||
msgstr "URL du compte Facebook"
|
||||
|
||||
#: views.py:233
|
||||
msgid "Edit"
|
||||
msgstr "Éditer"
|
||||
#: templates/preferences/edit_preferences.html:35
|
||||
msgid "Editing of preferences"
|
||||
msgstr "Modification des préférences"
|
||||
|
||||
#: views.py:251
|
||||
msgid "The email adress was deleted."
|
||||
msgstr "L'adresse email a été supprimée."
|
||||
#: views.py:98
|
||||
msgid "Unknown object"
|
||||
msgstr "Objet inconnu"
|
||||
|
||||
#: views.py:254
|
||||
#: views.py:104
|
||||
msgid "You don't have the right to edit this option."
|
||||
msgstr "Vous n'avez pas le droit de modifier cette option."
|
||||
|
||||
#: views.py:121
|
||||
msgid "The preferences were edited."
|
||||
msgstr "Les préférences ont été modifiées."
|
||||
|
||||
#: views.py:140
|
||||
msgid "The service was added."
|
||||
msgstr "Le service a été ajouté."
|
||||
|
||||
#: views.py:143
|
||||
msgid "Add a service"
|
||||
msgstr " Ajouter un service"
|
||||
|
||||
#: views.py:167
|
||||
msgid "The service was edited."
|
||||
msgstr "Le service a été modifié."
|
||||
|
||||
#: views.py:188
|
||||
msgid "The service was deleted."
|
||||
msgstr "Le service a été supprimé."
|
||||
|
||||
#: views.py:190
|
||||
#, python-format
|
||||
msgid "Error: the service %s can't be deleted."
|
||||
msgstr "Erreur : le service %s ne peut pas être supprimé."
|
||||
|
||||
#: views.py:194 views.py:256
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#: views.py:210
|
||||
msgid "The contact email address was created."
|
||||
msgstr "L'adresse mail de contact a été supprimée."
|
||||
|
||||
#: views.py:214
|
||||
msgid "Add a contact email address"
|
||||
msgstr "Ajouter une adresse mail de contact"
|
||||
|
||||
#: views.py:231
|
||||
msgid "The contact email address was edited."
|
||||
msgstr "L'adresse mail de contact a été modifiée."
|
||||
|
||||
#: views.py:253
|
||||
msgid "The contact email adress was deleted."
|
||||
msgstr "L'adresse mail de contact a été supprimée."
|
||||
|
|
146
preferences/migrations/0050_auto_20180818_1329.py
Normal file
146
preferences/migrations/0050_auto_20180818_1329.py
Normal file
|
@ -0,0 +1,146 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2018-08-18 11:29
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('preferences', '0049_optionaluser_self_change_shell'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='assooption',
|
||||
options={'permissions': (('view_assooption', 'Can view the organisation options'),), 'verbose_name': 'organisation options'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='generaloption',
|
||||
options={'permissions': (('view_generaloption', 'Can view the general options'),), 'verbose_name': 'general options'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='homeoption',
|
||||
options={'permissions': (('view_homeoption', 'Can view the homepage options'),), 'verbose_name': 'homepage options'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='mailcontact',
|
||||
options={'permissions': (('view_mailcontact', 'Can view a contact email address object'),), 'verbose_name': 'contact email address', 'verbose_name_plural': 'contact email addresses'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='mailmessageoption',
|
||||
options={'permissions': (('view_mailmessageoption', 'Can view the email message options'),), 'verbose_name': 'email message options'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='optionalmachine',
|
||||
options={'permissions': (('view_optionalmachine', 'Can view the machine options'),), 'verbose_name': 'machine options'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='optionaltopologie',
|
||||
options={'permissions': (('view_optionaltopologie', 'Can view the topology options'),), 'verbose_name': 'topology options'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='optionaluser',
|
||||
options={'permissions': (('view_optionaluser', 'Can view the user options'),), 'verbose_name': 'user options'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='service',
|
||||
options={'permissions': (('view_service', 'Can view the service options'),), 'verbose_name': 'service', 'verbose_name_plural': 'services'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='assooption',
|
||||
name='adresse1',
|
||||
field=models.CharField(default='Threadneedle Street', max_length=128),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='assooption',
|
||||
name='adresse2',
|
||||
field=models.CharField(default='London EC2R 8AH', max_length=128),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='assooption',
|
||||
name='name',
|
||||
field=models.CharField(default='Networking organisation school Something', max_length=256),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='assooption',
|
||||
name='pseudo',
|
||||
field=models.CharField(default='Organisation', max_length=32),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='generaloption',
|
||||
name='general_message_en',
|
||||
field=models.TextField(blank=True, default='', help_text='General message displayed on the English version of the website (e.g. in case of maintenance)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='generaloption',
|
||||
name='general_message_fr',
|
||||
field=models.TextField(blank=True, default='', help_text='General message displayed on the French version of the website (e.g. in case of maintenance)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='homeoption',
|
||||
name='facebook_url',
|
||||
field=models.URLField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='homeoption',
|
||||
name='twitter_account_name',
|
||||
field=models.CharField(blank=True, max_length=32, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='homeoption',
|
||||
name='twitter_url',
|
||||
field=models.URLField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='mailcontact',
|
||||
name='address',
|
||||
field=models.EmailField(default='contact@example.org', help_text='Contact email address', max_length=254),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='mailcontact',
|
||||
name='commentary',
|
||||
field=models.CharField(blank=True, help_text='Description of the associated email address.', max_length=256, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionalmachine',
|
||||
name='create_machine',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionalmachine',
|
||||
name='ipv6_mode',
|
||||
field=models.CharField(choices=[('SLAAC', 'Autoconfiguration by RA'), ('DHCPV6', 'IP addresses assigning by DHCPv6'), ('DISABLED', 'Disabled')], default='DISABLED', max_length=32),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionaltopologie',
|
||||
name='radius_general_policy',
|
||||
field=models.CharField(choices=[('MACHINE', "On the IP range's VLAN of the machine"), ('DEFINED', "Preset in 'VLAN for machines accepted by RADIUS'")], default='DEFINED', max_length=32),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionaluser',
|
||||
name='all_can_create_adherent',
|
||||
field=models.BooleanField(default=False, help_text='Users can create a member'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionaluser',
|
||||
name='all_can_create_club',
|
||||
field=models.BooleanField(default=False, help_text='Users can create a club'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionaluser',
|
||||
name='max_email_address',
|
||||
field=models.IntegerField(default=15, help_text='Maximum number of local email addresses for a standard user'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionaluser',
|
||||
name='self_adhesion',
|
||||
field=models.BooleanField(default=False, help_text='A new user can create their account on Re2o'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='optionaluser',
|
||||
name='self_change_shell',
|
||||
field=models.BooleanField(default=False, help_text='Users can edit their shell'),
|
||||
),
|
||||
]
|
|
@ -63,21 +63,20 @@ class PreferencesModel(models.Model):
|
|||
class OptionalUser(AclMixin, PreferencesModel):
|
||||
"""Options pour l'user : obligation ou nom du telephone,
|
||||
activation ou non du solde, autorisation du negatif, fingerprint etc"""
|
||||
PRETTY_NAME = "Options utilisateur"
|
||||
|
||||
is_tel_mandatory = models.BooleanField(default=True)
|
||||
gpg_fingerprint = models.BooleanField(default=True)
|
||||
all_can_create_club = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Les users peuvent créer un club"
|
||||
help_text=_("Users can create a club")
|
||||
)
|
||||
all_can_create_adherent = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Les users peuvent créer d'autres adhérents",
|
||||
help_text=_("Users can create a member"),
|
||||
)
|
||||
self_adhesion = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Un nouvel utilisateur peut se créer son compte sur re2o"
|
||||
help_text=_("A new user can create their account on Re2o")
|
||||
)
|
||||
shell_default = models.OneToOneField(
|
||||
'users.ListShell',
|
||||
|
@ -87,33 +86,35 @@ class OptionalUser(AclMixin, PreferencesModel):
|
|||
)
|
||||
self_change_shell = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Users can change their shell"
|
||||
help_text=_("Users can edit their shell")
|
||||
)
|
||||
local_email_accounts_enabled = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Enable local email accounts for users"
|
||||
help_text=_("Enable local email accounts for users")
|
||||
)
|
||||
local_email_domain = models.CharField(
|
||||
max_length = 32,
|
||||
default = "@example.org",
|
||||
help_text="Domain to use for local email accounts",
|
||||
max_length=32,
|
||||
default="@example.org",
|
||||
help_text=_("Domain to use for local email accounts")
|
||||
)
|
||||
max_email_address = models.IntegerField(
|
||||
default = 15,
|
||||
help_text = "Maximum number of local email address for a standard user"
|
||||
default=15,
|
||||
help_text=_("Maximum number of local email addresses for a standard"
|
||||
" user")
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_optionaluser", "Peut voir les options de l'user"),
|
||||
("view_optionaluser", _("Can view the user options")),
|
||||
)
|
||||
verbose_name = _("user options")
|
||||
|
||||
def clean(self):
|
||||
"""Clean model:
|
||||
Check the mail_extension
|
||||
"""
|
||||
if self.local_email_domain[0] != "@":
|
||||
raise ValidationError("Mail domain must begin with @")
|
||||
raise ValidationError(_("Email domain must begin with @"))
|
||||
|
||||
|
||||
@receiver(post_save, sender=OptionalUser)
|
||||
|
@ -126,15 +127,14 @@ def optionaluser_post_save(**kwargs):
|
|||
class OptionalMachine(AclMixin, PreferencesModel):
|
||||
"""Options pour les machines : maximum de machines ou d'alias par user
|
||||
sans droit, activation de l'ipv6"""
|
||||
PRETTY_NAME = "Options machines"
|
||||
|
||||
SLAAC = 'SLAAC'
|
||||
DHCPV6 = 'DHCPV6'
|
||||
DISABLED = 'DISABLED'
|
||||
CHOICE_IPV6 = (
|
||||
(SLAAC, 'Autoconfiguration par RA'),
|
||||
(DHCPV6, 'Attribution des ip par dhcpv6'),
|
||||
(DISABLED, 'Désactivé'),
|
||||
(SLAAC, _("Autoconfiguration by RA")),
|
||||
(DHCPV6, _("IP addresses assigning by DHCPv6")),
|
||||
(DISABLED, _("Disabled")),
|
||||
)
|
||||
|
||||
password_machine = models.BooleanField(default=False)
|
||||
|
@ -146,8 +146,7 @@ class OptionalMachine(AclMixin, PreferencesModel):
|
|||
default='DISABLED'
|
||||
)
|
||||
create_machine = models.BooleanField(
|
||||
default=True,
|
||||
help_text="Permet à l'user de créer une machine"
|
||||
default=True
|
||||
)
|
||||
|
||||
@cached_property
|
||||
|
@ -157,8 +156,9 @@ class OptionalMachine(AclMixin, PreferencesModel):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_optionalmachine", "Peut voir les options de machine"),
|
||||
("view_optionalmachine", _("Can view the machine options")),
|
||||
)
|
||||
verbose_name = _("machine options")
|
||||
|
||||
|
||||
@receiver(post_save, sender=OptionalMachine)
|
||||
|
@ -174,13 +174,11 @@ def optionalmachine_post_save(**kwargs):
|
|||
class OptionalTopologie(AclMixin, PreferencesModel):
|
||||
"""Reglages pour la topologie : mode d'accès radius, vlan où placer
|
||||
les machines en accept ou reject"""
|
||||
PRETTY_NAME = "Options topologie"
|
||||
MACHINE = 'MACHINE'
|
||||
DEFINED = 'DEFINED'
|
||||
CHOICE_RADIUS = (
|
||||
(MACHINE, 'Sur le vlan de la plage ip machine'),
|
||||
(DEFINED, 'Prédéfini dans "Vlan où placer les machines\
|
||||
après acceptation RADIUS"'),
|
||||
(MACHINE, _("On the IP range's VLAN of the machine")),
|
||||
(DEFINED, _("Preset in 'VLAN for machines accepted by RADIUS'")),
|
||||
)
|
||||
|
||||
radius_general_policy = models.CharField(
|
||||
|
@ -205,8 +203,9 @@ class OptionalTopologie(AclMixin, PreferencesModel):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_optionaltopologie", "Peut voir les options de topologie"),
|
||||
("view_optionaltopologie", _("Can view the topology options")),
|
||||
)
|
||||
verbose_name = _("topology options")
|
||||
|
||||
|
||||
@receiver(post_save, sender=OptionalTopologie)
|
||||
|
@ -219,17 +218,18 @@ def optionaltopologie_post_save(**kwargs):
|
|||
class GeneralOption(AclMixin, PreferencesModel):
|
||||
"""Options générales : nombre de resultats par page, nom du site,
|
||||
temps où les liens sont valides"""
|
||||
PRETTY_NAME = "Options générales"
|
||||
|
||||
general_message_fr = models.TextField(
|
||||
default="",
|
||||
blank=True,
|
||||
help_text="Message général affiché sur le site (maintenance, etc)"
|
||||
help_text=_("General message displayed on the French version of the"
|
||||
" website (e.g. in case of maintenance)")
|
||||
)
|
||||
general_message_en = models.TextField(
|
||||
default="",
|
||||
blank=True,
|
||||
help_text="General message displayed on the English version of the website."
|
||||
help_text=_("General message displayed on the English version of the"
|
||||
" website (e.g. in case of maintenance)")
|
||||
)
|
||||
search_display_page = models.IntegerField(default=15)
|
||||
pagination_number = models.IntegerField(default=25)
|
||||
|
@ -250,8 +250,9 @@ class GeneralOption(AclMixin, PreferencesModel):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_generaloption", "Peut voir les options générales"),
|
||||
("view_generaloption", _("Can view the general options")),
|
||||
)
|
||||
verbose_name = _("general options")
|
||||
|
||||
|
||||
@receiver(post_save, sender=GeneralOption)
|
||||
|
@ -271,8 +272,10 @@ class Service(AclMixin, models.Model):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_service", "Peut voir les options de service"),
|
||||
("view_service", _("Can view the service options")),
|
||||
)
|
||||
verbose_name = _("service")
|
||||
verbose_name_plural =_("services")
|
||||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
@ -282,14 +285,14 @@ class MailContact(AclMixin, models.Model):
|
|||
|
||||
address = models.EmailField(
|
||||
default = "contact@example.org",
|
||||
help_text = _("Contact email adress")
|
||||
help_text = _("Contact email address")
|
||||
)
|
||||
|
||||
commentary = models.CharField(
|
||||
blank = True,
|
||||
null = True,
|
||||
help_text = _(
|
||||
"Description of the associated email adress."),
|
||||
"Description of the associated email address."),
|
||||
max_length = 256
|
||||
)
|
||||
|
||||
|
@ -299,8 +302,10 @@ class MailContact(AclMixin, models.Model):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_mailcontact", _("Can see contact email")),
|
||||
("view_mailcontact", _("Can view a contact email address object")),
|
||||
)
|
||||
verbose_name = _("contact email address")
|
||||
verbose_name_plural = _("contact email addresses")
|
||||
|
||||
def __str__(self):
|
||||
return(self.address)
|
||||
|
@ -308,18 +313,17 @@ class MailContact(AclMixin, models.Model):
|
|||
|
||||
class AssoOption(AclMixin, PreferencesModel):
|
||||
"""Options générales de l'asso : siret, addresse, nom, etc"""
|
||||
PRETTY_NAME = "Options de l'association"
|
||||
|
||||
name = models.CharField(
|
||||
default="Association réseau école machin",
|
||||
default=_("Networking organisation school Something"),
|
||||
max_length=256
|
||||
)
|
||||
siret = models.CharField(default="00000000000000", max_length=32)
|
||||
adresse1 = models.CharField(default="1 Rue de exemple", max_length=128)
|
||||
adresse2 = models.CharField(default="94230 Cachan", max_length=128)
|
||||
adresse1 = models.CharField(default=_("Threadneedle Street"), max_length=128)
|
||||
adresse2 = models.CharField(default=_("London EC2R 8AH"), max_length=128)
|
||||
contact = models.EmailField(default="contact@example.org")
|
||||
telephone = models.CharField(max_length=15, default="0000000000")
|
||||
pseudo = models.CharField(default="Asso", max_length=32)
|
||||
pseudo = models.CharField(default=_("Organisation"), max_length=32)
|
||||
utilisateur_asso = models.OneToOneField(
|
||||
'users.User',
|
||||
on_delete=models.PROTECT,
|
||||
|
@ -333,8 +337,9 @@ class AssoOption(AclMixin, PreferencesModel):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_assooption", "Peut voir les options de l'asso"),
|
||||
("view_assooption", _("Can view the organisation options")),
|
||||
)
|
||||
verbose_name = _("organisation options")
|
||||
|
||||
|
||||
@receiver(post_save, sender=AssoOption)
|
||||
|
@ -346,29 +351,26 @@ def assooption_post_save(**kwargs):
|
|||
|
||||
class HomeOption(AclMixin, PreferencesModel):
|
||||
"""Settings of the home page (facebook/twitter etc)"""
|
||||
PRETTY_NAME = "Options de la page d'accueil"
|
||||
|
||||
facebook_url = models.URLField(
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Url du compte facebook"
|
||||
blank=True
|
||||
)
|
||||
twitter_url = models.URLField(
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Url du compte twitter"
|
||||
blank=True
|
||||
)
|
||||
twitter_account_name = models.CharField(
|
||||
max_length=32,
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Nom du compte à afficher"
|
||||
blank=True
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_homeoption", "Peut voir les options de l'accueil"),
|
||||
("view_homeoption", _("Can view the homepage options")),
|
||||
)
|
||||
verbose_name = _("homepage options")
|
||||
|
||||
|
||||
@receiver(post_save, sender=HomeOption)
|
||||
|
@ -380,12 +382,14 @@ def homeoption_post_save(**kwargs):
|
|||
|
||||
class MailMessageOption(AclMixin, models.Model):
|
||||
"""Reglages, mail de bienvenue et autre"""
|
||||
PRETTY_NAME = "Options de corps de mail"
|
||||
|
||||
welcome_mail_fr = models.TextField(default="")
|
||||
welcome_mail_en = models.TextField(default="")
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_mailmessageoption", "Peut voir les options de mail"),
|
||||
("view_mailmessageoption", _("Can view the email message"
|
||||
" options")),
|
||||
)
|
||||
verbose_name = _("email message options")
|
||||
|
||||
|
|
|
@ -24,24 +24,26 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load i18n %}
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Adress" %}</th>
|
||||
<th>{% trans "Remark" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for mailcontact in mailcontact_list %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Address" %}</th>
|
||||
<th>{% trans "Comment" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for mailcontact in mailcontact_list %}
|
||||
<tr>
|
||||
<td>{{ mailcontact.address }}</td>
|
||||
<td>{{ mailcontact.commentary }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit mailcontact %}
|
||||
{% include 'buttons/edit.html' with href='preferences:edit-mailcontact' id=mailcontact.id %}
|
||||
{% acl_end %}
|
||||
{% history_button mailcontact %}
|
||||
{% can_edit mailcontact %}
|
||||
{% include 'buttons/edit.html' with href='preferences:edit-mailcontact' id=mailcontact.id %}
|
||||
{% acl_end %}
|
||||
{% history_button mailcontact %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -23,30 +23,31 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Url</th>
|
||||
<th>Description</th>
|
||||
<th>Image</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for service in service_list %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "URL" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
<th>{% trans "Image" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for service in service_list %}
|
||||
<tr>
|
||||
<td>{{ service.name }}</td>
|
||||
<td>{{ service.url }}</td>
|
||||
<td>{{ service.description }}</td>
|
||||
<td>{{ service.image }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit service%}
|
||||
{% include 'buttons/edit.html' with href='preferences:edit-service' id=service.id %}
|
||||
{% acl_end %}
|
||||
{% history_button service %}
|
||||
{% can_edit service%}
|
||||
{% include 'buttons/edit.html' with href='preferences:edit-service' id=service.id %}
|
||||
{% acl_end %}
|
||||
{% history_button service %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -28,223 +28,215 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load design %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification des préférences{% endblock %}
|
||||
{% block title %}{% trans "Preferences" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h4>Préférences utilisateur</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalUser' %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
</a>
|
||||
|
||||
<h5>Généralités</h5>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Téléphone obligatoirement requis</th>
|
||||
<td>{{ useroptions.is_tel_mandatory|tick }}</td>
|
||||
<th>Auto inscription</th>
|
||||
<td>{{ useroptions.self_adhesion|tick }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<th>Shell par défaut des utilisateurs</th>
|
||||
<td>{{ useroptions.shell_default }}</td>
|
||||
<th>Les utilisateurs peuvent changer leur shell</th>
|
||||
<td>{{ useroptions.self_change_shell|tick }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Creations d'adhérents par tous</th>
|
||||
<td>{{ useroptions.all_can_create_adherent|tick }}</td>
|
||||
<th>Creations de clubs par tous</th>
|
||||
<td>{{ useroptions.all_can_create_club|tick }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Champ gpg fingerprint</th>
|
||||
<td>{{ useroptions.gpg_fingerprint|tick }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h5>Comptes mails</h5>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Gestion des comptes mails</th>
|
||||
<td>{{ useroptions.local_email_accounts_enabled | tick }}</td>
|
||||
<th>Extension mail interne</th>
|
||||
<td>{{ useroptions.local_email_domain }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nombre d'alias mail max</th>
|
||||
<td>{{ useroptions.max_email_address }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4>Préférences machines</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalMachine' %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
</a>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Mot de passe par machine</th>
|
||||
<td>{{ machineoptions.password_machine|tick }}</td>
|
||||
<th>Machines/interfaces autorisées par utilisateurs</th>
|
||||
<td>{{ machineoptions.max_lambdauser_interfaces }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alias dns autorisé par utilisateur</th>
|
||||
<td>{{ machineoptions.max_lambdauser_aliases }}</td>
|
||||
<th>Support de l'ipv6</th>
|
||||
<td>{{ machineoptions.ipv6_mode }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Creation de machines</th>
|
||||
<td>{{ machineoptions.create_machine|tick }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4>Préférences topologie</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalTopologie' %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
</a>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Politique générale de placement de vlan</th>
|
||||
<td>{{ topologieoptions.radius_general_policy }}</td>
|
||||
<th>
|
||||
Ce réglage défini la politique vlan après acceptation radius :
|
||||
soit sur le vlan de la plage d'ip de la machine, soit sur un
|
||||
vlan prédéfini dans "Vlan où placer les machines après acceptation
|
||||
RADIUS"
|
||||
</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Vlan où placer les machines après acceptation RADIUS</th>
|
||||
<td>{{ topologieoptions.vlan_decision_ok }}</td>
|
||||
<th>Vlan où placer les machines après rejet RADIUS</th>
|
||||
<td>{{ topologieoptions.vlan_decision_nok }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4>Préférences generales</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'GeneralOption' %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
</a>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Nom du site web</th>
|
||||
<td>{{ generaloptions.site_name }}</td>
|
||||
<th>Adresse mail d'expedition automatique</th>
|
||||
<td>{{ generaloptions.email_from }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Affichage de résultats dans le champ de recherche</th>
|
||||
<td>{{ generaloptions.search_display_page }}</td>
|
||||
<th>Nombre d'items affichés en liste (taille normale)</th>
|
||||
<td>{{ generaloptions.pagination_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nombre d'items affichés en liste (taille élevée)</th>
|
||||
<td>{{ generaloptions.pagination_large_number }}</td>
|
||||
<th>Temps avant expiration du lien de reinitialisation de mot de passe (en heures)</th>
|
||||
<td>{{ generaloptions.req_expire_hrs }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Message global affiché sur le site</th>
|
||||
<td>{{ generaloptions.general_message }}</td>
|
||||
<th>Résumé des CGU</th>
|
||||
<td>{{ generaloptions.GTU_sum_up }}</td>
|
||||
<tr>
|
||||
<tr>
|
||||
<th>CGU</th>
|
||||
<td>{{generaloptions.GTU}}</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4>Données de l'association</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'AssoOption' %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
</a>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<td>{{ assooptions.name }}</td>
|
||||
<th>SIRET</th>
|
||||
<td>{{ assooptions.siret }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Adresse</th>
|
||||
<td>{{ assooptions.adresse1 }}<br>
|
||||
{{ assooptions.adresse2 }}</td>
|
||||
<th>Contact mail</th>
|
||||
<td>{{ assooptions.contact }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Telephone</th>
|
||||
<td>{{ assooptions.telephone }}</td>
|
||||
<th>Pseudo d'usage</th>
|
||||
<td>{{ assooptions.pseudo }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Objet utilisateur de l'association</th>
|
||||
<td>{{ assooptions.utilisateur_asso }}</td>
|
||||
<th>Description de l'association</th>
|
||||
<td>{{ assooptions.description | safe }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4>Messages personalisé dans les mails</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'MailMessageOption' %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
</a>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Mail de bienvenue (Français)</th>
|
||||
<td>{{ mailmessageoptions.welcome_mail_fr | safe }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Mail de bienvenue (Anglais)</th>
|
||||
<td>{{ mailmessageoptions.welcome_mail_en | safe }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4>Liste des services et préférences page d'accueil</h4>
|
||||
{% can_create preferences.Service%}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-service' %}"><i class="fa fa-plus">
|
||||
</i> Ajouter un service
|
||||
</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-service' %}"><i class="fa fa-trash">
|
||||
</i> Supprimer un ou plusieurs service
|
||||
</a>
|
||||
{% include "preferences/aff_service.html" with service_list=service_list %}
|
||||
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'HomeOption' %}">
|
||||
<i class="fa fa-edit"></i> Editer
|
||||
</a>
|
||||
|
||||
<h2>{% trans "Contact email adresses list" %}</h2>
|
||||
{% can_create preferences.MailContact%}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-mailcontact' %}"><i class="fa fa-plus"></i>{% trans "Add an adress" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-mailcontact' %}"><i class="fa fa-trash"></i>{% trans "Delete one or multiple adresses" %}</a>
|
||||
{% include "preferences/aff_mailcontact.html" with mailcontact_list=mailcontact_list %}
|
||||
<p>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Url du compte twitter</th>
|
||||
<td>{{ homeoptions.twitter_url }}</td>
|
||||
<th>Nom utilisé pour afficher le compte</th>
|
||||
<td>{{ homeoptions.twitter_account_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Url du compte facebook</th>
|
||||
<td>{{ homeoptions.facebook_url }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>{% trans "User preferences" %}</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalUser' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "Telephone number required" %}</th>
|
||||
<td>{{ useroptions.is_tel_mandatory|tick }}</td>
|
||||
<th>{% trans "Self registration" %}</th>
|
||||
<td>{{ useroptions.self_adhesion|tick }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Default shell for users" %}</th>
|
||||
<td>{{ useroptions.shell_default }}</td>
|
||||
<th>{% trans "Users can edit their shell" %}</th>
|
||||
<td>{{ useroptions.self_change_shell|tick }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Creation of members by everyone" %}</th>
|
||||
<td>{{ useroptions.all_can_create_adherent|tick }}</td>
|
||||
<th>{% trans "Creation of clubs by everyone" %}</th>
|
||||
<td>{{ useroptions.all_can_create_club|tick }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "GPG fingerprint field" %}</th>
|
||||
<td>{{ useroptions.gpg_fingerprint|tick }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h5>{% trans "Email accounts preferences" %}
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "Local email accounts enabled" %}</th>
|
||||
<td>{{ useroptions.local_email_accounts_enabled|tick }}</td>
|
||||
<th>{% trans "Local email domain" %}</th>
|
||||
<td>{{ useroptions.local_email_domain }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Maximum number of email aliases allowed" %}</th>
|
||||
<td>{{ useroptions.max_email_address }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>{% trans "Machines preferences" %}</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalMachine' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<p>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "Password per machine" %}</th>
|
||||
<td>{{ machineoptions.password_machine|tick }}</td>
|
||||
<th>{% trans "Maximum number of interfaces allowed for a standard user" %}</th>
|
||||
<td>{{ machineoptions.max_lambdauser_interfaces }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Maximum number of DNS aliases allowed for a standard user" %}</th>
|
||||
<td>{{ machineoptions.max_lambdauser_aliases }}</td>
|
||||
<th>{% trans "IPv6 support" %}</th>
|
||||
<td>{{ machineoptions.ipv6_mode }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Creation of machines" %}</th>
|
||||
<td>{{ machineoptions.create_machine|tick }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>{% trans "Topology preferences" %}</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalTopologie' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<p>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "General policy for VLAN setting" %}</th>
|
||||
<td>{{ topologieoptions.radius_general_policy }}</td>
|
||||
<th>{% trans "This setting defines the VLAN policy after acceptance by RADIUS: either on the IP range's VLAN of the machine, or a VLAN preset in 'VLAN for machines accepted by RADIUS'" %}</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "VLAN for machines accepted by RADIUS" %}</th>
|
||||
<td>{{ topologieoptions.vlan_decision_ok }}</td>
|
||||
<th>{% trans "VLAN for machines rejected by RADIUS" %}</th>
|
||||
<td>{{ topologieoptions.vlan_decision_nok }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>{% trans "General preferences" %}</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'GeneralOption' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<p>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "Website name" %}</th>
|
||||
<td>{{ generaloptions.site_name }}</td>
|
||||
<th>{% trans "Email address for automatic emailing" %}</th>
|
||||
<td>{{ generaloptions.email_from }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Number of results displayed when searching" %}</th>
|
||||
<td>{{ generaloptions.search_display_page }}</td>
|
||||
<th>{% trans "Number of items per page (standard size)" %}</th>
|
||||
<td>{{ generaloptions.pagination_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Number of items per page (large size)" %}</th>
|
||||
<td>{{ generaloptions.pagination_large_number }}</td>
|
||||
<th>{% trans "Time before expiration of the reset password link (in hours)" %}</th>
|
||||
<td>{{ generaloptions.req_expire_hrs }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "General message displayed on the website" %}</th>
|
||||
<td>{{ generaloptions.general_message }}</td>
|
||||
<th>{% trans "Summary of the General Terms of Use" %}</th>
|
||||
<td>{{ generaloptions.GTU_sum_up }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "General Terms of Use" %}</th>
|
||||
<td>{{ generaloptions.GTU }}</th>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>{% trans "Information about the organisation" %}</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'AssoOption' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<p>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<td>{{ assooptions.name }}</td>
|
||||
<th>{% trans "SIRET number" %}</th>
|
||||
<td>{{ assooptions.siret }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Address" %}</th>
|
||||
<td>{{ assooptions.adresse1 }}<br>
|
||||
{{ assooptions.adresse2 }}
|
||||
</td>
|
||||
<th>{% trans "Contact email address" %}</th>
|
||||
<td>{{ assooptions.contact }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Telephone number" %}</th>
|
||||
<td>{{ assooptions.telephone }}</td>
|
||||
<th>{% trans "Usual name" %}</th>
|
||||
<td>{{ assooptions.pseudo }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "User object of the organisation" %}</th>
|
||||
<td>{{ assooptions.utilisateur_asso }}</td>
|
||||
<th>{% trans "Description of the organisation" %}</th>
|
||||
<td>{{ assooptions.description|safe }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>{% trans "Custom email message" %}</h4>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'MailMessageOption' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<p>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "Welcome email (in French)" %}</th>
|
||||
<td>{{ mailmessageoptions.welcome_mail_fr|safe }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Welcome email (in English)" %}</th>
|
||||
<td>{{ mailmessageoptions.welcome_mail_en|safe }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>{% trans "List of services and homepage preferences" %}</h4>
|
||||
{% can_create preferences.Service%}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-service' %}"><i class="fa fa-plus"></i>{% trans " Add a service" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-service' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several services" %}</a>
|
||||
{% include "preferences/aff_service.html" with service_list=service_list %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'HomeOption' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<h2>{% trans "List of contact email addresses" %}</h2>
|
||||
{% can_create preferences.MailContact %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-mailcontact' %}"><i class="fa fa-plus"></i>{% trans "Add an address" %}</a>
|
||||
{% acl_end %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-mailcontact' %}"><i class="fa fa-trash"></i>{% trans "Delete one or several addresses" %}</a>
|
||||
{% include "preferences/aff_mailcontact.html" with mailcontact_list=mailcontact_list %}
|
||||
<p>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{% trans "Twitter account URL" %}</th>
|
||||
<td>{{ homeoptions.twitter_url }}</td>
|
||||
<th>{% trans "Twitter account name" %}</th>
|
||||
<td>{{ homeoptions.twitter_account_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans "Facebook account URL" %}</th>
|
||||
<td>{{ homeoptions.facebook_url }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,20 +25,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load massive_bootstrap_form %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification des préférences{% endblock %}
|
||||
{% block title %}{% trans "Preferences" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% bootstrap_form_errors options %}
|
||||
|
||||
<h3>Edition des préférences</h3>
|
||||
<h3>{% trans "Editing of preferences" %}</h3>
|
||||
|
||||
<form class="form" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% massive_bootstrap_form options 'utilisateur_asso' %}
|
||||
{% bootstrap_button "Modifier" button_type="submit" icon="star" %}
|
||||
{% csrf_token %}
|
||||
{% massive_bootstrap_form options 'utilisateur_asso' %}
|
||||
{% trans "Edit" as tr_edit %}
|
||||
{% bootstrap_button tr_edit button_type="submit" icon="star" %}
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,8 +24,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification des preferences{% endblock %}
|
||||
{% block title %}{% trans "Preferences" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if preferenceform %}
|
||||
|
@ -44,3 +45,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -95,14 +95,14 @@ def edit_options(request, section):
|
|||
model = getattr(models, section, None)
|
||||
form_instance = getattr(forms, 'Edit' + section + 'Form', None)
|
||||
if not (model or form_instance):
|
||||
messages.error(request, "Objet inconnu")
|
||||
messages.error(request, _("Unknown object"))
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
|
||||
options_instance, _created = model.objects.get_or_create()
|
||||
can, msg = options_instance.can_edit(request.user)
|
||||
if not can:
|
||||
messages.error(request, msg or "Vous ne pouvez pas éditer cette\
|
||||
option.")
|
||||
messages.error(request, msg or _("You don't have the right to edit"
|
||||
" this option."))
|
||||
return redirect(reverse('index'))
|
||||
options = form_instance(
|
||||
request.POST or None,
|
||||
|
@ -114,11 +114,11 @@ def edit_options(request, section):
|
|||
options.save()
|
||||
reversion.set_user(request.user)
|
||||
reversion.set_comment(
|
||||
"Champs modifié(s) : %s" % ', '.join(
|
||||
"Field(s) edited: %s" % ', '.join(
|
||||
field for field in options.changed_data
|
||||
)
|
||||
)
|
||||
messages.success(request, "Préférences modifiées")
|
||||
messages.success(request, _("The preferences were edited."))
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
return form(
|
||||
{'options': options},
|
||||
|
@ -136,11 +136,11 @@ def add_service(request):
|
|||
with transaction.atomic(), reversion.create_revision():
|
||||
service.save()
|
||||
reversion.set_user(request.user)
|
||||
reversion.set_comment("Création")
|
||||
messages.success(request, "Ce service a été ajouté")
|
||||
reversion.set_comment("Creation")
|
||||
messages.success(request, _("The service was added."))
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
return form(
|
||||
{'preferenceform': service, 'action_name': 'Ajouter'},
|
||||
{'preferenceform': service, 'action_name': _("Add a service")},
|
||||
'preferences/preferences.html',
|
||||
request
|
||||
)
|
||||
|
@ -160,14 +160,14 @@ def edit_service(request, service_instance, **_kwargs):
|
|||
service.save()
|
||||
reversion.set_user(request.user)
|
||||
reversion.set_comment(
|
||||
"Champs modifié(s) : %s" % ', '.join(
|
||||
"Field(s) edited: %s" % ', '.join(
|
||||
field for field in service.changed_data
|
||||
)
|
||||
)
|
||||
messages.success(request, "Service modifié")
|
||||
messages.success(request, _("The service was edited."))
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
return form(
|
||||
{'preferenceform': service, 'action_name': 'Editer'},
|
||||
{'preferenceform': service, 'action_name': _("Edit")},
|
||||
'preferences/preferences.html',
|
||||
request
|
||||
)
|
||||
|
@ -185,13 +185,13 @@ def del_service(request, instances):
|
|||
with transaction.atomic(), reversion.create_revision():
|
||||
services_del.delete()
|
||||
reversion.set_user(request.user)
|
||||
messages.success(request, "Le service a été supprimé")
|
||||
messages.success(request, _("The service was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(request, "Erreur le service\
|
||||
suivant %s ne peut être supprimé" % services_del)
|
||||
messages.error(request, _("Error: the service %s can't be"
|
||||
" deleted.") % services_del)
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
return form(
|
||||
{'preferenceform': services, 'action_name': 'Supprimer'},
|
||||
{'preferenceform': services, 'action_name': _("Delete")},
|
||||
'preferences/preferences.html',
|
||||
request
|
||||
)
|
||||
|
@ -207,10 +207,11 @@ def add_mailcontact(request):
|
|||
)
|
||||
if mailcontact.is_valid():
|
||||
mailcontact.save()
|
||||
messages.success(request, _("The adress was created."))
|
||||
messages.success(request, _("The contact email address was created."))
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
return form(
|
||||
{'preferenceform': mailcontact, 'action_name': 'Ajouter'},
|
||||
{'preferenceform': mailcontact,
|
||||
'action_name': _("Add a contact email address")},
|
||||
'preferences/preferences.html',
|
||||
request
|
||||
)
|
||||
|
@ -227,10 +228,10 @@ def edit_mailcontact(request, mailcontact_instance, **_kwargs):
|
|||
)
|
||||
if mailcontact.is_valid():
|
||||
mailcontact.save()
|
||||
messages.success(request, _("Email adress updated."))
|
||||
messages.success(request, _("The contact email address was edited."))
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
return form(
|
||||
{'preferenceform': mailcontact, 'action_name': _('Edit')},
|
||||
{'preferenceform': mailcontact, 'action_name': _("Edit")},
|
||||
'preferences/preferences.html',
|
||||
request
|
||||
)
|
||||
|
@ -248,10 +249,12 @@ def del_mailcontact(request, instances):
|
|||
mailcontacts_dels = mailcontacts.cleaned_data['mailcontacts']
|
||||
for mailcontacts_del in mailcontacts_dels:
|
||||
mailcontacts_del.delete()
|
||||
messages.success(request, _("The email adress was deleted."))
|
||||
messages.success(request,
|
||||
_("The contact email adress was deleted."))
|
||||
return redirect(reverse('preferences:display-options'))
|
||||
return form(
|
||||
{'preferenceform': mailcontacts, 'action_name': _('Delete')},
|
||||
{'preferenceform': mailcontacts, 'action_name': _("Delete")},
|
||||
'preferences/preferences.html',
|
||||
request
|
||||
)
|
||||
|
||||
|
|
12
re2o/acl.py
12
re2o/acl.py
|
@ -34,6 +34,7 @@ from django.db.models import Model
|
|||
from django.contrib import messages
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
|
||||
def acl_base_decorator(method_name, *targets, on_instance=True):
|
||||
|
@ -138,7 +139,7 @@ ModelC)
|
|||
target = target.get_instance(*args, **kwargs)
|
||||
instances.append(target)
|
||||
except target.DoesNotExist:
|
||||
yield False, u"Entrée inexistante"
|
||||
yield False, _("Nonexistent entry.")
|
||||
return
|
||||
if hasattr(target, method_name):
|
||||
can_fct = getattr(target, method_name)
|
||||
|
@ -155,7 +156,8 @@ ModelC)
|
|||
if error_messages:
|
||||
for msg in error_messages:
|
||||
messages.error(
|
||||
request, msg or "Vous ne pouvez pas accéder à ce menu")
|
||||
request, msg or _("You don't have the right to access"
|
||||
" this menu."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
|
@ -219,7 +221,8 @@ def can_delete_set(model):
|
|||
instances = model.objects.filter(id__in=instances_id)
|
||||
if not instances:
|
||||
messages.error(
|
||||
request, "Vous ne pouvez pas accéder à ce menu")
|
||||
request, _("You don't have the right to access this menu.")
|
||||
)
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
|
@ -268,10 +271,11 @@ def can_edit_history(view):
|
|||
return view(request, *args, **kwargs)
|
||||
messages.error(
|
||||
request,
|
||||
"Vous ne pouvez pas éditer l'historique."
|
||||
_("You don't have the right to edit the history.")
|
||||
)
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
))
|
||||
return wrapper
|
||||
|
||||
|
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue