mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 07:02:26 +00:00
Ajout de prefix sur tous les tableaux pour les différencier
This commit is contained in:
parent
29a81fc175
commit
c029feeca5
14 changed files with 85 additions and 74 deletions
|
@ -29,11 +29,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col='user' text='Utilisateur' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='cotis' col='user' text='Utilisateur' %}</th>
|
||||
<th>Designation</th>
|
||||
<th>Prix total</th>
|
||||
<th>{% include "buttons/sort.html" with col='paiement' text='Moyen de paiement' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='date' text='Date' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='cotis' col='paiement' text='Moyen de paiement' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='cotis' col='date' text='Date' %}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
|
|
|
@ -40,14 +40,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<thead>
|
||||
<tr>
|
||||
<th>Profil</th>
|
||||
<th>{% include "buttons/sort.html" with col='name' text='Nom' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='surname' text='Prénom' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='control' col='name' text='Nom' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='control' col='surname' text='Prénom' %}</th>
|
||||
<th>Designation</th>
|
||||
<th>Prix total</th>
|
||||
<th>{% include "buttons/sort.html" with col='paiement' text='Moyen de paiement' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='date' text='Date' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='valid' text='Valide' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='control' text='Contrôlée' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='control' col='paiement' text='Moyen de paiement' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='control' col='date' text='Date' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='control' col='valid' text='Valide' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='control' col='control' text='Contrôlée' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for form in controlform.forms %}
|
||||
|
|
|
@ -33,8 +33,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<tr>
|
||||
<th>Objet modifié</th>
|
||||
<th>Type de l'objet</th>
|
||||
<th>{% include "buttons/sort.html" with col='author' text='Modification par' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='date' text='Date de modification' %}</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>
|
||||
</tr>
|
||||
|
|
|
@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col='date' text='Date' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='sum' col='date' text='Date' %}</th>
|
||||
<th>Modification</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
|
@ -35,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<col width="144px">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<th>{% include "buttons/sort.html" with col='name' text='Nom DNS' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='machine' col='name' text='Nom DNS' %}</th>
|
||||
<th>Type</th>
|
||||
<th>MAC</th>
|
||||
<th>IP</th>
|
||||
|
|
|
@ -153,76 +153,76 @@ class SortTable:
|
|||
# A 'default' might be provided to specify what to do if the requested col
|
||||
# doesn't match any keys.
|
||||
USERS_INDEX = {
|
||||
'name': ['name'],
|
||||
'surname': ['surname'],
|
||||
'pseudo': ['pseudo'],
|
||||
'room': ['room'],
|
||||
'user_name': ['name'],
|
||||
'user_surname': ['surname'],
|
||||
'user_pseudo': ['pseudo'],
|
||||
'user_room': ['room'],
|
||||
'default': ['state', 'pseudo']
|
||||
}
|
||||
USERS_INDEX_BAN = {
|
||||
'user': ['user__pseudo'],
|
||||
'start': ['date_start'],
|
||||
'end': ['date_end'],
|
||||
'ban_user': ['user__pseudo'],
|
||||
'ban_start': ['date_start'],
|
||||
'ban_end': ['date_end'],
|
||||
'default': ['-date_end']
|
||||
}
|
||||
USERS_INDEX_WHITE = {
|
||||
'user': ['user__pseudo'],
|
||||
'start': ['date_start'],
|
||||
'end': ['date_end'],
|
||||
'white_user': ['user__pseudo'],
|
||||
'white_start': ['date_start'],
|
||||
'white_end': ['date_end'],
|
||||
'default': ['-date_end']
|
||||
}
|
||||
MACHINES_INDEX = {
|
||||
'name': ['name'],
|
||||
'machine_name': ['name'],
|
||||
'default': ['pk']
|
||||
}
|
||||
COTISATIONS_INDEX = {
|
||||
'user': ['user__pseudo'],
|
||||
'paiement': ['paiement__moyen'],
|
||||
'date': ['date'],
|
||||
'cotis_user': ['user__pseudo'],
|
||||
'cotis_paiement': ['paiement__moyen'],
|
||||
'cotis_date': ['date'],
|
||||
'default': ['-date']
|
||||
}
|
||||
COTISATIONS_CONTROL = {
|
||||
'name': ['user__name'],
|
||||
'surname': ['user__surname'],
|
||||
'paiement': ['paiement'],
|
||||
'date': ['date'],
|
||||
'valid': ['valid'],
|
||||
'control': ['control'],
|
||||
'control_name': ['user__name'],
|
||||
'control_surname': ['user__surname'],
|
||||
'control_paiement': ['paiement'],
|
||||
'control_date': ['date'],
|
||||
'control_valid': ['valid'],
|
||||
'control_control': ['control'],
|
||||
'default': ['-date']
|
||||
}
|
||||
TOPOLOGIE_INDEX = {
|
||||
'dns': ['switch_interface__domain__name'],
|
||||
'ip': ['switch_interface__ipv4__ipv4'],
|
||||
'loc': ['location'],
|
||||
'ports': ['number'],
|
||||
'stack': ['stack__name'],
|
||||
'switch_dns': ['switch_interface__domain__name'],
|
||||
'switch_ip': ['switch_interface__ipv4__ipv4'],
|
||||
'switch_loc': ['location'],
|
||||
'switch_ports': ['number'],
|
||||
'switch_stack': ['stack__name'],
|
||||
'default': ['location', 'stack', 'stack_member_id']
|
||||
}
|
||||
TOPOLOGIE_INDEX_PORT = {
|
||||
'port': ['port'],
|
||||
'room': ['room__name'],
|
||||
'interface': ['machine_interface__domain__name'],
|
||||
'related': ['related__switch__name'],
|
||||
'radius': ['radius'],
|
||||
'vlan': ['vlan_force__name'],
|
||||
'port_port': ['port'],
|
||||
'port_room': ['room__name'],
|
||||
'port_interface': ['machine_interface__domain__name'],
|
||||
'port_related': ['related__switch__name'],
|
||||
'port_radius': ['radius'],
|
||||
'port_vlan': ['vlan_force__name'],
|
||||
'default': ['port']
|
||||
}
|
||||
TOPOLOGIE_INDEX_ROOM = {
|
||||
'name': ['name'],
|
||||
'room_name': ['name'],
|
||||
'default': ['name']
|
||||
}
|
||||
TOPOLOGIE_INDEX_STACK = {
|
||||
'name': ['name'],
|
||||
'id': ['stack_id'],
|
||||
'stack_name': ['name'],
|
||||
'stack_id': ['stack_id'],
|
||||
'default': ['stack_id'],
|
||||
}
|
||||
LOGS_INDEX = {
|
||||
'date': ['revision__date_created'],
|
||||
'sum_date': ['revision__date_created'],
|
||||
'default': ['-revision__date_created'],
|
||||
}
|
||||
LOGS_STATS_LOGS = {
|
||||
'author': ['user__name'],
|
||||
'date': ['date_created'],
|
||||
'logs_author': ['user__name'],
|
||||
'logs_date': ['date_created'],
|
||||
'default': ['-date_created']
|
||||
}
|
||||
|
||||
|
|
|
@ -28,12 +28,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<div style="display: flex; padding: 0;">
|
||||
{{ text }}
|
||||
<div style="display: grid; font-size: 9px; line-height: 1; margin: auto 0;">
|
||||
{% if prefix %}
|
||||
{% with prefix|add:'_'|add:col as colname %}
|
||||
<a role="button" href="{% url_insert_param request.get_full_path col=colname order='asc' %}" title="{{ desc|default:"Tri croissant" }}">
|
||||
<span class="glyphicon glyphicon-triangle-top"></span>
|
||||
</a>
|
||||
<a role="button" href="{% url_insert_param request.get_full_path col=colname order='desc' %}" title="{{ desc|default:"Tri décroissant" }}">
|
||||
<span class="glyphicon glyphicon-triangle-bottom"></span>
|
||||
</a>
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<a role="button" href="{% url_insert_param request.get_full_path col=col order='asc' %}" title="{{ desc|default:"Tri croissant" }}">
|
||||
<span class="glyphicon glyphicon-triangle-top"></span>
|
||||
</a>
|
||||
<a role="button" href="{% url_insert_param request.get_full_path col=col order='desc' %}" title="{{ desc|default:"Tri décroissant" }}">
|
||||
<span class="glyphicon glyphicon-triangle-bottom"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
|
|
|
@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col='name' text='Chambre' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='room' col='name' text='Chambre' %}</th>
|
||||
<th>Commentaire</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
|
@ -25,12 +25,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col='port' text='Port' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='room' text='Room' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='interface' text='Interface machine' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='related' text='Related' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='radius' text='Radius' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='vlan' text='Vlan forcé' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='port' text='Port' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='room' text='Room' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='interface' text='Interface machine' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='related' text='Related' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='radius' text='Radius' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='vlan' text='Vlan forcé' %}</th>
|
||||
<th>Détails</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
|
@ -25,8 +25,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col='name' text='Stack' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='id' text='ID' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='stack' col='name' text='Stack' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='stack' col='id' text='ID' %}</th>
|
||||
<th>Détails</th>
|
||||
<th>Membres</th>
|
||||
</tr>
|
||||
|
|
|
@ -25,11 +25,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col='dns' text='Dns' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='ip' text='Ipv4' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='loc' text='Localisation' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='ports' text='Ports' %}</th>
|
||||
<th>{% include "buttons/sort.html" with col='stack' text='Stack' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='dns' text='Dns' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='ip' text='Ipv4' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='loc' text='Localisation' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='ports' text='Ports' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='stack' text='Stack' %}</th>
|
||||
<th>Id interne stack</th>
|
||||
<th>Détails</th>
|
||||
<th></th>
|
||||
|
|
|
@ -29,10 +29,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col="user" text="Utilisateur" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='ban' col="user" text="Utilisateur" %}</th>
|
||||
<th>Raison</th>
|
||||
<th>{% include "buttons/sort.html" with col="start" text="Date de début" %}</th>
|
||||
<th>{% include "buttons/sort.html" with col="end" text="Date de fin" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='ban' col="start" text="Date de début" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='ban' col="end" text="Date de fin" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -29,10 +29,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col="name" text="Prénom" %}</th>
|
||||
<th>{% include "buttons/sort.html" with col="surname" text="Nom" %}</th>
|
||||
<th>{% include "buttons/sort.html" with col="pseudo" text="Pseudo" %}</th>
|
||||
<th>{% include "buttons/sort.html" with col="room" text="Chambre" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='user' col="name" text="Prénom" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='user' col="surname" text="Nom" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='user' col="pseudo" text="Pseudo" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='user' col="room" text="Chambre" %}</th>
|
||||
<th>Fin de cotisation le</th>
|
||||
<th>Connexion</th>
|
||||
<th>Profil</th>
|
||||
|
|
|
@ -29,10 +29,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with col="user" text="Utilisateur" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='white' col="user" text="Utilisateur" %}</th>
|
||||
<th>Raison</th>
|
||||
<th>{% include "buttons/sort.html" with col="start" text="Date de début" %}</th>
|
||||
<th>{% include "buttons/sort.html" with col="end" text="Date de fin" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='white' col="start" text="Date de début" %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='white' col="end" text="Date de fin" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
Loading…
Reference in a new issue