diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index fa8f35f87..6d8451cdc 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -1,5 +1,5 @@ -# redMine - project management software -# Copyright (C) 2006-2007 Jean-Philippe Lang +# Redmine - project management software +# Copyright (C) 2006-2009 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -94,8 +94,9 @@ class ProjectsController < ApplicationController @root_projects = Project.find(:all, :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}", :order => 'name') + @source_project = Project.find(params[:id]) if request.get? - @project = Project.copy_from(params[:id]) + @project = Project.copy_from(@source_project) if @project @project.identifier = Project.next_identifier if Setting.sequential_project_identifiers? else @@ -104,7 +105,7 @@ class ProjectsController < ApplicationController else @project = Project.new(params[:project]) @project.enabled_module_names = params[:enabled_modules] - if @project.copy(params[:id], :only => params[:only]) + if @project.copy(@source_project, :only => params[:only]) @project.set_parent!(params[:project]['parent_id']) if User.current.admin? && params[:project].has_key?('parent_id') flash[:notice] = l(:notice_successful_create) redirect_to :controller => 'admin', :action => 'projects' diff --git a/app/views/projects/copy.rhtml b/app/views/projects/copy.rhtml index d03e4d0c9..f88817c1f 100644 --- a/app/views/projects/copy.rhtml +++ b/app/views/projects/copy.rhtml @@ -13,12 +13,12 @@
<%= l(:button_copy) %> - - - - - - + + + + + + <%= hidden_field_tag 'only[]', '' %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1ad81f079..a5e845d8b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -321,6 +321,15 @@ text-align: left; width: 270px; } +.tabular label.block{ +font-weight: normal; +margin-left: 0px; +text-align: left; +float: none; +display: block; +width: auto; +} + input#time_entry_comments { width: 90%;} #preview fieldset {margin-top: 1em; background: url(../images/draft.png)}