##// END OF EJS Templates
Display stats about objects that can be copied....
Jean-Philippe Lang -
r2861:6dfe0395a589
parent child
Show More
@@ -1,5 +1,5
1 # redMine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
2 # Copyright (C) 2006-2009 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
@@ -94,8 +94,9 class ProjectsController < ApplicationController
94 @root_projects = Project.find(:all,
94 @root_projects = Project.find(:all,
95 :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}",
95 :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}",
96 :order => 'name')
96 :order => 'name')
97 @source_project = Project.find(params[:id])
97 if request.get?
98 if request.get?
98 @project = Project.copy_from(params[:id])
99 @project = Project.copy_from(@source_project)
99 if @project
100 if @project
100 @project.identifier = Project.next_identifier if Setting.sequential_project_identifiers?
101 @project.identifier = Project.next_identifier if Setting.sequential_project_identifiers?
101 else
102 else
@@ -104,7 +105,7 class ProjectsController < ApplicationController
104 else
105 else
105 @project = Project.new(params[:project])
106 @project = Project.new(params[:project])
106 @project.enabled_module_names = params[:enabled_modules]
107 @project.enabled_module_names = params[:enabled_modules]
107 if @project.copy(params[:id], :only => params[:only])
108 if @project.copy(@source_project, :only => params[:only])
108 @project.set_parent!(params[:project]['parent_id']) if User.current.admin? && params[:project].has_key?('parent_id')
109 @project.set_parent!(params[:project]['parent_id']) if User.current.admin? && params[:project].has_key?('parent_id')
109 flash[:notice] = l(:notice_successful_create)
110 flash[:notice] = l(:notice_successful_create)
110 redirect_to :controller => 'admin', :action => 'projects'
111 redirect_to :controller => 'admin', :action => 'projects'
@@ -13,12 +13,12
13 </fieldset>
13 </fieldset>
14
14
15 <fieldset class="box"><legend><%= l(:button_copy) %></legend>
15 <fieldset class="box"><legend><%= l(:button_copy) %></legend>
16 <label class="floating"><%= check_box_tag 'only[]', 'members', true %> <%= l(:label_member_plural) %></label>
16 <label class="block"><%= check_box_tag 'only[]', 'members', true %> <%= l(:label_member_plural) %> (<%= @source_project.members.count %>)</label>
17 <label class="floating"><%= check_box_tag 'only[]', 'versions', true %> <%= l(:label_version_plural) %></label>
17 <label class="block"><%= check_box_tag 'only[]', 'versions', true %> <%= l(:label_version_plural) %> (<%= @source_project.versions.count %>)</label>
18 <label class="floating"><%= check_box_tag 'only[]', 'issue_categories', true %> <%= l(:label_issue_category_plural) %></label>
18 <label class="block"><%= check_box_tag 'only[]', 'issue_categories', true %> <%= l(:label_issue_category_plural) %> (<%= @source_project.issue_categories.count %>)</label>
19 <label class="floating"><%= check_box_tag 'only[]', 'issues', true %> <%= l(:label_issue_plural) %></label>
19 <label class="block"><%= check_box_tag 'only[]', 'issues', true %> <%= l(:label_issue_plural) %> (<%= @source_project.issues.count %>)</label>
20 <label class="floating"><%= check_box_tag 'only[]', 'queries', true %> <%= l(:label_query_plural) %></label>
20 <label class="block"><%= check_box_tag 'only[]', 'queries', true %> <%= l(:label_query_plural) %> (<%= @source_project.queries.count %>)</label>
21 <label class="floating"><%= check_box_tag 'only[]', 'wiki', true %> <%= l(:label_wiki) %></label>
21 <label class="block"><%= check_box_tag 'only[]', 'wiki', true %> <%= l(:label_wiki_page_plural) %> (<%= @source_project.wiki.nil? ? 0 : @source_project.wiki.pages.count %>)</label>
22 <%= hidden_field_tag 'only[]', '' %>
22 <%= hidden_field_tag 'only[]', '' %>
23 </fieldset>
23 </fieldset>
24
24
@@ -321,6 +321,15 text-align: left;
321 width: 270px;
321 width: 270px;
322 }
322 }
323
323
324 .tabular label.block{
325 font-weight: normal;
326 margin-left: 0px;
327 text-align: left;
328 float: none;
329 display: block;
330 width: auto;
331 }
332
324 input#time_entry_comments { width: 90%;}
333 input#time_entry_comments { width: 90%;}
325
334
326 #preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
335 #preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
General Comments 0
You need to be logged in to leave comments. Login now