summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-12 19:58:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-12 19:58:19 +0000
commit6fcc512cb77a0851ab8c3c693fd178b564a600dd (patch)
treed6f8e3b4ece15c8329192352385d8614c9ef30ef
parent3a75b6771fa1bb6ba79895312ee9d1325be6663d (diff)
downloadredmine-6fcc512cb77a0851ab8c3c693fd178b564a600dd.tar.gz
redmine-6fcc512cb77a0851ab8c3c693fd178b564a600dd.zip
Adds a setting for whether new projects should be public by default (closes #842, #839).
Patch by Rocco Stanzione, slightly edited. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1235 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/projects_controller.rb3
-rw-r--r--app/views/settings/_general.rhtml3
-rw-r--r--config/settings.yml4
-rw-r--r--lang/bg.yml1
-rw-r--r--lang/cs.yml1
-rw-r--r--lang/da.yml1
-rw-r--r--lang/de.yml1
-rw-r--r--lang/en.yml1
-rw-r--r--lang/es.yml1
-rw-r--r--lang/fi.yml1
-rw-r--r--lang/fr.yml1
-rw-r--r--lang/he.yml1
-rw-r--r--lang/it.yml1
-rw-r--r--lang/ja.yml1
-rw-r--r--lang/ko.yml1
-rw-r--r--lang/lt.yml1
-rw-r--r--lang/nl.yml1
-rw-r--r--lang/pl.yml1
-rw-r--r--lang/pt-br.yml1
-rw-r--r--lang/pt.yml1
-rw-r--r--lang/ro.yml1
-rw-r--r--lang/ru.yml1
-rw-r--r--lang/sr.yml1
-rw-r--r--lang/sv.yml1
-rw-r--r--lang/uk.yml1
-rw-r--r--lang/zh-tw.yml1
-rw-r--r--lang/zh.yml1
27 files changed, 32 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 9268a19ea..dbd36f6e4 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -70,6 +70,7 @@ class ProjectsController < ApplicationController
if request.get?
@custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
@project.trackers = Tracker.all
+ @project.is_public = Setting.default_projects_public?
else
@project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids]
@custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => (params[:custom_fields] ? params["custom_fields"][x.id.to_s] : nil)) }
@@ -78,7 +79,7 @@ class ProjectsController < ApplicationController
@project.enabled_module_names = params[:enabled_modules]
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'admin', :action => 'projects'
- end
+ end
end
end
diff --git a/app/views/settings/_general.rhtml b/app/views/settings/_general.rhtml
index bb56c43db..1d17a003e 100644
--- a/app/views/settings/_general.rhtml
+++ b/app/views/settings/_general.rhtml
@@ -46,6 +46,9 @@
<p><label><%= l(:setting_feeds_limit) %></label>
<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
+
+<p><label><%= l(:setting_default_projects_public) %></label>
+<%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %><%= hidden_field_tag 'settings[default_projects_public]', 0 %></p>
</div>
<%= submit_tag l(:button_save) %>
diff --git a/config/settings.yml b/config/settings.yml
index 59f4f0437..bb501823e 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -103,6 +103,8 @@ issue_list_default_columns:
- updated_on
display_subprojects_issues:
default: 1
+default_projects_public:
+ default: 1
# encodings used to convert repository files content to UTF-8
# multiple values accepted, comma separated
repositories_encodings:
@@ -113,4 +115,4 @@ emails_footer:
default: |-
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://hostname/my/account
- \ No newline at end of file
+
diff --git a/lang/bg.yml b/lang/bg.yml
index 99c8eb296..362421fa6 100644
--- a/lang/bg.yml
+++ b/lang/bg.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/cs.yml b/lang/cs.yml
index 7d11bb6a8..60bb0e022 100644
--- a/lang/cs.yml
+++ b/lang/cs.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/da.yml b/lang/da.yml
index 825f15ecc..042666b43 100644
--- a/lang/da.yml
+++ b/lang/da.yml
@@ -616,3 +616,4 @@ text_reassign_time_entries: 'Reassign reported hours to this issue:'
label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/de.yml b/lang/de.yml
index eeb851018..7ef41fe46 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -615,3 +615,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/en.yml b/lang/en.yml
index 26c7b4766..8a08507bb 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -193,6 +193,7 @@ setting_host_name: Host name
setting_text_formatting: Text formatting
setting_wiki_compression: Wiki history compression
setting_feeds_limit: Feed content limit
+setting_default_projects_public: New projects are public by default
setting_autofetch_changesets: Autofetch commits
setting_sys_api_enabled: Enable WS for repository management
setting_commit_ref_keywords: Referencing keywords
diff --git a/lang/es.yml b/lang/es.yml
index 554020155..1453534e8 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -617,3 +617,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/fi.yml b/lang/fi.yml
index 4923440fd..99b2ebb14 100644
--- a/lang/fi.yml
+++ b/lang/fi.yml
@@ -621,3 +621,4 @@ field_comments_sorting: Display comments
label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/fr.yml b/lang/fr.yml
index c7cfc54e5..c11db5cbf 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -194,6 +194,7 @@ setting_host_name: Nom d'hôte
setting_text_formatting: Formatage du texte
setting_wiki_compression: Compression historique wiki
setting_feeds_limit: Limite du contenu des flux RSS
+setting_default_projects_public: Définir les nouveaux projects comme publics par défaut
setting_autofetch_changesets: Récupération auto. des commits
setting_sys_api_enabled: Activer les WS pour la gestion des dépôts
setting_commit_ref_keywords: Mot-clés de référencement
diff --git a/lang/he.yml b/lang/he.yml
index 5d585eb61..5828e6fb4 100644
--- a/lang/he.yml
+++ b/lang/he.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/it.yml b/lang/it.yml
index 1d2cb742d..f407cc764 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/ja.yml b/lang/ja.yml
index de883fe58..3e74c5582 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -615,3 +615,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/ko.yml b/lang/ko.yml
index bfe7be912..73f7e3cc3 100644
--- a/lang/ko.yml
+++ b/lang/ko.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/lt.yml b/lang/lt.yml
index b5bb15df0..fc242f6dd 100644
--- a/lang/lt.yml
+++ b/lang/lt.yml
@@ -615,3 +615,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/nl.yml b/lang/nl.yml
index 65d13ddab..25827e454 100644
--- a/lang/nl.yml
+++ b/lang/nl.yml
@@ -615,3 +615,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/pl.yml b/lang/pl.yml
index 10a8885d1..0a25ba10e 100644
--- a/lang/pl.yml
+++ b/lang/pl.yml
@@ -614,3 +614,4 @@ field_comments_sorting: Display comments
label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/pt-br.yml b/lang/pt-br.yml
index 3bd38a557..e84a45de3 100644
--- a/lang/pt-br.yml
+++ b/lang/pt-br.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/pt.yml b/lang/pt.yml
index 65d26b1e3..a8f5110eb 100644
--- a/lang/pt.yml
+++ b/lang/pt.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/ro.yml b/lang/ro.yml
index 8e91d277f..f2f831eee 100644
--- a/lang/ro.yml
+++ b/lang/ro.yml
@@ -614,3 +614,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/ru.yml b/lang/ru.yml
index f08271e45..ec5132a30 100644
--- a/lang/ru.yml
+++ b/lang/ru.yml
@@ -618,3 +618,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/sr.yml b/lang/sr.yml
index 82d06f93b..79992f9d3 100644
--- a/lang/sr.yml
+++ b/lang/sr.yml
@@ -615,3 +615,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/sv.yml b/lang/sv.yml
index cc9fcd212..8594dc4d3 100644
--- a/lang/sv.yml
+++ b/lang/sv.yml
@@ -615,3 +615,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/uk.yml b/lang/uk.yml
index 08a36e352..7bd22acaf 100644
--- a/lang/uk.yml
+++ b/lang/uk.yml
@@ -616,3 +616,4 @@ label_reverse_chronological_order: In reverse chronological order
label_preferences: Preferences
setting_display_subprojects_issues: Display subprojects issues on main projects by default
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml
index 95e5afbb4..5a93d8653 100644
--- a/lang/zh-tw.yml
+++ b/lang/zh-tw.yml
@@ -615,3 +615,4 @@ enumeration_issue_priorities: 項目優先權
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (time tracking)
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default
diff --git a/lang/zh.yml b/lang/zh.yml
index 39ed5fc44..fa0674137 100644
--- a/lang/zh.yml
+++ b/lang/zh.yml
@@ -615,3 +615,4 @@ enumeration_issue_priorities: 问题优先级
enumeration_doc_categories: 文档类别
enumeration_activities: 活动(时间跟踪)
label_overall_activity: Overall activity
+setting_default_projects_public: New projects are public by default