Commit 22c6664b authored by jplang's avatar jplang

Adds a setting for new projects default modules (#1797).

git-svn-id: https://svn.redmine.org/redmine/trunk@3068 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent be8a3d3c
......@@ -71,7 +71,7 @@ class ProjectsController < ApplicationController
@project.identifier = Project.next_identifier if Setting.sequential_project_identifiers?
@project.trackers = Tracker.all
@project.is_public = Setting.default_projects_public?
@project.enabled_module_names = Redmine::AccessControl.available_project_modules
@project.enabled_module_names = Setting.default_projects_modules
else
@project.enabled_module_names = params[:enabled_modules]
if @project.save
......
......@@ -6,6 +6,16 @@
<%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %>
</p>
<p><label><%= l(:setting_default_projects_modules) %></label>
<%= hidden_field_tag 'settings[default_projects_modules][]', '' %>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<label class="block">
<%= check_box_tag 'settings[default_projects_modules][]', m, Setting.default_projects_modules.include?(m.to_s) %>
<%= l_or_humanize(m, :prefix => "project_module_") %>
</label>
<% end %>
</p>
<p><label><%= l(:setting_sequential_project_identifiers) %></label>
<%= hidden_field_tag 'settings[sequential_project_identifiers]', 0 %>
<%= check_box_tag 'settings[sequential_project_identifiers]', 1, Setting.sequential_project_identifiers? %>
......
......@@ -833,3 +833,4 @@ bg:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -857,3 +857,4 @@ bs:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -836,3 +836,4 @@ ca:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -839,3 +839,4 @@ cs:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -859,3 +859,4 @@ da:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -859,3 +859,4 @@ de:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -839,3 +839,4 @@ el:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -312,6 +312,7 @@ en:
setting_openid: Allow OpenID login and registration
setting_password_min_length: Minimum password length
setting_new_project_user_role_id: Role given to a non-admin user who creates a project
setting_default_projects_modules: Default enabled modules for new projects
permission_add_project: Create project
permission_edit_project: Edit project
......
......@@ -880,3 +880,4 @@ es:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -869,3 +869,4 @@ fi:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -334,6 +334,7 @@ fr:
setting_openid: "Autoriser l'authentification et l'enregistrement OpenID"
setting_password_min_length: Longueur minimum des mots de passe
setting_new_project_user_role_id: Rôle donné à un utilisateur non-administrateur qui crée un projet
setting_default_projects_modules: Modules activés par défaut pour les nouveaux projets
permission_add_project: Créer un projet
permission_edit_project: Modifier le projet
......
......@@ -859,3 +859,4 @@ gl:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -843,3 +843,4 @@ he:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -864,3 +864,4 @@
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -846,3 +846,4 @@ it:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -868,3 +868,4 @@ ja:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -899,3 +899,4 @@ ko:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -869,3 +869,4 @@ lt:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -821,3 +821,4 @@ nl:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -834,3 +834,4 @@
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -862,3 +862,4 @@ pl:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -865,3 +865,4 @@ pt-BR:
error_can_not_reopen_issue_on_closed_version: Uma tarefa atribuída a uma versão fechada não pode ser reaberta
label_user_anonymous: Anônimo
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -851,3 +851,4 @@ pt:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -836,3 +836,4 @@ ro:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -947,3 +947,4 @@ ru:
error_can_not_reopen_issue_on_closed_version: Задача, назначенная к закрытой версии, не сможет быть открыта снова
label_user_anonymous: Аноним
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -838,3 +838,4 @@ sk:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -835,3 +835,4 @@ sl:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -854,3 +854,4 @@
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -887,3 +887,4 @@ sv:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -836,3 +836,4 @@ th:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -866,3 +866,4 @@ tr:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -835,3 +835,4 @@ uk:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -898,3 +898,4 @@ vi:
error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -930,3 +930,4 @@
enumeration_activities: 活動 (時間追蹤)
enumeration_system_activity: 系統活動
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -863,3 +863,4 @@ zh:
enumeration_activities: 活动(时间跟踪)
enumeration_system_activity: 系统活动
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
......@@ -131,6 +131,17 @@ display_subprojects_issues:
default: 1
default_projects_public:
default: 1
default_projects_modules:
serialized: true
default:
- issue_tracking
- time_tracking
- news
- documents
- files
- wiki
- repository
- boards
# Role given to a non-admin user who creates a project
new_project_user_role_id:
format: int
......
......@@ -325,7 +325,7 @@ width: 270px;
.tabular label.block{
font-weight: normal;
margin-left: 0px;
margin-left: 0px !important;
text-align: left;
float: none;
display: block;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment