From 41c1e109241b81d7eb1cc9722f4ef52e8877b001 Mon Sep 17 00:00:00 2001 From: Nicolas Caron Date: Wed, 15 Feb 2023 14:26:56 +0100 Subject: [PATCH] edit template 'history-event' --- .../agenda/_partials/subscribers-table.html | 6 +- web/layouts/agenda/display-event.html | 8 +- web/layouts/agenda/history-event.html | 121 +++++++++++------- 3 files changed, 80 insertions(+), 55 deletions(-) diff --git a/web/layouts/agenda/_partials/subscribers-table.html b/web/layouts/agenda/_partials/subscribers-table.html index 6851357..470dfc2 100644 --- a/web/layouts/agenda/_partials/subscribers-table.html +++ b/web/layouts/agenda/_partials/subscribers-table.html @@ -40,12 +40,8 @@ - + class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-red">Retirer diff --git a/web/layouts/agenda/display-event.html b/web/layouts/agenda/display-event.html index 9cad872..f809dc8 100644 --- a/web/layouts/agenda/display-event.html +++ b/web/layouts/agenda/display-event.html @@ -68,9 +68,13 @@ {{ if eq (index .ViewState.event.Owners 0) .Group.ID }}
-
+

Tous les inscrits

- Historique + + +
{{template "subscribers_table" .}}
diff --git a/web/layouts/agenda/history-event.html b/web/layouts/agenda/history-event.html index b6cc468..775bbca 100644 --- a/web/layouts/agenda/history-event.html +++ b/web/layouts/agenda/history-event.html @@ -1,51 +1,76 @@ {{define "content"}} - - - - - - - - - - - - {{$evid := .ViewState.event.ID}} - - {{range .ViewState.event.Subscriptions}} - - - - - +
+
+
+
+

Historique de l'évènement {{.ViewState.event.Name}}

+

+ {{if eq .ViewState.event.Startdate .ViewState.event.Enddate}} + Le {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}} + {{else}} + Du {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}} au {{(timeFrom + .ViewState.event.Enddate).Format "02/01/2006"}} + {{end}} +

+ Retour +
+
+
+ +
- Bénéficiaire - - Prescripteur - - Date d'inscription - - Supprimé par - - Date de supression - - Actions -
- -  {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }} - - -
 {{.Data.subscribed_by.user.display_name}}
- {{.Data.subscribed_by.group.name}} -
- {{(timeFormat .CreatedAt "02/01/2006")}} - - -
+ + + + + + + + + + + {{range .ViewState.event.DeletedSubscription}} + + + + + + + + {{end}} + +
+ Bénéficiaire + + Prescripteur + + Supprimé par + + Date de suppression + + Motif +
+ +  + {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index + $.ViewState.subscribers .Subscriber).Data.last_name }} + + +
 + {{.Data.subscribed_by.user.display_name}}
+ {{.Data.subscribed_by.group.name}} +
+
 + {{.Data.unsubscribed_by.user.display_name}}
+ {{.Data.unsubscribed_by.group.name}} +
+ {{(timeFormat .CreatedAt "02/01/2006")}} + +
{{.Data.motif}}
+
+ + - - {{end}} - - {{end}} \ No newline at end of file