From ec7d4270e0e8b9edd2fcb9a2f3f4ef04b2ee90e5 Mon Sep 17 00:00:00 2001 From: Caio Salgado + Alessandro Palmeira Date: Thu, 31 May 2012 16:42:17 -0300 Subject: [PATCH] [Mezuro] trying to fix compound metrics edition --- plugins/mezuro/views/mezuro_plugin_myprofile/edit_compound_metric_configuration.html.erb | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/plugins/mezuro/views/mezuro_plugin_myprofile/edit_compound_metric_configuration.html.erb b/plugins/mezuro/views/mezuro_plugin_myprofile/edit_compound_metric_configuration.html.erb index 49e514b..a7dcd6c 100644 --- a/plugins/mezuro/views/mezuro_plugin_myprofile/edit_compound_metric_configuration.html.erb +++ b/plugins/mezuro/views/mezuro_plugin_myprofile/edit_compound_metric_configuration.html.erb @@ -1,25 +1,28 @@

<%= @configuration_name %> Configuration

-<% form_for :metric_configuration, :url => {:action =>"update_compound_metric_configuration", :controller => "mezuro_plugin_myprofile"}, :method => :get do |f| %> +<% form_for @metric_configuration, :url => {:action =>"update_compound_metric_configuration", :controller => "mezuro_plugin_myprofile"}, :method => :get do |f| %> <%= hidden_field_tag :configuration_name, @configuration_name %> - <%= hidden_field_tag :scope, @metric.scope %> -

- <%= f.label :metric_name, "Metric Name:" %> - <%= @metric.name %> - <%= hidden_field_tag "metric[name]", @metric.name %> -

-

- <%= f.label :description, "Description:" %> - <%= text_field_tag "metric[description]", @metric.description %> -

-

- <%= f.label :scope, "Scope:" %> - <%= select_tag "metric[scope]", options_for_select([["Teste", "NIL"], ["Class", "CLASS"]], :selected => @metric.scope) %> -

+ <%= "Metric Name:" + @metric.name %> +

+ <% f.fields_for :metric do |m| %> + <%= m.hidden_field :name, :value => @metric.name %> +

+ <%= m.label :description, "Description:" %> + <%= m.text_field "description" %> +

+

+ <%= m.label :scope, "Scope:" %> + <%= m.select :scope, [["Teste", "NIL"], ["Class", "CLASS"]] %> +

+

+ <%= m.label :script, "Script:" %> + <%= m.text_area "script" %> +

+ <% end %>

<%= f.label :code, "Code:" %> - <%= text_field_tag "metric[code]", @metric_configuration.code %> + <%= f.text_field "code" %>

<%= f.label :aggregation_form, "Aggregation Form:" %> @@ -30,12 +33,6 @@ <%= f.label :weight, "Weight:" %> <%= f.text_field :weight %>

- -

- <%= f.label :script, "Script:" %> - <%= text_area_tag "metric[script]", @metric.script %> -

-

<%= f.submit "Save" %>

-- libgit2 0.21.2