edit display-event and history-event template

This commit is contained in:
Nicolas CARON 2023-02-16 09:05:36 +01:00
parent 41c1e10924
commit 09b0458f62
2 changed files with 9 additions and 4 deletions

View File

@ -72,7 +72,7 @@
<h2 id="event-information-title" class="text-lg leading-6 font-medium text-gray-900">Tous les inscrits</h2>
<a href="/app/agenda/{{.ViewState.event.ID}}/history">
<button type="submit"class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
Historique
Bénéficiaires désinscrits
</button>
</a>
</div>
@ -150,11 +150,16 @@
<h2 id="subscribers-title" class="text-lg font-medium text-gray-900 mt-10">Bénéficiaires {{.Group.Data.name}} inscrits</h2>
<div class="mt-2">
<ul class="p-1">
{{$evid := .ViewState.event.ID}}
{{range .ViewState.event.Subscriptions}}
{{if eq $.Group.ID .Data.subscribed_by.group.id}}
<a href="/app/beneficiaries/{{.Subscriber}}">
<li class="inline-flex text-sm p-2"><img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Subscriber}}/picture"> {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }}</li>
<li class="inline-flex text-sm p-2"><img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Subscriber}}/picture"> {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }}
</a>
<a href="/app/agenda/{{$evid}}/{{.Subscriber}}/delete" class="inline-flex">
<button type="button"
class="w-full ml-2 px-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">x</button></a>
</li>
{{end}}
{{end}}
</ul>

View File

@ -4,7 +4,7 @@
class="max-w-3xl mx-auto px-4 sm:px-6 md:flex md:items-center md:justify-between md:space-x-5 lg:max-w-7xl lg:px-8">
<div class="flex items-center space-x-5">
<div>
<h1 class="text-2xl font-bold text-gray-900">Historique de l'évènement {{.ViewState.event.Name}}</h1>
<h1 class="text-2xl font-bold text-gray-900">Bénéficiaires désinscrits de l'évènement {{.ViewState.event.Name}}</h1>
<p class="text-m font-medium text-gray-500">
{{if eq .ViewState.event.Startdate .ViewState.event.Enddate}}
Le {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}}
@ -28,7 +28,7 @@
Prescripteur
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Supprimé par
Désinscrit par
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Date de suppression