diff options
Diffstat (limited to 'app/views/admin/dashboard')
| -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 %> | 
