From 3dce51620fc53c5564ac7ed1e2218dc6176db539 Mon Sep 17 00:00:00 2001 From: Nicolas Caron Date: Wed, 8 Feb 2023 09:36:48 +0100 Subject: [PATCH] add 'History' page --- config.yaml | 3 ++ web/layouts/agenda/display-event.html | 1 + web/layouts/agenda/history-event.html | 51 +++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 web/layouts/agenda/history-event.html diff --git a/config.yaml b/config.yaml index e8174f6..0a0ded8 100644 --- a/config.yaml +++ b/config.yaml @@ -95,6 +95,9 @@ views: delete_subscriber: files: - web/layouts/agenda/delete-subscriber.html + history_event: + files: + - web/layouts/agenda/history-event.html directory: home: files: diff --git a/web/layouts/agenda/display-event.html b/web/layouts/agenda/display-event.html index 787d596..9cad872 100644 --- a/web/layouts/agenda/display-event.html +++ b/web/layouts/agenda/display-event.html @@ -70,6 +70,7 @@

Tous les inscrits

+ Historique
{{template "subscribers_table" .}}
diff --git a/web/layouts/agenda/history-event.html b/web/layouts/agenda/history-event.html new file mode 100644 index 0000000..b6cc468 --- /dev/null +++ b/web/layouts/agenda/history-event.html @@ -0,0 +1,51 @@ +{{define "content"}} + + + + + + + + + + + + {{$evid := .ViewState.event.ID}} + + {{range .ViewState.event.Subscriptions}} + + + + + + + + {{end}} + +
+ 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")}} + + +
+{{end}} \ No newline at end of file