diff options
author | Marius Peter <marius.peter@tutanota.com> | 2024-12-31 19:31:37 +0100 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2024-12-31 19:31:37 +0100 |
commit | bcd73c5548666bae7fef57e7e22cb61126308259 (patch) | |
tree | 4a4e54709775344d1b9ffc49ae0689c8f1884d70 /app/views/admin | |
parent | e03e7b2c3fd8d5bc97d9ca46594ec6dc689bce64 (diff) |
megaPush 😈
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/dashboard/_scores_by_category.html.erb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/views/admin/dashboard/_scores_by_category.html.erb b/app/views/admin/dashboard/_scores_by_category.html.erb new file mode 100644 index 0000000..065a549 --- /dev/null +++ b/app/views/admin/dashboard/_scores_by_category.html.erb @@ -0,0 +1,24 @@ +<% ScoringCriterium.grouped_by_category.each do |category, criteria| %> + <h3><%= category.titlecase %></h3> + <table> + <thead> + <tr> + <th>ID</th> + <th>Tartiflette</th> + <th>Critère</th> + <th>Score</th> + </tr> + </thead> + <tbody> + <% criteria.each do |criterium| %> + <% criterium.scores.each do |score| %> + <tr> + <td><%= score.tartiflette.scoring_id %></td> + <td><%= score.tartiflette.name %></td> + <td><%= criterium.name.capitalize %></td> + <td><%= score.value %></td> + <% end %> + <% end %> + </tbody> + </table> +<% end %> |