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