Correction mise en page tableaux sur smartphone

Fix #87
This commit is contained in:
Jean-Marie Favreau 2025-03-15 22:07:53 +01:00
parent 527fa886b7
commit fa4024a912
5 changed files with 193 additions and 183 deletions

View File

@ -680,13 +680,15 @@ header .remarque {
margin-right: 2em; margin-right: 2em;
} }
} }
.form.recent { @media only screen and (min-width: 800px) {
display: grid; .form.recent {
grid-template-columns: repeat(2, 1fr); display: grid;
column-gap: .5em; grid-template-columns: repeat(2, 1fr);
:last-child, :nth-last-child(4), column-gap: .5em;
button { :last-child, :nth-last-child(4),
grid-column: 1/3; button {
grid-column: 1/3;
}
} }
} }
.form.recent.moderation-events { .form.recent.moderation-events {
@ -1636,7 +1638,7 @@ form.messages {
display: block; display: block;
fieldset div { fieldset div {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); //grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
margin-right: 1em; margin-right: 1em;
} }
} }

View File

@ -34,62 +34,64 @@
Les règles sont appliquées à l'import sur tous les événements, et à la demande sur tous les événements, avec confirmation dans le cas d'événements déjà catégorisés. Les règles sont appliquées à l'import sur tous les événements, et à la demande sur tous les événements, avec confirmation dans le cas d'événements déjà catégorisés.
</p> </p>
</header> </header>
<table role="grid"> <div class="large-table">
<thead> <table role="grid">
<tr> <thead>
<th>Identifiant</th>
<th>Catégorie</th>
<th>Conditions</th>
<th>Poids</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for obj in paginator_filter %}
<tr> <tr>
<td>{{ obj.pk }}</td> <th>Identifiant</th>
<td>{{ obj.category }}</td> <th>Catégorie</th>
<td> <th>Conditions</th>
<ul> <th>Poids</th>
{% if obj.title_contains %} <th>Actions</th>
<li>
Le titre contient
{% if obj.title_exact %}exactement{% endif %}
«&nbsp;{{ obj.title_contains }}&nbsp;»
</li>
{% endif %}
{% if obj.description_contains %}
<li>
La description contient
{% if obj.desc_exact %}exactement{% endif %}
«&nbsp;{{ obj.description_contains }}&nbsp;»
</li>
{% endif %}
{% if obj.location_contains %}
<li>
La localisation contient
{% if obj.loc_exact %}exactement{% endif %}
«&nbsp;{{ obj.location_contains }}&nbsp;»
</li>
{% endif %}
{% if obj.place %}
<li>
Le lieu est <a href="{{ obj.place.get_absolute_url }}">{{ obj.place.name }}</a>
</li>
{% endif %}
</ul>
</td>
<td>{{ obj.weight }}</td>
<td>
<div class="buttons">
<a href="{% url 'edit_catrule' obj.pk %}" role="button">Modifier</a>
<a href="{% url 'delete_catrule' obj.pk %}" role="button">Supprimer</a>
</div>
</td>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for obj in paginator_filter %}
<tr>
<td>{{ obj.pk }}</td>
<td>{{ obj.category }}</td>
<td>
<ul>
{% if obj.title_contains %}
<li>
Le titre contient
{% if obj.title_exact %}exactement{% endif %}
«&nbsp;{{ obj.title_contains }}&nbsp;»
</li>
{% endif %}
{% if obj.description_contains %}
<li>
La description contient
{% if obj.desc_exact %}exactement{% endif %}
«&nbsp;{{ obj.description_contains }}&nbsp;»
</li>
{% endif %}
{% if obj.location_contains %}
<li>
La localisation contient
{% if obj.loc_exact %}exactement{% endif %}
«&nbsp;{{ obj.location_contains }}&nbsp;»
</li>
{% endif %}
{% if obj.place %}
<li>
Le lieu est <a href="{{ obj.place.get_absolute_url }}">{{ obj.place.name }}</a>
</li>
{% endif %}
</ul>
</td>
<td>{{ obj.weight }}</td>
<td>
<div class="buttons">
<a href="{% url 'edit_catrule' obj.pk %}" role="button">Modifier</a>
<a href="{% url 'delete_catrule' obj.pk %}" role="button">Supprimer</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<footer> <footer>
<span>{% include "agenda_culturel/paginator.html" %}</span> <span>{% include "agenda_culturel/paginator.html" %}</span>
</footer> </footer>

