Commit 7760708a6bdc40d8787ff03f3e0a059ee4622342
Committed by
Paulo Meireles
1 parent
7f1c527a
Exists in
master
and in
29 other branches
Moving grade field to the table foot of metric results
Showing
1 changed file
with
26 additions
and
15 deletions
Show diff stats
plugins/mezuro/views/content_viewer/_module_result.rhtml
... | ... | @@ -2,25 +2,36 @@ |
2 | 2 | <strong> |
3 | 3 | <%= _('Module:') %> |
4 | 4 | <%= module_result.module.name %> |
5 | - <br/> | |
6 | - <%= _('Grade:') %> | |
7 | - <%= module_result.grade %> | |
8 | 5 | </strong> |
9 | 6 | <br/> |
10 | 7 | <hr/> |
11 | 8 | <table id="project_metric_result"> |
12 | - <tr> | |
13 | - <th>Metric</th> | |
14 | - <th>Value</th> | |
15 | - <th>Threshold</th> | |
16 | - </tr> | |
17 | - <% module_result.metric_results.each do |metric_result| %> | |
9 | + <thead> | |
18 | 10 | <tr> |
19 | - <td><%= metric_result.metric.name %></td> | |
20 | - <td><%= metric_result.value %></td> | |
21 | - <% range = metric_result.range %> | |
22 | - <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td> | |
11 | + <th>Metric</th> | |
12 | + <th>Value</th> | |
13 | + <th>Threshold</th> | |
23 | 14 | </tr> |
24 | - | |
25 | - <% end %> | |
15 | + </thead> | |
16 | + <tbody> | |
17 | + <% module_result.metric_results.each do |metric_result| %> | |
18 | + <tr> | |
19 | + <td><%= metric_result.metric.name %></td> | |
20 | + <td><%= metric_result.value %></td> | |
21 | + <% range = metric_result.range %> | |
22 | + <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td> | |
23 | + </tr> | |
24 | + <% end %> | |
25 | + </tbody> | |
26 | + <tfoot> | |
27 | + <tr> | |
28 | + <td colspan = "3" align = "right"> | |
29 | + <strong> | |
30 | + <%= _('Grade:') %> | |
31 | + <%= module_result.grade %> | |
32 | + </strong> | |
33 | + </td> | |
34 | + </tr> | |
35 | + </tfoot> | |
26 | 36 | </table> |
37 | + | ... | ... |