This commit is contained in:
cangui 2025-05-09 17:05:31 +02:00
parent ecc1c44b60
commit 14cdf9c0e3
2 changed files with 36 additions and 34 deletions

View File

@ -2,11 +2,13 @@
{{ template "head" . }}
<div class="columns">
{{ template "sidebar" . }}
<div class="column is-10">
<h2>Historique des messages de l'utilisateur #{{ .UserID }}</h2>
<div class="mb-3">
<label>Filtrer par type :</label>
<select id="filterType" name="type" hx-get="/api/user/{{ .UserID }}/conversations" hx-target="#conversationRows" hx-trigger="change" hx-include="#filterType">
<select id="filterType" name="type" hx-get="/api/user/{{ .UserID }}/conversations" hx-target="#conversationRows"
hx-trigger="change" hx-include="#filterType">
<option value="">Tous</option>
<option value="text">Texte</option>
<option value="image">Image</option>
@ -26,14 +28,13 @@
<th>Statut</th>
</tr>
</thead>
<tbody id="conversationRows"
hx-get="/api/user/{{ .UserID }}/conversations"
hx-trigger="load"
hx-target="this"
<tbody id="conversationRows" hx-get="/api/user/{{ .UserID }}/conversations" hx-trigger="load" hx-target="this"
hx-swap="innerHTML">
</tbody>
</table>
<hr>
<h3>Conversation complète</h3>
<div id="threadViewer" class="mt-3"></div>
</div>
</div>
{{ end }}

View File

@ -5,9 +5,10 @@
<li><a href="/dashboard">🏠 Dashboard</a></li>
{{ if eq .User.Role "ADMIN" }}
<li><a href="/admin/users">👤 Utilisateurs</a></li>
<li><a href="/admin/user/new">👤 Utilisateurs</a></li>
<li><a href="/test/send">📤 Test envoi</a></li>
<li><a href="/test/send2">📤 Test envoi template</a></li>
{{ end }}
<li><a href="/admin/user/{{ .User.ID }}/conversations">💬 Mes conversations</a></li>