View File

@ -43,68 +43,70 @@
<button type="submit">Filtrer</button> <button type="submit">Filtrer</button>
</form> </form>
</header> </header>
<table role="grid"> <div class="large-table">
<thead> <table role="grid">
<tr> <thead>
<th>Date</th>
<th>Type</th>
<th>Sujet</th>
<th>Auteur</th>
<th>Événement</th>
<th>Fermé</th>
<th>Spam</th>
</tr>
</thead>
<tbody>
{% for obj in paginator_filter %}
<tr> <tr>
<td>{{ obj.date }}</td> <th>Date</th>
<td> <th>Type</th>
{% if obj.message_type %} <th>Sujet</th>
{{ obj.get_message_type_display }} <th>Auteur</th>
{% else %} <th>Événement</th>
- <th>Fermé</th>
{% endif %} <th>Spam</th>
</td> </tr>
<td> </thead>
<a href="{% url 'message' obj.pk %}">{{ obj.subject }}</a> <tbody>
</td> {% for obj in paginator_filter %}
<td> <tr>
{% if obj.user %} <td>{{ obj.date }}</td>
<em>{{ obj.user }}</em> <td>
{% else %} {% if obj.message_type %}
{% if obj.name %} {{ obj.get_message_type_display }}
{{ obj.name }}
{% else %} {% else %}
- -
{% endif %} {% endif %}
{% endif %} </td>
</td> <td>
<td> <a href="{% url 'message' obj.pk %}">{{ obj.subject }}</a>
{% if obj.related_event %} </td>
<a href="{{ obj.related_event.get_absolute_url }}">{{ obj.related_event.pk }}</a> <td>
{% else %} {% if obj.user %}
- <em>{{ obj.user }}</em>
{% endif %} {% else %}
</td> {% if obj.name %}
<td> {{ obj.name }}
{% if obj.closed %} {% else %}
{% picto_from_name "check-square" "fermé" %} -
{% else %} {% endif %}
{% picto_from_name "square" "ouvert" %} {% endif %}
{% endif %} </td>
</td> <td>
<td> {% if obj.related_event %}
{% if obj.spam %} <a href="{{ obj.related_event.get_absolute_url }}">{{ obj.related_event.pk }}</a>
{% picto_from_name "check-square" "spam" %} {% else %}
{% else %} -
{% picto_from_name "square" "non spam" %} {% endif %}
{% endif %} </td>
</td> <td>
</tr> {% if obj.closed %}
{% endfor %} {% picto_from_name "check-square" "fermé" %}
</tbody> {% else %}
</table> {% picto_from_name "square" "ouvert" %}
{% endif %}
</td>
<td>
{% if obj.spam %}
{% picto_from_name "check-square" "spam" %}
{% else %}
{% picto_from_name "square" "non spam" %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<footer> <footer>
{% include "agenda_culturel/paginator_filter.html" %} {% include "agenda_culturel/paginator_filter.html" %}
</footer> </footer>

View File

@ -59,57 +59,59 @@
<button type="submit">Filtrer</button> <button type="submit">Filtrer</button>
</form> </form>
</header> </header>
<table role="grid"> <div class="large-table">
<thead> <table role="grid">
<tr> <thead>
<th>Id</th>
<th>Nom</th>
<th>Récurrence</th>
<th>Nb d'imports</th>
<th>Dernier</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for obj in paginator_filter %}
<tr> <tr>
<th>Id</th>
<th>Nom</th>
<th>Récurrence</th>
<th>Nb d'imports</th>
<th>Dernier</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for obj in paginator_filter %}
<tr>
<td>
{{ obj.pk }}</a>
</td>
<td> <td>
{{ obj.pk }}</a> {{ obj.name }}</a>
</td>
<td>{{ obj.get_recurrence_display }}</td>
<td>{{ obj.nb_imports }}</td>
<td>
{% if obj.nb_imports > 0 %}
{% with imp=obj.last_import %}
<span {% if imp.status == "failed" %}data-tooltip="{{ imp.error_message }}"{% endif %}>
{% if imp.status == "running" %}
<em>{{ imp.status }}</em>
{% else %}
{{ imp.status }}
{% if imp.status == "success" %}({{ imp.nb_initial }}){% endif %}
{% endif %}
</span>
{% endwith %}
{% endif %}
</td> </td>
<td> <td>
{{ obj.name }}</a> <div class="buttons">
</td> {% if not obj.last_import or obj.last_import.status != "running" %}
<td>{{ obj.get_recurrence_display }}</td> <a href="{% url 'run_rimport' obj.pk %}" role="button">Exécuter</a>
<td>{{ obj.nb_imports }}</td> {% else %}
<td> <a href="{% url 'cancel_import' obj.last_import.pk %}" role="button">Annuler</a>
{% if obj.nb_imports > 0 %} {% endif %}
{% with imp=obj.last_import %} <a href="{% url 'view_rimport' obj.pk %}" role="button">Consulter</a>
<span {% if imp.status == "failed" %}data-tooltip="{{ imp.error_message }}"{% endif %}> <a href="{% url 'edit_rimport' obj.pk %}" role="button">Modifier</a>
{% if imp.status == "running" %} </div>
<em>{{ imp.status }}</em> </td>
{% else %} </tr>
{{ imp.status }} {% endfor %}
{% if imp.status == "success" %}({{ imp.nb_initial }}){% endif %} </tbody>
{% endif %} </table>
</span> </div>
{% endwith %}
{% endif %}
</td>
<td>
<div class="buttons">
{% if not obj.last_import or obj.last_import.status != "running" %}
<a href="{% url 'run_rimport' obj.pk %}" role="button">Exécuter</a>
{% else %}
<a href="{% url 'cancel_import' obj.last_import.pk %}" role="button">Annuler</a>
{% endif %}
<a href="{% url 'view_rimport' obj.pk %}" role="button">Consulter</a>
<a href="{% url 'edit_rimport' obj.pk %}" role="button">Modifier</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<footer> <footer>
<span>{% include "agenda_culturel/paginator.html" %}</span> <span>{% include "agenda_culturel/paginator.html" %}</span>
</footer> </footer>

