Redesign invite organizer page to match admin theme (table, cards, badges)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,89 +1,86 @@
|
||||
{% extends 'admin/base.html.twig' %}
|
||||
|
||||
{% block title %}Inviter un organisateur - Admin{% endblock %}
|
||||
{% block title %}Inviter un organisateur{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="w-full md:w-[80%] mx-auto py-12 px-4">
|
||||
<h1 class="text-3xl font-black uppercase tracking-tighter italic heading-page">Inviter un organisateur</h1>
|
||||
<p class="font-bold text-gray-600 italic mb-8">Envoyer une invitation par email a un futur organisateur.</p>
|
||||
|
||||
{% for message in app.flashes('success') %}
|
||||
<div class="flash-success"><p class="font-black text-sm">{{ message }}</p></div>
|
||||
{% endfor %}
|
||||
{% for message in app.flashes('error') %}
|
||||
<div class="flash-error"><p class="font-black text-sm">{{ message }}</p></div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="card-brutal overflow-hidden mb-8">
|
||||
<div class="section-header">
|
||||
<h2 class="text-[10px] font-black uppercase tracking-widest text-white">Nouvelle invitation</h2>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<form method="post" action="{{ path('app_admin_invite_organizer') }}" class="form-col">
|
||||
<div>
|
||||
<label for="inv_company" class="text-xs font-black uppercase tracking-widest form-label">Raison sociale</label>
|
||||
<input type="text" id="inv_company" name="company_name" required class="form-input focus:border-indigo-600" placeholder="Association / Entreprise">
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="inv_last_name" class="text-xs font-black uppercase tracking-widest form-label">Nom</label>
|
||||
<input type="text" id="inv_last_name" name="last_name" required class="form-input focus:border-indigo-600" placeholder="Dupont">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inv_first_name" class="text-xs font-black uppercase tracking-widest form-label">Prenom</label>
|
||||
<input type="text" id="inv_first_name" name="first_name" required class="form-input focus:border-indigo-600" placeholder="Jean">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="inv_email" class="text-xs font-black uppercase tracking-widest form-label">Email</label>
|
||||
<input type="email" id="inv_email" name="email" required class="form-input focus:border-indigo-600" placeholder="contact@association.fr">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="inv_message" class="text-xs font-black uppercase tracking-widest form-label">Message personnalise (optionnel)</label>
|
||||
<textarea id="inv_message" name="message" rows="4" class="form-input focus:border-indigo-600" placeholder="Bonjour, nous vous invitons a rejoindre E-Ticket..."></textarea>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" class="btn-brutal font-black uppercase text-sm tracking-widest hover:bg-indigo-600 hover:text-white transition-all">
|
||||
Envoyer l'invitation
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center justify-between gap-4 mb-8">
|
||||
<div>
|
||||
<h1 class="text-3xl font-black uppercase tracking-tighter italic heading-page">Inviter un organisateur</h1>
|
||||
<p class="font-bold text-gray-500 italic">Envoyer une invitation par email.</p>
|
||||
</div>
|
||||
<a href="{{ path('app_admin_organizers') }}" class="admin-btn-sm-white inline-block text-xs font-black uppercase tracking-widest hover:bg-indigo-600 hover:text-black transition-all">Retour aux organisateurs</a>
|
||||
</div>
|
||||
|
||||
{% if invitations|length > 0 %}
|
||||
<div class="card-brutal overflow-hidden">
|
||||
<div class="section-header">
|
||||
<h2 class="text-[10px] font-black uppercase tracking-widest text-white">Invitations envoyees</h2>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
{% for inv in invitations %}
|
||||
<div class="flex flex-wrap items-center gap-4 py-3 {{ not loop.last ? 'border-b border-gray-200' : '' }}">
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="font-black text-sm">{{ inv.companyName }}</p>
|
||||
<p class="text-xs font-bold text-gray-500">{{ inv.firstName }} {{ inv.lastName }} — {{ inv.email }}</p>
|
||||
</div>
|
||||
<span class="text-xs font-bold text-gray-400">{{ inv.createdAt|date('d/m/Y H:i') }}</span>
|
||||
{% if inv.status == 'sent' %}
|
||||
<span class="badge-yellow text-[10px] font-black uppercase">Envoyee</span>
|
||||
{% elseif inv.status == 'opened' %}
|
||||
<span class="badge-yellow text-[10px] font-black uppercase">Ouverte</span>
|
||||
{% elseif inv.status == 'accepted' %}
|
||||
<span class="badge-green text-[10px] font-black uppercase">Acceptee</span>
|
||||
{% elseif inv.status == 'refused' %}
|
||||
<span class="badge-red text-[10px] font-black uppercase">Refusee</span>
|
||||
{% endif %}
|
||||
{% if inv.respondedAt %}
|
||||
<span class="text-[10px] font-bold text-gray-400">{{ inv.respondedAt|date('d/m/Y H:i') }}</span>
|
||||
{% endif %}
|
||||
<div class="admin-card mb-8">
|
||||
<h2 class="text-sm font-black uppercase tracking-widest mb-6">Nouvelle invitation</h2>
|
||||
<form method="post" action="{{ path('app_admin_invite_organizer') }}">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
||||
<div>
|
||||
<label for="inv_company" class="block text-[10px] font-black uppercase tracking-widest text-gray-500 mb-1">Raison sociale</label>
|
||||
<input type="text" id="inv_company" name="company_name" required class="admin-form-input" placeholder="Association / Entreprise">
|
||||
</div>
|
||||
<div>
|
||||
<label for="inv_email" class="block text-[10px] font-black uppercase tracking-widest text-gray-500 mb-1">Email</label>
|
||||
<input type="email" id="inv_email" name="email" required class="admin-form-input" placeholder="contact@association.fr">
|
||||
</div>
|
||||
<div>
|
||||
<label for="inv_last_name" class="block text-[10px] font-black uppercase tracking-widest text-gray-500 mb-1">Nom</label>
|
||||
<input type="text" id="inv_last_name" name="last_name" required class="admin-form-input" placeholder="Dupont">
|
||||
</div>
|
||||
<div>
|
||||
<label for="inv_first_name" class="block text-[10px] font-black uppercase tracking-widest text-gray-500 mb-1">Prenom</label>
|
||||
<input type="text" id="inv_first_name" name="first_name" required class="admin-form-input" placeholder="Jean">
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="mb-4">
|
||||
<label for="inv_message" class="block text-[10px] font-black uppercase tracking-widest text-gray-500 mb-1">Message personnalise (optionnel)</label>
|
||||
<textarea id="inv_message" name="message" rows="3" class="admin-form-input" placeholder="Bonjour, nous vous invitons a rejoindre E-Ticket..."></textarea>
|
||||
</div>
|
||||
<button type="submit" class="admin-btn-search font-black uppercase text-xs tracking-widest hover:bg-indigo-600 hover:text-black transition-all">Envoyer l'invitation</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="admin-card !p-0">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-[10px] font-black uppercase tracking-widest text-white">Organisateur</th>
|
||||
<th class="text-[10px] font-black uppercase tracking-widest text-white">Raison sociale</th>
|
||||
<th class="text-[10px] font-black uppercase tracking-widest text-white">Email</th>
|
||||
<th class="text-[10px] font-black uppercase tracking-widest text-white">Date</th>
|
||||
<th class="text-[10px] font-black uppercase tracking-widest text-white text-right">Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for inv in invitations %}
|
||||
<tr class="hover:bg-gray-50 transition-all">
|
||||
<td>
|
||||
<p class="font-bold text-sm">{{ inv.firstName }} {{ inv.lastName }}</p>
|
||||
</td>
|
||||
<td class="text-sm text-gray-600">{{ inv.companyName }}</td>
|
||||
<td class="text-sm text-gray-600">{{ inv.email }}</td>
|
||||
<td class="text-sm text-gray-400">{{ inv.createdAt|date('d/m/Y H:i') }}</td>
|
||||
<td class="text-right">
|
||||
{% if inv.status == 'sent' %}
|
||||
<span class="admin-badge-yellow text-xs font-black uppercase">Envoyee</span>
|
||||
{% elseif inv.status == 'opened' %}
|
||||
<span class="admin-badge-yellow text-xs font-black uppercase">Ouverte</span>
|
||||
{% elseif inv.status == 'accepted' %}
|
||||
<span class="admin-badge-green text-xs font-black uppercase">Acceptee</span>
|
||||
{% elseif inv.status == 'refused' %}
|
||||
<span class="admin-badge-red text-xs font-black uppercase">Refusee</span>
|
||||
{% endif %}
|
||||
{% if inv.respondedAt %}
|
||||
<span class="text-[10px] text-gray-400 ml-2">{{ inv.respondedAt|date('d/m/Y') }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5" class="!text-center !py-12 text-gray-400 font-bold text-sm">Aucune invitation envoyee.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user