Compare commits

...

3 Commits

2 changed files with 54 additions and 22 deletions

View File

@ -153,13 +153,19 @@
{{$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 }}
</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>
<div class="flex justify-between border">
<div>
<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 }}
</a>
</div>
<div class="flex items-center">
<a href="/app/agenda/{{$evid}}/{{.Subscriber}}/delete" class="inline-flex">
<button type="button" class="w-full mr-2 py-1 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">Retirer</button></a>
<!-- <a href="/app/agenda/{{$evid}}/{{.Subscriber}}/delete" class="inline-flex font-bold text-co-red">x</a> -->
</li>
</div>
</div>
{{end}}
{{end}}
</ul>

View File

@ -1,19 +1,25 @@
{{define "content"}}
{{ if eq (index .ViewState.event.Owners 0) .Group.ID }}
<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">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"}}
{{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 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 space-between">
<div class="flex items-center space-x-5">
<div>
<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"}}
{{else}}
Du {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}} au {{(timeFrom
.ViewState.event.Enddate).Format "02/01/2006"}}
{{end}}
</p>
</div>
<a href="/app/agenda/{{.ViewState.event.ID}}">
<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">
Retour
</button>
</a>
</div>
</div>
</div>
@ -71,6 +77,26 @@
</tbody>
</table>
</main>
{{else}}
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
<div class="fixed inset-0 z-10 overflow-y-auto">
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full max-w-lg sm:p-6">
<div>
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
{{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
</div>
<div class="mt-3 text-center sm:mt-5">
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Vous n'avez pas accès à cette page</h3>
</div>
</div>
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-1">
<a href="/app/agenda/{{.ViewState.event.ID}}" class="mt-3 inline-flex w-full justify-center rounded-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">Annuler</a>
</div>
</div>
</div>
</div>
{{end}}
{{end}}