2 Commits

Author SHA1 Message Date
kbe
24126eb834 style: lint code
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m55s
2025-09-15 17:41:35 +02:00
kbe
9a1976b6af Add breadcrumb to settings page 2025-09-15 17:41:23 +02:00
4 changed files with 33 additions and 18 deletions

View File

@@ -21,8 +21,8 @@
</span> </span>
<% else %> <% else %>
<span class="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-gray-50 text-gray-600 border border-gray-200"> <span class="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-gray-50 text-gray-600 border border-gray-200">
<i data-lucide="circle-check" class="w-3 h-3 mr-1 text-green-500"></i> <i data-lucide="ticket" class="w-3 h-3 mr-1 text-green-500"></i>
<%= remaining %> disponibles <%= remaining %>
</span> </span>
<% end %> <% end %>
</div> </div>
@@ -61,4 +61,4 @@
<% end %> <% end %>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,5 +1,12 @@
<div class="min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8"> <div class="min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
<div class="max-w-2xl mx-auto space-y-8"> <div class="max-w-2xl mx-auto space-y-8">
<!-- Breadcrumb -->
<%= render 'components/breadcrumb', crumbs: [
{ name: 'Accueil', path: root_path },
{ name: 'Paramètres', path: settings_path },
{ name: 'Modifier le compte', path: nil }
] %>
<!-- Header --> <!-- Header -->
<div class="text-center"> <div class="text-center">
<%= link_to "/" do %> <%= link_to "/" do %>

View File

@@ -56,7 +56,7 @@
</h3> </h3>
<p class="text-gray-700 font-medium"><%= @event.venue_name %></p> <p class="text-gray-700 font-medium"><%= @event.venue_name %></p>
<p class="text-gray-600 mt-2 mb-4"><%= @event.venue_address %></p> <p class="text-gray-600 mt-2 mb-4"><%= @event.venue_address %></p>
<% if @event.latitude.present? && @event.longitude.present? %> <% if @event.latitude.present? && @event.longitude.present? %>
<div class="border-t border-gray-200 pt-4"> <div class="border-t border-gray-200 pt-4">
<% if @event.geocoding_status_message %> <% if @event.geocoding_status_message %>
@@ -69,26 +69,26 @@
<% end %> <% end %>
<p class="text-sm font-medium text-gray-700 mb-2">Ouvrir dans :</p> <p class="text-sm font-medium text-gray-700 mb-2">Ouvrir dans :</p>
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<% <%
encoded_address = URI.encode_www_form_component(@event.venue_address) encoded_address = URI.encode_www_form_component(@event.venue_address)
lat = @event.latitude lat = @event.latitude
lng = @event.longitude lng = @event.longitude
map_providers = { map_providers = {
"OpenStreetMap" => "https://www.openstreetmap.org/?mlat=#{lat}&mlon=#{lng}#map=16/#{lat}/#{lng}", "OpenStreetMap" => "https://www.openstreetmap.org/?mlat=#{lat}&mlon=#{lng}#map=16/#{lat}/#{lng}",
"Google Maps" => "https://www.google.com/maps/search/#{encoded_address}/@#{lat},#{lng},16z", "Google Maps" => "https://www.google.com/maps/search/#{encoded_address}/@#{lat},#{lng},16z",
"Apple Plans" => "https://maps.apple.com/?address=#{encoded_address}&ll=#{lat},#{lng}" "Apple Plans" => "https://maps.apple.com/?address=#{encoded_address}&ll=#{lat},#{lng}"
} }
icons = { icons = {
"OpenStreetMap" => "🗺️", "OpenStreetMap" => "🗺️",
"Google Maps" => "🔍", "Google Maps" => "🔍",
"Apple Plans" => "🍎" "Apple Plans" => "🍎"
} }
%> %>
<% map_providers.each do |name, url| %> <% map_providers.each do |name, url| %>
<%= link_to url, target: "_blank", rel: "noopener", <%= link_to url, target: "_blank", rel: "noopener",
class: "inline-flex items-center px-3 py-2 text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors" do %> class: "inline-flex items-center px-3 py-2 text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors" do %>
<span class="mr-1"><%= icons[name] %></span> <span class="mr-1"><%= icons[name] %></span>
<%= name %> <%= name %>
@@ -143,7 +143,7 @@
<h2 class="text-lg font-bold text-gray-900">Billets disponibles</h2> <h2 class="text-lg font-bold text-gray-900">Billets disponibles</h2>
</div> </div>
<div class=""> <div>
<% if @event.ticket_types.any? %> <% if @event.ticket_types.any? %>
<div class="space-y-4 mb-6"> <div class="space-y-4 mb-6">
<% @event.ticket_types.each do |ticket_type| %> <% @event.ticket_types.each do |ticket_type| %>

