From fe5c5b24c462243fcb7c13b3f380378d8935fba2 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Tue, 31 Dec 2024 19:24:40 +0100 Subject: Updated views. --- app/views/admin/dashboard/index.html.erb | 7 +++++-- app/views/home/index.html.erb | 22 ++++++++++++++++++---- app/views/layouts/_cookies.html.erb | 8 ++++++-- app/views/layouts/_topnav.html.erb | 3 +++ app/views/tartiflettes/index.html.erb | 15 ++++++++++++++- 5 files changed, 46 insertions(+), 9 deletions(-) diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index 30cf866..b3dc2e9 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -1,10 +1,13 @@

Administrateur

- -

<%= button_to "Déconnexion", session_path(session), method: :delete %>

+ +

Tartiflettes

+ +<%= render "scores_by_category" %> +

<%= link_to "Télécharger tous les scores en format CSV", admin_scores_export_path %>

diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index cc25992..3dfba3c 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,25 +1,39 @@

World Tartiflette Tour 2024

-<%= image_tag("blason_Savoie.png", :alt => "blason de la Savoie", id: "blason", width: 80) %> +<%= image_tag("blason_Savoie.png", + alt: "blason de la Savoie", + id: "blason", + width: 80) %> <%= render "code_of_honor" %> - +

Noter

<% @tartiflettes.each do |tartiflette| %>

Tartiflette <%= tartiflette.scoring_id %>

<% if session[:agreed_to_code_of_honor] %> <% if TartifletteScoringService.scored?(tartiflette, session) %> - <%= link_to "Modifier", tartiflette_edit_scores_path(tartiflette), class: [ "tartiflette-link", "scored" ] %> + <%= link_to "Modifier", + tartiflette_edit_scores_path(tartiflette), + class: [ "tartiflette-link", "scored" ] %> <% else %> - <%= link_to "Noter", new_tartiflette_score_path(tartiflette), class: [ "tartiflette-link", "unscored" ] %> + <%= link_to "Noter", + new_tartiflette_score_path(tartiflette), + class: [ "tartiflette-link", "unscored" ] %> <% end %> <% end %>
<% end %>
+

Participants

+ +

<%= link_to "Admin", admin_dashboard_path %>

diff --git a/app/views/layouts/_cookies.html.erb b/app/views/layouts/_cookies.html.erb index 0e6949a..a32549d 100644 --- a/app/views/layouts/_cookies.html.erb +++ b/app/views/layouts/_cookies.html.erb @@ -3,6 +3,10 @@ Acceptez les cookies ou contribuer 2 € à la tartiflette de Nicolas 💸

- <%= button_to "Accepter les cookies", dismiss_banner_path %> - <%= button_to "Faire un don", dismiss_banner_path %> + <%= image_tag("baboon_cookie_icon.webp", + alt: "Baboon pointing at viewer", + id: "baboon") %> +
+ <%= button_to "Accepter les cookies", accept_cookies_path %> + <%= button_to "Faire un don", gift_nico_path %>
diff --git a/app/views/layouts/_topnav.html.erb b/app/views/layouts/_topnav.html.erb index f93ed99..1131b3e 100644 --- a/app/views/layouts/_topnav.html.erb +++ b/app/views/layouts/_topnav.html.erb @@ -1,5 +1,8 @@ diff --git a/app/views/tartiflettes/index.html.erb b/app/views/tartiflettes/index.html.erb index 09b2748..c38c6a0 100644 --- a/app/views/tartiflettes/index.html.erb +++ b/app/views/tartiflettes/index.html.erb @@ -1,3 +1,16 @@

Tartiflettes

-

Toutes les tartiflettes

+ + + + + + + + <% @tartiflettes.each do |tartiflette| %> + + + + <% end %> + +
Nom
<%= tartiflette.name %>
-- cgit v1.2.3