Commit 82aab7f955a8be05a0ae0b35c7ea6422d0c43e43
Committed by
Paulo Meireles
1 parent
0ab5c84a
Exists in
master
and in
23 other branches
[Mezuro] Added partial to see all codes already added in metric_configuration, r…
…efactoring the edit and new metric configurations
Showing
3 changed files
with
15 additions
and
13 deletions
Show diff stats
plugins/mezuro/views/mezuro_plugin_myprofile/_metric_codes.html.erb
0 → 100644
| @@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
| 1 | +<table> | ||
| 2 | + <tr class="titles"> | ||
| 3 | + <td><h5>Metric Name</h5></td> | ||
| 4 | + <td><h5>Metric Code</h5></td> | ||
| 5 | + </tr> | ||
| 6 | + <% metric_configurations.each do |metric_configuration| %> | ||
| 7 | + <tr class="metric"> | ||
| 8 | + <td><%= metric_configuration.metric.name %></td> | ||
| 9 | + <td><%= metric_configuration.code %></td> | ||
| 10 | + </tr> | ||
| 11 | + <% end %> | ||
| 12 | +</table> |
plugins/mezuro/views/mezuro_plugin_myprofile/edit_compound_metric_configuration.html.erb
| @@ -71,3 +71,5 @@ | @@ -71,3 +71,5 @@ | ||
| 71 | <%= link_to_remote "New Range", :url => {:action =>"new_range", :controller => "mezuro_plugin_myprofile", :configuration_name => @configuration_name, :metric_name => @metric.name} %> | 71 | <%= link_to_remote "New Range", :url => {:action =>"new_range", :controller => "mezuro_plugin_myprofile", :configuration_name => @configuration_name, :metric_name => @metric.name} %> |
| 72 | <div id="range_form" style="display:none"></div> | 72 | <div id="range_form" style="display:none"></div> |
| 73 | 73 | ||
| 74 | +<br/> | ||
| 75 | +<%= render :partial => "metric_codes", :locals => {:metric_configurations => @metric_configurations} %> |
plugins/mezuro/views/mezuro_plugin_myprofile/new_compound_metric_configuration.html.erb
| @@ -39,16 +39,4 @@ | @@ -39,16 +39,4 @@ | ||
| 39 | </p> | 39 | </p> |
| 40 | <% end %> | 40 | <% end %> |
| 41 | 41 | ||
| 42 | -<!-- make this prettier --> | ||
| 43 | -<table> | ||
| 44 | - <tr class="titles"> | ||
| 45 | - <td><h5>Metric Name</h5></td> | ||
| 46 | - <td><h5>Metric Code</h5></td> | ||
| 47 | - </tr> | ||
| 48 | - <% @metric_configurations.each do |metric_configuration| %> | ||
| 49 | - <tr class="metric"> | ||
| 50 | - <td><%= metric_configuration.metric.name %></td> | ||
| 51 | - <td><%= metric_configuration.code %></td> | ||
| 52 | - </tr> | ||
| 53 | - <% end %> | ||
| 54 | -</table> | 42 | +<%= render :partial => "metric_codes", :locals => {:metric_configurations => @metric_configurations} %> |