diff --git a/app/views/promoter/events/index.html.erb b/app/views/promoter/events/index.html.erb index 3712949..c90571c 100644 --- a/app/views/promoter/events/index.html.erb +++ b/app/views/promoter/events/index.html.erb @@ -9,19 +9,22 @@ { name: 'Mes événements' } ] %> -
Gérez tous vos événements depuis cette interface
+Gérez tous vos événements depuis cette interface
+| Statut | Date | Lieu | -Actions | +Actions | @@ -94,27 +97,32 @@
-
- <%= link_to promoter_event_path(event), class: "text-gray-400 hover:text-gray-600 transition-colors", title: "Voir" do %>
-
+
+
+
+ |
@@ -125,17 +133,108 @@
+ <%= link_to promoter_event_path(event), class: "flex-1 lg:flex-initial inline-flex items-center justify-center px-3 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-200 transition-colors lg:bg-transparent lg:text-gray-400 lg:hover:text-gray-600 lg:p-0 lg:rounded-none whitespace-nowrap", title: "Voir" do %>
+
+ Voir
<% end %>
- <%= link_to edit_promoter_event_path(event), class: "text-gray-400 hover:text-blue-600 transition-colors", title: "Modifier" do %>
-
+ <%= link_to edit_promoter_event_path(event), class: "flex-1 lg:flex-initial inline-flex items-center justify-center px-3 py-2 bg-blue-100 text-blue-700 text-sm font-medium rounded-lg hover:bg-blue-200 transition-colors lg:bg-transparent lg:text-gray-400 lg:hover:text-blue-600 lg:p-0 lg:rounded-none whitespace-nowrap", title: "Modifier" do %>
+
+ Modifier
<% end %>
<% if event.draft? %>
- <%= button_to publish_promoter_event_path(event), method: :patch, class: "text-gray-400 hover:text-green-600 transition-colors", title: "Publier" do %>
-
+ <%= button_to publish_promoter_event_path(event), method: :patch, class: "flex-1 lg:flex-initial inline-flex items-center justify-center px-3 py-2 bg-green-100 text-green-700 text-sm font-medium rounded-lg hover:bg-green-200 transition-colors lg:bg-transparent lg:text-gray-400 lg:hover:text-green-600 lg:p-0 lg:rounded-none whitespace-nowrap", title: "Publier" do %>
+
+ Publier
<% end %>
<% elsif event.published? %>
- <%= button_to unpublish_promoter_event_path(event), method: :patch, class: "text-gray-400 hover:text-yellow-600 transition-colors", title: "Dépublier" do %>
-
+ <%= button_to unpublish_promoter_event_path(event), method: :patch, class: "flex-1 lg:flex-initial inline-flex items-center justify-center px-3 py-2 bg-yellow-100 text-yellow-700 text-sm font-medium rounded-lg hover:bg-yellow-200 transition-colors lg:bg-transparent lg:text-gray-400 lg:hover:text-yellow-600 lg:p-0 lg:rounded-none whitespace-nowrap", title: "Dépublier" do %>
+
+ Dépublier
<% end %>
<% end %>
<%= button_to promoter_event_path(event), method: :delete,
data: { confirm: "Êtes-vous sûr de vouloir supprimer cet événement ?" },
- class: "text-gray-400 hover:text-red-600 transition-colors", title: "Supprimer" do %>
-
+ class: "flex-1 lg:flex-initial inline-flex items-center justify-center px-3 py-2 bg-red-100 text-red-700 text-sm font-medium rounded-lg hover:bg-red-200 transition-colors lg:bg-transparent lg:text-gray-400 lg:hover:text-red-600 lg:p-0 lg:rounded-none whitespace-nowrap", title: "Supprimer" do %>
+
+ Supprimer
<% end %>
+ <% @events.each do |event| %>
+
+
+
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
+
+ + <%= link_to event.name, promoter_event_path(event), class: "hover:text-purple-600 transition-colors" %> +++ <%= event.description.truncate(100) %> + +
+ <% case event.state %>
+ <% when "draft" %>
+
+
+ Brouillon
+
+ <% when "published" %>
+
+
+ Publié
+
+ <% when "canceled" %>
+
+
+ Annulé
+
+ <% when "sold_out" %>
+
+
+ Complet
+
+ <% end %>
+
+ <% if event.featured? %>
+
+
+ À la une
+
+ <% end %>
+
+
+
+
+
+
+
+
+
+ <%= event.start_time.strftime("%d/%m/%Y") %>
+ <%= event.start_time.strftime("%H:%M") %>
+ <% else %>
+ Non définie
+ <% end %>
+
+
+ <%= event.venue_name %>
+ <%= event.venue_address %>
+
+ <%= link_to promoter_event_path(event), class: "w-full inline-flex items-center justify-center px-3 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-200 transition-colors" do %>
+
+ Voir
+ <% end %>
+ <%= link_to edit_promoter_event_path(event), class: "w-full inline-flex items-center justify-center px-3 py-2 bg-blue-100 text-blue-700 text-sm font-medium rounded-lg hover:bg-blue-200 transition-colors" do %>
+
+ Modifier
+ <% end %>
+
+
<%= paginate @events if respond_to?(:paginate) %>
<% else %>
-
-
-
+
+
+
- Aucun événement-Vous n'avez pas encore créé d'événement. Commencez dès maintenant ! - <%= link_to new_promoter_event_path, class: "inline-flex items-center px-6 py-3 bg-gray-900 text-white font-medium rounded-lg hover:bg-gray-800 transition-colors duration-200" do %> +Aucun événement+Vous n'avez pas encore créé d'événement. Commencez dès maintenant ! + <%= link_to new_promoter_event_path, class: "inline-flex items-center justify-center px-6 py-3 bg-gray-900 text-white font-medium rounded-lg hover:bg-gray-800 transition-colors duration-200 w-full sm:w-auto" do %> Créer mon premier événement <% end %> |
|---|