Commit 5f36bd633c2e412750e3cb0b6419bd4ca76bea42
Committed by
Paulo Meireles
1 parent
fe245f2b
Exists in
master
and in
29 other branches
Extract metrics result into a partial
Showing
1 changed file
with
22 additions
and
0 deletions
Show diff stats
plugins/mezuro/views/content_viewer/_module_result.rhtml
0 → 100644
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +<h5><%= _('Metric Result') %> </h5> | ||
2 | +<strong> | ||
3 | + <%= _('Module:') %> | ||
4 | + <%= module_result.module.name %> | ||
5 | + <br/> | ||
6 | + <%= _('Grade:') %> | ||
7 | + <%= module_result.grade %> | ||
8 | +</strong> | ||
9 | +<br/> | ||
10 | +<hr/> | ||
11 | +<table id="project_metric_result"> | ||
12 | + <% module_result.metric_results.each do |metric_result| %> | ||
13 | + <tr> | ||
14 | + <td><%= metric_result.metric.name %></td> | ||
15 | + <td><%= metric_result.value %></td> | ||
16 | + <% range = metric_result.range %> | ||
17 | + <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td> | ||
18 | + </tr> | ||
19 | + | ||
20 | + <% end %> | ||
21 | +</table> | ||
22 | + |