View File

@ -49,22 +49,24 @@
On affiche cette information pour les imports depuis le début de leur On affiche cette information pour les imports depuis le début de leur
intégration à l'agenda, mais aussi pour le dernier mois. intégration à l'agenda, mais aussi pour le dernier mois.
</p> </p>
<table> <div class="large-table">
<thead> <table>
<th class="label"></th> <thead>
{% for v in stats_foresight %}<th>{{ v.0 }}</th>{% endfor %} <th class="label"></th>
</thead> {% for v in stats_foresight %}<th>{{ v.0 }}</th>{% endfor %}
<tbody> </thead>
<tr> <tbody>
<th class="label">écart (en jours)</th> <tr>
{% for v in stats_foresight %}<th>{{ v.1 }}</th>{% endfor %} <th class="label">écart (en jours)</th>
</tr> {% for v in stats_foresight %}<th>{{ v.1 }}</th>{% endfor %}
<tr> </tr>
<th class="label">écart du dernier mois (en jours)</th> <tr>
{% for v in stats_foresight %}<th>{{ v.2 }}</th>{% endfor %} <th class="label">écart du dernier mois (en jours)</th>
</tr> {% for v in stats_foresight %}<th>{{ v.2 }}</th>{% endfor %}
</tbody> </tr>
</table> </tbody>
</table>
</div>
<h2>Par ville</h2> <h2>Par ville</h2>
<p>Nombre d'événements référencés par ville.</p> <p>Nombre d'événements référencés par ville.</p>
<ul> <ul>