From f73b39bd3aee989b01f0d53e946e2ffea8fb505f Mon Sep 17 00:00:00 2001 From: Gabriel Reitz Giannattasio Date: Thu, 25 Oct 2012 19:23:40 -0200 Subject: [PATCH 1/2] Fix impasse_custom_fields_tabs bug --- app/views/impasse_settings/_form.html.erb | 26 ++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/views/impasse_settings/_form.html.erb b/app/views/impasse_settings/_form.html.erb index 6827d1b..89a1bd5 100644 --- a/app/views/impasse_settings/_form.html.erb +++ b/app/views/impasse_settings/_form.html.erb @@ -5,18 +5,20 @@ <% unless @custom_fields_by_type.empty? %>
<%=l(:label_custom_field_plural)%> - <% impasse_custom_fields_tabs.each do |tab| %> - <% if @custom_fields_by_type[tab[:name]] %> -

<%= l(tab[:label])%>

-
- <% @custom_fields_by_type[tab[:name]].each do |custom_field| %> - - <% end %> -
-
+ <% unless @impasse_custom_fields_tabs.empty? %> + <% impasse_custom_fields_tabs.each do |tab| %> + <% if @custom_fields_by_type[tab[:name]] %> +

<%= l(tab[:label])%>

+
+ <% @custom_fields_by_type[tab[:name]].each do |custom_field| %> + + <% end %> +
+
+ <% end %> <% end %> <% end %>
From 7a6930d165abf158c141b60c5c683f8e58a2fedf Mon Sep 17 00:00:00 2001 From: "Gabriel R. Giannattasio" Date: Tue, 25 Jun 2013 17:51:36 -0300 Subject: [PATCH 2/2] Added support to shared versions --- app/controllers/impasse_test_plans_controller.rb | 4 ++-- app/views/impasse_test_plans/_form.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/impasse_test_plans_controller.rb b/app/controllers/impasse_test_plans_controller.rb index 8b5f96f..ee5372d 100644 --- a/app/controllers/impasse_test_plans_controller.rb +++ b/app/controllers/impasse_test_plans_controller.rb @@ -25,7 +25,7 @@ def new flash[:notice] = l(:notice_successful_create) redirect_to :action => :tc_assign, :project_id => @project, :id => @test_plan end - @versions = @project.versions + @versions = @project.shared_versions end def edit @@ -35,7 +35,7 @@ def edit flash[:notice] = l(:notice_successful_update) redirect_to :action => :show, :project_id => @project, :id => @test_plan end - @versions = @project.versions + @versions = @project.shared_versions end def destroy diff --git a/app/views/impasse_test_plans/_form.html.erb b/app/views/impasse_test_plans/_form.html.erb index aff91fc..0b52104 100644 --- a/app/views/impasse_test_plans/_form.html.erb +++ b/app/views/impasse_test_plans/_form.html.erb @@ -5,7 +5,7 @@

<%= form.text_area :notes, :rows => 10, :class => 'wiki-edit' %>

<%= wikitoolbar_for 'test_plan_notes' %> -

<%= form.select :version_id, @versions.collect{|v| [v.name, v.id]}, {:include_blank => false}, :required=>true%>

+

<%= form.select :version_id, @versions.collect{|v| [(@project != v.project ? v.project.name + ' - ' : '') + v.name, v.id]}, {:include_blank => false}, :required=>true%>

<% @test_plan.custom_field_values.each do |value| %>

<%= custom_field_tag_with_label :test_plan, value %>

<% end %>