edit template 'history-event'
This commit is contained in:
@@ -1,51 +1,76 @@
|
||||
{{define "content"}}
|
||||
<table class="min-w-full divide-y divide-gray-300 border-t border-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col"
|
||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 ">
|
||||
Bénéficiaire
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Prescripteur
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Date d'inscription
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Supprimé par
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">Date de supression</span>
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">Actions</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{$evid := .ViewState.event.ID}}
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.event.Subscriptions}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
<a href="/app/beneficiaries/{{.Subscriber}}" class="flex">
|
||||
<img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Subscriber}}/picture" alt=" "> {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="flex"><img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Data.subscribed_by.user.id}}/picture" alt=" "> {{.Data.subscribed_by.user.display_name}}</div>
|
||||
{{.Data.subscribed_by.group.name}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
{{(timeFormat .CreatedAt "02/01/2006")}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<!-- <a href=""
|
||||
class="text-co-blue hover:text-co-blue">Voir</a> -->
|
||||
</td>
|
||||
<main class="py-10">
|
||||
<div
|
||||
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>
|
||||
<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"}}
|
||||
{{else}}
|
||||
Du {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}} au {{(timeFrom
|
||||
.ViewState.event.Enddate).Format "02/01/2006"}}
|
||||
{{end}}
|
||||
</p>
|
||||
<a href="/app/agenda/{{.ViewState.event.ID}}" class="mt-1 max-w-2xl text-sm text-gray-500">Retour</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="mt-4 min-w-full divide-y divide-gray-300 border-t border-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 ">
|
||||
Bénéficiaire
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
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
|
||||
</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
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Motif
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.event.DeletedSubscription}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
<a href="/app/beneficiaries/{{.Subscriber}}" class="flex">
|
||||
<img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Subscriber}}/picture" alt=" ">
|
||||
{{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index
|
||||
$.ViewState.subscribers .Subscriber).Data.last_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="flex"><img class="h-6 w-6 rounded-co mr-2"
|
||||
src="/app/beneficiaries/{{.Data.subscribed_by.user.id}}/picture" alt=" ">
|
||||
{{.Data.subscribed_by.user.display_name}}</div>
|
||||
{{.Data.subscribed_by.group.name}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="flex"><img class="h-6 w-6 rounded-co mr-2"
|
||||
src="/app/beneficiaries/{{.Data.unsubscribed_by.user.id}}/picture" alt=" ">
|
||||
{{.Data.unsubscribed_by.user.display_name}}</div>
|
||||
{{.Data.unsubscribed_by.group.name}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
{{(timeFormat .CreatedAt "02/01/2006")}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="flex">{{.Data.motif}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
|
||||
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user