Commit be98102b3c91e7ce54990f8e94d2599cc948c37a
Committed by
Paulo Meireles
1 parent
335127bc
Exists in
master
and in
28 other branches
[Mezuro] Links on views fixed to new controllers
Showing
7 changed files
with
21 additions
and
50 deletions
Show diff stats
plugins/mezuro/views/content_viewer/show_configuration.rhtml
| ... | ... | @@ -22,8 +22,10 @@ |
| 22 | 22 | |
| 23 | 23 | <br/> |
| 24 | 24 | |
| 25 | - <%= link_to "#{image_tag ('/plugins/mezuro/images/plus.png')}Add Metric", :controller => "mezuro_plugin_base_tool", | |
| 26 | - :action => "choose_base_tool", :params => { :id => @configuration_content.id } %><br/> | |
| 25 | + <%= link_to "#{image_tag ('/plugins/mezuro/images/plus.png')}Add Metric", :controller => "mezuro_plugin_base_tool", | |
| 26 | + :profile => @page.profile.identifier, | |
| 27 | + :action => "choose_base_tool", | |
| 28 | + :id => @configuration_content.id %><br/> | |
| 27 | 29 | |
| 28 | 30 | <table> |
| 29 | 31 | <tr class="titles"> |
| ... | ... | @@ -40,19 +42,22 @@ |
| 40 | 42 | <%= metric_configuration.metric.origin %> |
| 41 | 43 | </td> |
| 42 | 44 | <td><%= metric_configuration.code %></td> |
| 43 | - <td><%= link_to "Edit", :controller => "mezuro_plugin_metric_configuration", :action => "edit_metric_configuration", :params => | |
| 44 | - {:metric_name => metric_configuration.metric.name, :id => @configuration_content.id} %></td> | |
| 45 | + <td><%= link_to "Edit", :controller => "mezuro_plugin_metric_configuration", :action => "edit_metric_configuration", | |
| 46 | + :metric_name => metric_configuration.metric.name, :id => @configuration_content.id, | |
| 47 | + :profile => @page.profile.identifier %></td> | |
| 45 | 48 | <% else %> |
| 46 | 49 | <td> |
| 47 | 50 | Compound Metric |
| 48 | 51 | </td> |
| 49 | 52 | <td><%= metric_configuration.code %></td> |
| 50 | - <td><%= link_to "Edit", :controller => "mezuro_plugin_metric_configuration", :action => "edit_compound_metric_configuration", :params => | |
| 51 | - {:metric_name => metric_configuration.metric.name, :id => @configuration_content.id} %></td> | |
| 53 | + <td><%= link_to "Edit", :controller => "mezuro_plugin_metric_configuration", | |
| 54 | + :action => "edit_compound_metric_configuration", :metric_name => metric_configuration.metric.name, | |
| 55 | + :id => @configuration_content.id, :profile => @page.profile.identifier %></td> | |
| 52 | 56 | <% end %> |
| 53 | 57 | |
| 54 | - <td><%= link_to "Remove", :controller => "mezuro_plugin_metric_configuration", :action => "remove_metric_configuration", :params => | |
| 55 | - {:metric_name => metric_configuration.metric.name, :id => @configuration_content.id} %></td> | |
| 58 | + <td><%= link_to "Remove", :controller => "mezuro_plugin_metric_configuration", :action => "remove_metric_configuration", | |
| 59 | + :metric_name => metric_configuration.metric.name, :id => @configuration_content.id, | |
| 60 | + :profile => @page.profile.identifier %></td> | |
| 56 | 61 | </tr> |
| 57 | 62 | <% end %> |
| 58 | 63 | </table> | ... | ... |
plugins/mezuro/views/mezuro_plugin_base_tool/choose_base_tool.html.erb
| 1 | 1 | <h2><%= @configuration_content.name%> Configuration</h2> |
| 2 | 2 | |
| 3 | -<%= link_to "New Compound Metric", :controller => "mezuro_plugin_myprofile", :action => "new_compound_metric_configuration", :params => | |
| 4 | -{ :id => @configuration_content.id } %> | |
| 3 | +<%= link_to "New Compound Metric", :controller => "mezuro_plugin_metric_configuration", :action => "new_compound_metric_configuration", | |
| 4 | + :id => @configuration_content.id %> | |
| 5 | 5 | |
| 6 | 6 | <h5>Base Tools:</h5> |
| 7 | 7 | <table id="project_info"> |
| 8 | 8 | <% @base_tools.each do |base_tool| %> |
| 9 | 9 | <tr> |
| 10 | 10 | <td> |
| 11 | - <%= link_to base_tool, :controller => "mezuro_plugin_base_tool", :action => "choose_metric", :params => | |
| 12 | - { :base_tool => base_tool, :id => @configuration_content.id} %> | |
| 11 | + <%= link_to base_tool, :controller => "mezuro_plugin_base_tool", :action => "choose_metric", :base_tool => base_tool, | |
| 12 | + :id => @configuration_content.id %> | |
| 13 | 13 | </td> |
| 14 | 14 | </tr> |
| 15 | 15 | <% end %> | ... | ... |
plugins/mezuro/views/mezuro_plugin_base_tool/choose_metric.html.erb
| ... | ... | @@ -10,8 +10,8 @@ |
| 10 | 10 | <% @supported_metrics.each do |metric| %> |
| 11 | 11 | <tr class="metric" title="<%= metric.name %>"> |
| 12 | 12 | <td> |
| 13 | - <%= link_to metric.name, :controller => "mezuro_plugin_myprofile", :action => "new_metric_configuration", :params => {:metric_name => metric.name, | |
| 14 | - :base_tool => @base_tool, :id => @configuration_content.id } %> | |
| 13 | + <%= link_to metric.name, :controller => "mezuro_plugin_metric_configuration", :action => "new_metric_configuration", | |
| 14 | + :metric_name => metric.name, :base_tool => @base_tool, :id => @configuration_content.id %> | |
| 15 | 15 | </td> |
| 16 | 16 | </tr> |
| 17 | 17 | <% end %> | ... | ... |
plugins/mezuro/views/mezuro_plugin_metric_configuration/edit_compound_metric_configuration.html.erb
| ... | ... | @@ -67,7 +67,7 @@ |
| 67 | 67 | </tr> |
| 68 | 68 | <% if (@metric_configuration.ranges!=nil) |
| 69 | 69 | @metric_configuration.ranges.each do |range| %> |
| 70 | - <%= render :partial => "range", :locals => {:range => range, :id => @configuration_content.id, | |
| 70 | + <%= render :partial => "mezuro_plugin_range/range", :locals => {:range => range, :id => @configuration_content.id, | |
| 71 | 71 | :metric_name => @metric_configuration.metric.name} %> |
| 72 | 72 | <% end |
| 73 | 73 | end %> | ... | ... |
plugins/mezuro/views/mezuro_plugin_metric_configuration/edit_metric_configuration.html.erb
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | </tr> |
| 77 | 77 | <% if (@metric_configuration.ranges!=nil) |
| 78 | 78 | @metric_configuration.ranges.each do |range| %> |
| 79 | - <%= render :partial => "range", :locals => {:range => range, :id => @configuration_content.id, | |
| 79 | + <%= render :partial => "mezuro_plugin_range/range", :locals => {:range => range, :id => @configuration_content.id, | |
| 80 | 80 | :metric_name => @metric.name} %> |
| 81 | 81 | <% end |
| 82 | 82 | end %> | ... | ... |
plugins/mezuro/views/mezuro_plugin_myprofile/choose_base_tool.html.erb
| ... | ... | @@ -1,16 +0,0 @@ |
| 1 | -<h2><%= @configuration_content.name%> Configuration</h2> | |
| 2 | - | |
| 3 | -<%= link_to "New Compound Metric", :controller => "mezuro_plugin_myprofile", :action => "new_compound_metric_configuration", :params => | |
| 4 | -{ :id => @configuration_content.id } %> | |
| 5 | - | |
| 6 | -<h5>Base Tools:</h5> | |
| 7 | -<table id="project_info"> | |
| 8 | - <% @base_tools.each do |base_tool| %> | |
| 9 | - <tr> | |
| 10 | - <td> | |
| 11 | - <%= link_to base_tool, :controller => "mezuro_plugin_myprofile", :action => "choose_metric", :params => | |
| 12 | - { :base_tool => base_tool, :id => @configuration_content.id} %> | |
| 13 | - </td> | |
| 14 | - </tr> | |
| 15 | - <% end %> | |
| 16 | -</table> |
plugins/mezuro/views/mezuro_plugin_myprofile/choose_metric.html.erb
| ... | ... | @@ -1,18 +0,0 @@ |
| 1 | -<h2><%= @configuration_content.name %> Configuration</h2> | |
| 2 | - | |
| 3 | -<table id="project_info"> | |
| 4 | - <tr> | |
| 5 | - <h5>Metric Collector: <%= @base_tool %></h5> | |
| 6 | - </tr> | |
| 7 | - <tr> | |
| 8 | - <h5>Choose a metric to add:</h5> | |
| 9 | - </tr> | |
| 10 | - <% @supported_metrics.each do |metric| %> | |
| 11 | - <tr class="metric" title="<%= metric.name %>"> | |
| 12 | - <td> | |
| 13 | - <%= link_to metric.name, :controller => "mezuro_plugin_myprofile", :action => "new_metric_configuration", :params => {:metric_name => metric.name, | |
| 14 | - :base_tool => @base_tool, :id => @configuration_content.id } %> | |
| 15 | - </td> | |
| 16 | - </tr> | |
| 17 | - <% end %> | |
| 18 | -</table> |