View File

@@ -1,4 +1,12 @@
<div class="min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8"> <div class="min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
<div class="max-w-2xl mx-auto space-y-8">
<!-- Breadcrumb -->
<%= render 'components/breadcrumb', crumbs: [
{ name: 'Accueil', path: root_path },
{ name: 'Paramètres', path: settings_path }
] %>
</div>
<div class="max-w-2xl mx-auto space-y-8"> <div class="max-w-2xl mx-auto space-y-8">
<!-- Header --> <!-- Header -->
<div class="text-center"> <div class="text-center">
@@ -41,7 +49,7 @@
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-lucide="user" class="w-5 h-5 text-gray-400"></i> <i data-lucide="user" class="w-5 h-5 text-gray-400"></i>
</div> </div>
<%= f.text_field :first_name, <%= f.text_field :first_name,
class: "block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-xl shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors", class: "block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-xl shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors",
placeholder: "Votre prénom" %> placeholder: "Votre prénom" %>
</div> </div>
@@ -53,7 +61,7 @@
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-lucide="user" class="w-5 h-5 text-gray-400"></i> <i data-lucide="user" class="w-5 h-5 text-gray-400"></i>
</div> </div>
<%= f.text_field :last_name, <%= f.text_field :last_name,
class: "block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-xl shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors", class: "block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-xl shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors",
placeholder: "Votre nom de famille" %> placeholder: "Votre nom de famille" %>
</div> </div>
@@ -65,13 +73,13 @@
<h4 class="text-lg font-medium text-gray-900 mb-4">Type de compte</h4> <h4 class="text-lg font-medium text-gray-900 mb-4">Type de compte</h4>
<div class="bg-gray-50 p-4 rounded-xl"> <div class="bg-gray-50 p-4 rounded-xl">
<div class="flex items-start space-x-3"> <div class="flex items-start space-x-3">
<%= f.check_box :is_professionnal, <%= f.check_box :is_professionnal,
class: "mt-1 h-5 w-5 text-purple-600 border-gray-300 rounded focus:ring-purple-500" %> class: "mt-1 h-5 w-5 text-purple-600 border-gray-300 rounded focus:ring-purple-500" %>
<div class="flex-1"> <div class="flex-1">
<%= f.label :is_professionnal, "Compte professionnel", <%= f.label :is_professionnal, "Compte professionnel",
class: "block text-sm font-medium text-gray-900 cursor-pointer" %> class: "block text-sm font-medium text-gray-900 cursor-pointer" %>
<p class="mt-1 text-sm text-gray-600"> <p class="mt-1 text-sm text-gray-600">
Les comptes professionnels peuvent créer et gérer des événements. Les comptes professionnels peuvent créer et gérer des événements.
Cette option vous permet d'accéder aux fonctionnalités de promotion d'événements. Cette option vous permet d'accéder aux fonctionnalités de promotion d'événements.
</p> </p>
</div> </div>
@@ -92,7 +100,7 @@
<div class="bg-white py-6 px-6 shadow-xl rounded-2xl"> <div class="bg-white py-6 px-6 shadow-xl rounded-2xl">
<h3 class="text-lg font-semibold text-gray-900 mb-4">Gestion du compte</h3> <h3 class="text-lg font-semibold text-gray-900 mb-4">Gestion du compte</h3>
<div class="space-y-3"> <div class="space-y-3">
<%= link_to edit_user_registration_path, <%= link_to edit_user_registration_path,
class: "flex items-center p-3 text-gray-700 hover:bg-gray-50 rounded-lg transition-colors" do %> class: "flex items-center p-3 text-gray-700 hover:bg-gray-50 rounded-lg transition-colors" do %>
<i data-lucide="key" class="w-5 h-5 mr-3 text-gray-400"></i> <i data-lucide="key" class="w-5 h-5 mr-3 text-gray-400"></i>
<div> <div>
@@ -112,4 +120,4 @@
<% end %> <% end %>
</div> </div>
</div> </div>
</div> </div>