Merge recent UI & Postgres work into main branch #4

Merged
bouzoure merged 19 commits from postgres into main 2025-07-24 12:13:01 +02:00
2 changed files with 79 additions and 41 deletions
Showing only changes of commit 898b9bbb63 - Show all commits

View file

@ -53,3 +53,7 @@ a {
#licenses p {
margin: 0;
}
.fs-7 {
font-size: .75rem !important;
}

View file

@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}
{% block main %}
<div class="container my-4">
<div class="container-fluid my-4 px-4">
<div class="mb-4">
<nav>
<ol class="breadcrumb">
@ -243,46 +243,80 @@
</form>
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="w-25">Nom</th>
<th class="w-50 d-none d-sm-table-cell">Adresse</th>
<th class="w-25">Section</th>
</tr>
</thead>
<tbody>
{% for Person in People %}
<tr>
<td>
{% if Person.IsMember %}
<a href="/members/{{ Person.ID }}">
{{ Person.LastName }} {{ Person.FirstName }}
</a>
{% else %}
<a href="/contacts/{{ Person.ID }}">
{{ Person.LastName }} {{ Person.FirstName }}
</a>
{% endif %}
</td>
<td class="d-none d-sm-table-cell">
{{ Person.Address1 }}
{% if Person.Address1 and (Person.PostalCode or Person.City) %}
&ndash;
{% endif %}
{{ Person.PostalCode }}
{{ Person.City }}
</td>
<td>
{% if Person.SectionID %}
{{ Person.Section.Name }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div>
<!--
<div class="row">
<div class="col">Nom</div>
<div class="col">Adresse</div>
<div class="col">Lieu</div>
<div class="col">Section</div>
<div class="col">Création</div>
<div class="col">Modification</div>
</div>
-->
{% for Person in People %}
<div class="card card-body my-2 py-2 bg-body-tertiary">
<div class="row">
<div class="col-xxl col-lg-4 col-md-6 order-1 order-md-1 order-lg-1 order-xxl-1">
<div class="text-bold fs-7 mt-xxl-0 mt-2">
Nom
</div>
<div>
{% if Person.IsMember %}
<a href="/members/{{ Person.ID }}">
{{ Person.LastName }} {{ Person.FirstName }}
</a>
{% else %}
<a href="/contacts/{{ Person.ID }}">
{{ Person.LastName }} {{ Person.FirstName }}
</a>
{% endif %}
</div>
</div>
<div class="col-xxl col-lg-4 col-md-6 order-2 order-md-3 order-lg-2 order-xxl-2">
<div class="text-bold fs-7 mt-xxl-0 mt-2">
Adresse
</div>
<div>
{{ Person.Address1 }}
</div>
</div>
<div class="col-xxl col-lg-4 col-md-6 order-3 order-md-5 order-lg-5 order-xxl-3">
<div class="text-bold fs-7 mt-xxl-0 mt-2">
Lieu
</div>
<div>
{{ Person.PostalCode }} {{ Person.City }}
</div>
</div>
<div class="col-xxl col-lg-4 col-md-6 order-4 order-md-2 order-lg-4 order-xxl-4">
<div class="text-bold fs-7 mt-xxl-0 mt-2">
Section
</div>
<div>
{{ Person.Section.Name }}
</div>
</div>
<div class="col-xxl col-lg-4 col-md-6 order-5 order-md-3 order-lg-4 order-xxl-5" data-key="created_at" data-value="{{ Person.CreatedAt|date:"2006-01-02 15:04" }}">
<div class="text-bold fs-7 mt-xxl-0 mt-2">
Création
</div>
<div>
{{ Person.CreatedAt|date:"02.01.2006 - 15:04" }}
</div>
</div>
<div class="col-xxl col-lg-4 col-md-6 order-last order-md-last order-lg-last order-xxl-last" data-key="created_at" data-value="{{ Person.UpdatedAt|date:"2006-01-02 15:04" }}">
<div class="text-bold fs-7 mt-xxl-0 mt-2">
Mise à jour
</div>
<div>
{{ Person.UpdatedAt|date:"02.01.2006 - 15:04" }}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<nav class="mt-3 mb-5">