Display stats about objects that can be copied.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2975 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1a1bfbfb07
commit
6dfe0395a5
|
@ -1,5 +1,5 @@
|
||||||
# redMine - project management software
|
# Redmine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006-2009 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
|
@ -94,8 +94,9 @@ class ProjectsController < ApplicationController
|
||||||
@root_projects = Project.find(:all,
|
@root_projects = Project.find(:all,
|
||||||
:conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}",
|
:conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}",
|
||||||
:order => 'name')
|
:order => 'name')
|
||||||
|
@source_project = Project.find(params[:id])
|
||||||
if request.get?
|
if request.get?
|
||||||
@project = Project.copy_from(params[:id])
|
@project = Project.copy_from(@source_project)
|
||||||
if @project
|
if @project
|
||||||
@project.identifier = Project.next_identifier if Setting.sequential_project_identifiers?
|
@project.identifier = Project.next_identifier if Setting.sequential_project_identifiers?
|
||||||
else
|
else
|
||||||
|
@ -104,7 +105,7 @@ class ProjectsController < ApplicationController
|
||||||
else
|
else
|
||||||
@project = Project.new(params[:project])
|
@project = Project.new(params[:project])
|
||||||
@project.enabled_module_names = params[:enabled_modules]
|
@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')
|
@project.set_parent!(params[:project]['parent_id']) if User.current.admin? && params[:project].has_key?('parent_id')
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
redirect_to :controller => 'admin', :action => 'projects'
|
redirect_to :controller => 'admin', :action => 'projects'
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset class="box"><legend><%= l(:button_copy) %></legend>
|
<fieldset class="box"><legend><%= l(:button_copy) %></legend>
|
||||||
<label class="floating"><%= check_box_tag 'only[]', 'members', true %> <%= l(:label_member_plural) %></label>
|
<label class="block"><%= check_box_tag 'only[]', 'members', true %> <%= l(:label_member_plural) %> (<%= @source_project.members.count %>)</label>
|
||||||
<label class="floating"><%= check_box_tag 'only[]', 'versions', true %> <%= l(:label_version_plural) %></label>
|
<label class="block"><%= check_box_tag 'only[]', 'versions', true %> <%= l(:label_version_plural) %> (<%= @source_project.versions.count %>)</label>
|
||||||
<label class="floating"><%= check_box_tag 'only[]', 'issue_categories', true %> <%= l(:label_issue_category_plural) %></label>
|
<label class="block"><%= check_box_tag 'only[]', 'issue_categories', true %> <%= l(:label_issue_category_plural) %> (<%= @source_project.issue_categories.count %>)</label>
|
||||||
<label class="floating"><%= check_box_tag 'only[]', 'issues', true %> <%= l(:label_issue_plural) %></label>
|
<label class="block"><%= check_box_tag 'only[]', 'issues', true %> <%= l(:label_issue_plural) %> (<%= @source_project.issues.count %>)</label>
|
||||||
<label class="floating"><%= check_box_tag 'only[]', 'queries', true %> <%= l(:label_query_plural) %></label>
|
<label class="block"><%= check_box_tag 'only[]', 'queries', true %> <%= l(:label_query_plural) %> (<%= @source_project.queries.count %>)</label>
|
||||||
<label class="floating"><%= check_box_tag 'only[]', 'wiki', true %> <%= l(:label_wiki) %></label>
|
<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>
|
||||||
<%= hidden_field_tag 'only[]', '' %>
|
<%= hidden_field_tag 'only[]', '' %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
@ -321,6 +321,15 @@ text-align: left;
|
||||||
width: 270px;
|
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%;}
|
input#time_entry_comments { width: 90%;}
|
||||||
|
|
||||||
#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
|
#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
|
||||||
|
|
Loading…
Reference in New Issue