mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
Mark strings for translation in multi_op
This commit is contained in:
parent
ac5d8e2080
commit
a745e8cc9c
11 changed files with 36 additions and 199 deletions
|
@ -34,8 +34,8 @@ class Preferences(models.Model):
|
|||
"topologie.Dormitory",
|
||||
related_name="vlan_tagged",
|
||||
blank=True,
|
||||
verbose_name=_("Enabled dorm"),
|
||||
verbose_name=_("enabled dorm"),
|
||||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Dormitory of connection settings")
|
||||
verbose_name = _("dormitories preferences")
|
||||
|
|
|
@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% trans "Building" as tr_building %}
|
||||
<th>{% include 'buttons/sort.html' with prefix='building' col='name' text=tr_building %}</th>
|
||||
<th>{% include 'buttons/sort.html' with prefix='room' col='name' text=tr_room %}</th>
|
||||
<th>{% trans "Connnected on" %}</th>
|
||||
<th>{% trans "Connnected to" %}</th>
|
||||
<th>{% trans "User" %}</th>
|
||||
<th>{% trans "Details" %}</th>
|
||||
<th>{% trans "End of subscription on" %}</th>
|
||||
|
@ -49,10 +49,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<tr>
|
||||
<td>{{ room.building }}</td>
|
||||
<td>{{ room.name }}</td>
|
||||
<td>{% if room.port_set.all %}<span class="label label-success">AURORE{% else %}<span class="label label-danger">{% trans "Other operator" %}{% endif %}</span></td>
|
||||
<td>{% if room.adherent %}<a href="{% url 'users:profil' room.adherent.id%}">{{ room.adherent }}</a>{% else %} {% trans "Aucun" %}{% endif %}</td>
|
||||
<td>{% if room.port_set.all %}<span class="label label-success">{{ asso_name }}{% else %}<span class="label label-danger">{% trans "Other operator" %}{% endif %}</span></td>
|
||||
<td>{% if room.adherent %}<a href="{% url 'users:profil' room.adherent.id%}">{{ room.adherent }}</a>{% else %} {% trans "None" %}{% endif %}</td>
|
||||
<td>{{ room.details }}</td>
|
||||
<td>{% if room.adherent.is_adherent %}<i class="text-success">{% else %}<i class="text-danger">{% endif %}{% if room.adherent.end_adhesion %}{{ room.adherent.end_adhesion}}{% else %}{% trans "No member" %}{% endif %}</i></td>
|
||||
<td>{% if room.adherent.is_adherent %}<i class="text-success">{% else %}<i class="text-danger">{% endif %}{% if room.adherent.end_adhesion %}{{ room.adherent.end_adhesion}}{% else %}{% trans "Non member" %}{% endif %}</i></td>
|
||||
<td>
|
||||
{% if room.adherent.has_access == True %}
|
||||
<i class="text-success">{% trans "Active" %}</i>
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
{% extends 'machines/sidebar.html' %}
|
||||
{% comment %}
|
||||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||
se veut agnostique au réseau considéré, de manière à être installable en
|
||||
quelques clics.
|
||||
|
||||
Copyright © 2017 Gabriel Détraz
|
||||
Copyright © 2017 Goulven Kermarec
|
||||
Copyright © 2017 Augustin Lemesle
|
||||
Copyright © 2017 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.
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Ticket" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2> {% trans "Tickets settings modification" %}</h2>
|
||||
|
||||
{% for message in messages %}
|
||||
<div class="{{ message| bootstrap_message_classes }} alert-dismissable">
|
||||
<button type="button" class="close" data_dismiss="alert" aria-hidden="true">}</button>
|
||||
{{ message | safe }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_field preferencesform.publish_address %}
|
||||
{% bootstrap_field preferencesform.mail_language %}
|
||||
{% bootstrap_button "Editer" button_type="submit" icon='ok' button_class='btn-success' %}
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -1,58 +0,0 @@
|
|||
{% extends 'machines/sidebar.html' %}
|
||||
{% comment %}
|
||||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||
se veut agnostique au réseau considéré, de manière à être installable en
|
||||
quelques clics.
|
||||
|
||||
Copyright © 2017 Gabriel Détraz
|
||||
Copyright © 2017 Goulven Kermarec
|
||||
Copyright © 2017 Augustin Lemesle
|
||||
Copyright © 2017 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.
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load massive_bootstrap_form %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Ticket" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2> Ouverture d'un Ticket </h2>
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% if not user.is_authenticated %}
|
||||
<p>{% trans "Vous n'êtes pas authentifié. Veuillez fournir une adresse mail afin que nous puissions vous recontacter." %}</p>
|
||||
{% bootstrap_field ticketform.email %}
|
||||
{% endif %}
|
||||
{% bootstrap_field ticketform.title %}
|
||||
<br>
|
||||
<p>{% trans "Description de votre problème. Veuillez fournir le plus d'informations possible afin de faciliter la recherche de solution. Voici quelques informations dont nous pourions avoir besoin:" %}</p>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<p> {% trans "Le type de votre problème (adhesion, connexion, paiement ou autre)." %}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p> {% trans "Les conditions dans lesquelles vous rencontrez le problème (Wifi/filaire, sur tout les apareils ou sur un seul. Est-ce une nouvelle machine ?" %}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p> {% trans "Les endroits dans lequels le problème survient (chez vous, dans une partie commune, dans un batiment en particulier)." %}</p>
|
||||
</ul>
|
||||
{% bootstrap_field ticketform.description %}
|
||||
{% bootstrap_button "Ouvrir le Ticket" button_type="submit" icon='ok' button_class='btn-success' %}
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -1,34 +0,0 @@
|
|||
{% extends 'users/sidebar.html' %}
|
||||
{% comment %}
|
||||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||
se veut agnostique au réseau considéré, de manière à être installable en
|
||||
quelques clics.
|
||||
|
||||
Copyright © 2017 Gabriel Détraz
|
||||
Copyright © 2017 Goulven Kermarec
|
||||
Copyright © 2017 Augustin Lemesle
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title%}{% trans "Tickets" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Tickets" %}</h2>
|
||||
{% include 'tickets/aff_tickets.html' with tickets_list=tickets_list %}
|
||||
{% endblock %}
|
|
@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Multi Operators" %}{% endblock %}
|
||||
{% block title %}{% trans "Multiple operators" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
@ -35,17 +35,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% bootstrap_form_errors dormitory_form %}
|
||||
{% endif %}
|
||||
|
||||
<h2>{% trans "Rooms connections" %}</h2>
|
||||
<h2>{% trans "Room connections" %}</h2>
|
||||
|
||||
{% if dormitory_form %}
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form dormitory_form %}
|
||||
{% bootstrap_button "Select Dormitory" icon='ok' button_class='btn-success' %}
|
||||
{% trans "Select dormitory" as tr_select_dorm %}
|
||||
{% bootstrap_button tr_select_dorm icon='ok' button_class='btn-success' %}
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% include 'multi_op/aff_room_state.html' with room_list=room_list %}
|
||||
{% include 'multi_op/aff_room_state.html' with room_list=room_list asso_name=asso_name %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
{% load i18n %}
|
||||
<li><a href="{% url 'multi_op:aff-state-global' %}"><i class="fa fa-random"></i> {% trans "Multi Operators" %}</a></li>
|
||||
<li><a href="{% url 'multi_op:aff-state-global' %}"><i class="fa fa-random"></i> {% trans "Manage the operators" %}</a></li>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{% load i18n %}
|
||||
<li>
|
||||
<a href="{% url 'tickets:new-ticket' %}">
|
||||
<i class="fa fa-ticket"></i> {% trans "Ouvrir un ticket" %}
|
||||
</a>
|
||||
</li>
|
|
@ -1,36 +0,0 @@
|
|||
{% load i18n %}
|
||||
|
||||
<div class="panel panel-default" id="tickets">
|
||||
<div class="panel-heading" data-toggle="collapse" href="#collapse_tickets">
|
||||
<h4 class="panel-title">
|
||||
<a><i class="fa fa-ticket"></i> {% trans "Tickets" %}</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div id="collapse_tickets" class="panel-collapse panel-body collapse">
|
||||
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'tickets:edit-preferences-tickets' %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
{% trans "Edit" %}
|
||||
</a>
|
||||
<p></p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th><p>{% trans "Publication email address"%}</p></th>
|
||||
{% if preferences.publish_address %}
|
||||
<td><p>{{ preferences.publish_address }}</p></td>
|
||||
{% else %}
|
||||
<td><p>{% trans "Pas d'adresse, les tickets ne sont pas annoncés" %}</p></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th><p>{% trans "Email language" %}</p></th>
|
||||
<td><p>{{ language }}</p></th>
|
||||
</tr>
|
||||
<table class="table">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% block sidebar %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url 'multi_op:aff-state-global' %}">
|
||||
<i class="fa fa-random"></i>
|
||||
{% trans "Rooms connection state" %}
|
||||
{% trans "Room connections state" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url 'multi_op:aff-pending-connection' %}">
|
||||
<i class="fa fa-compress"></i>
|
||||
|
|
|
@ -41,7 +41,7 @@ from re2o.base import re2o_paginator, SortTable
|
|||
|
||||
from re2o.acl import can_view, can_view_all, can_edit, can_create
|
||||
|
||||
from preferences.models import GeneralOption
|
||||
from preferences.models import GeneralOption, AssoOption
|
||||
|
||||
from .forms import DormitoryForm
|
||||
|
||||
|
@ -67,7 +67,15 @@ def display_rooms_connection(request, dormitory=None):
|
|||
)
|
||||
pagination_number = GeneralOption.get_cached_value("pagination_number")
|
||||
room_list = re2o_paginator(request, room_list, pagination_number)
|
||||
return render(request, "multi_op/index_room_state.html", {"room_list": room_list})
|
||||
asso_name = AssoOption.get_cached_value("pseudo")
|
||||
return render(
|
||||
request,
|
||||
"multi_op/index_room_state.html",
|
||||
{
|
||||
"room_list": room_list,
|
||||
"asso_name": asso_name,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -105,10 +113,15 @@ def aff_pending_connection(request):
|
|||
)
|
||||
pagination_number = GeneralOption.get_cached_value("pagination_number")
|
||||
room_list = re2o_paginator(request, room_list, pagination_number)
|
||||
asso_name = AssoOption.get_cached_value("pseudo")
|
||||
return render(
|
||||
request,
|
||||
"multi_op/index_room_state.html",
|
||||
{"room_list": room_list, "dormitory_form": dormitory_form},
|
||||
{
|
||||
"room_list": room_list,
|
||||
"dormitory_form": dormitory_form,
|
||||
"asso_name": asso_name,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
@ -135,10 +148,15 @@ def aff_pending_disconnection(request):
|
|||
)
|
||||
pagination_number = GeneralOption.get_cached_value("pagination_number")
|
||||
room_list = re2o_paginator(request, room_list, pagination_number)
|
||||
asso_name = AssoOption.get_cached_value("pseudo")
|
||||
return render(
|
||||
request,
|
||||
"multi_op/index_room_state.html",
|
||||
{"room_list": room_list, "dormitory_form": dormitory_form},
|
||||
{
|
||||
"room_list": room_list,
|
||||
"dormitory_form": dormitory_form,
|
||||
"asso_name": asso_name,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
@ -148,7 +166,7 @@ def disconnect_room(request, room, roomid):
|
|||
"""Action of disconnecting a room"""
|
||||
room.port_set.clear()
|
||||
room.save()
|
||||
messages.success(request, "Room %s disconnected" % room)
|
||||
messages.success(request, _("The room %s was disconnected.") % room)
|
||||
return redirect(reverse("multi_op:aff-pending-disconnection"))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue