diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 9268a19e..dbd36f6e 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 bb56c43d..1d17a003 100644 --- a/app/views/settings/_general.rhtml +++ b/app/views/settings/_general.rhtml @@ -46,6 +46,9 @@
<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %>
+ ++<%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %><%= hidden_field_tag 'settings[default_projects_public]', 0 %>
<%= submit_tag l(:button_save) %> diff --git a/config/settings.yml b/config/settings.yml index 59f4f043..bb501823 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 99c8eb29..362421fa 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 7d11bb6a..60bb0e02 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 825f15ec..042666b4 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 eeb85101..7ef41fe4 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 26c7b476..8a08507b 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 55402015..1453534e 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 4923440f..99b2ebb1 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 c7cfc54e..c11db5cb 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 5d585eb6..5828e6fb 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 1d2cb742..f407cc76 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 de883fe5..3e74c558 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 bfe7be91..73f7e3cc 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 b5bb15df..fc242f6d 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 65d13dda..25827e45 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 10a8885d..0a25ba10 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 3bd38a55..e84a45de 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 65d26b1e..a8f5110e 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 8e91d277..f2f831ee 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 f08271e4..ec5132a3 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 82d06f93..79992f9d 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 cc9fcd21..8594dc4d 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 08a36e35..7bd22aca 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 95e5afbb..5a93d865 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 39ed5fc4..fa067413 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