summaryrefslogtreecommitdiff
path: root/app/views/admin/dashboard
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2024-12-29 15:14:43 +0100
committerMarius Peter <marius.peter@tutanota.com>2024-12-29 15:14:43 +0100
commitbe2a93525069de2dfa3c23b0c23e7a9f7ad4c03d (patch)
treeb5493e9d35d024ce7be072ec2168b4a98ba0e63f /app/views/admin/dashboard
First commit.
Diffstat (limited to 'app/views/admin/dashboard')
-rw-r--r--app/views/admin/dashboard/index.html.erb10
-rw-r--r--app/views/admin/dashboard/tmp19
2 files changed, 29 insertions, 0 deletions
diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb
new file mode 100644
index 0000000..30cf866
--- /dev/null
+++ b/app/views/admin/dashboard/index.html.erb
@@ -0,0 +1,10 @@
+<h1>Administrateur</h1>
+
+<!-- <h2>Tartiflettes</h2> -->
+
+<p>
+ <%= button_to "Déconnexion",
+ session_path(session),
+ method: :delete %>
+</p>
+<p><%= link_to "Télécharger tous les scores en format CSV", admin_scores_export_path %></p>
diff --git a/app/views/admin/dashboard/tmp b/app/views/admin/dashboard/tmp
new file mode 100644
index 0000000..986fc28
--- /dev/null
+++ b/app/views/admin/dashboard/tmp
@@ -0,0 +1,19 @@
+<% ScoringCriterium.grouped_by_category.each do |category, criteria| %>
+ <h3><%= category.capitalize %></h3>
+ <table>
+ <thead>
+ <tr>
+ <th>Numéro</th>
+ <th>Score</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% @tartiflettes.each do |tartiflette| %>
+ <tr>
+ <td><%= tartiflette.scoring_id %></td>
+ <td><%= tartiflette.scores.where(&:scoring_criterium.include? criteria) %></td>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+<% end %>
Copyright 2019--2025 Marius PETER