From d552aa7f6f34a00ec8127178c33797a20fde4be9 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 11 Nov 2009 13:11:21 -0800 Subject: [PATCH] [#3294] Allow the query string to control if the new deliverable form is visible. --- app/controllers/deliverables_controller.rb | 2 ++ app/views/deliverables/index.html.erb | 2 +- spec/controllers/deliverables_controller_spec.rb | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/controllers/deliverables_controller.rb b/app/controllers/deliverables_controller.rb index 820ffa2..ec46a3b 100644 --- a/app/controllers/deliverables_controller.rb +++ b/app/controllers/deliverables_controller.rb @@ -27,6 +27,8 @@ class DeliverablesController < ApplicationController @budget = Budget.new(@project.id) + @display_form = params[:new].present? + respond_to do |format| format.html { render :action => 'index', :layout => !request.xhr? } end diff --git a/app/views/deliverables/index.html.erb b/app/views/deliverables/index.html.erb index aff93a3..fa7f601 100644 --- a/app/views/deliverables/index.html.erb +++ b/app/views/deliverables/index.html.erb @@ -3,7 +3,7 @@ <% if allowed_management? %> -