diff options
Diffstat (limited to 'app/views/home/index.html.erb')
-rw-r--r-- | app/views/home/index.html.erb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb new file mode 100644 index 0000000..ca8f3a3 --- /dev/null +++ b/app/views/home/index.html.erb @@ -0,0 +1,42 @@ +<h1>World Tartiflette Tour 2024</h1> + +<%= image_tag("blason_Savoie.png", :alt => "blason de la Savoie", id: "blason", width: 80) %> + +<%= render "code_of_honor" %> + +<h2>Noter les Tartiflettes</h2> +<ul> + <% @tartiflettes.each do |tartiflette| %> + <li><%= tartiflette.scoring_id %> + <% if session[:agreed_to_code_of_honor] %> + <% if TartifletteScoringService.scored?(tartiflette, session) %> + <%= link_to "modifier", tartiflette_edit_scores_path(tartiflette) %> + <% else %> + <%= link_to "noter", new_tartiflette_score_path(tartiflette) %> + <% end %> + <% end %> + </li> + <% end %> +</ul> +<!-- + <h2>Résultats</h2> + <table> + <thead> + <tr> + <th>Tartiflette</th> + <th>Points</th> + </tr> + </thead> + <tbody> + <% TartifletteScoringService.leaderboard.each do |tartiflette, total_score| %> + <tr> + <td><%= tartiflette.scoring_id %></td> + <td><%= total_score %></td> + </tr> + <% end %> + </tbody> + </table> +--> +<p> + <%= link_to "Admin", admin_dashboard_path %> +</p> |