Browse Source

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
tags/0.7.0-RC1
Jean-Philippe Lang 16 years ago
parent
commit
6fcc512cb7
27 changed files with 32 additions and 2 deletions
  1. 2
    1
      app/controllers/projects_controller.rb
  2. 3
    0
      app/views/settings/_general.rhtml
  3. 3
    1
      config/settings.yml
  4. 1
    0
      lang/bg.yml
  5. 1
    0
      lang/cs.yml
  6. 1
    0
      lang/da.yml
  7. 1
    0
      lang/de.yml
  8. 1
    0
      lang/en.yml
  9. 1
    0
      lang/es.yml
  10. 1
    0
      lang/fi.yml
  11. 1
    0
      lang/fr.yml
  12. 1
    0
      lang/he.yml
  13. 1
    0
      lang/it.yml
  14. 1
    0
      lang/ja.yml
  15. 1
    0
      lang/ko.yml
  16. 1
    0
      lang/lt.yml
  17. 1
    0
      lang/nl.yml
  18. 1
    0
      lang/pl.yml
  19. 1
    0
      lang/pt-br.yml
  20. 1
    0
      lang/pt.yml
  21. 1
    0
      lang/ro.yml
  22. 1
    0
      lang/ru.yml
  23. 1
    0
      lang/sr.yml
  24. 1
    0
      lang/sv.yml
  25. 1
    0
      lang/uk.yml
  26. 1
    0
      lang/zh-tw.yml
  27. 1
    0
      lang/zh.yml

+ 2
- 1
app/controllers/projects_controller.rb View File

@@ -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

+ 3
- 0
app/views/settings/_general.rhtml View File

@@ -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) %>

+ 3
- 1
config/settings.yml View File

@@ -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

+ 1
- 0
lang/bg.yml View File

@@ -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

+ 1
- 0
lang/cs.yml View File

@@ -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

+ 1
- 0
lang/da.yml View File

@@ -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

+ 1
- 0
lang/de.yml View File

@@ -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

+ 1
- 0
lang/en.yml View File

@@ -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

+ 1
- 0
lang/es.yml View File

@@ -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

+ 1
- 0
lang/fi.yml View File

@@ -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

+ 1
- 0
lang/fr.yml View File

@@ -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

+ 1
- 0
lang/he.yml View File

@@ -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

+ 1
- 0
lang/it.yml View File

@@ -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

+ 1
- 0
lang/ja.yml View File

@@ -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

+ 1
- 0
lang/ko.yml View File

@@ -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

+ 1
- 0
lang/lt.yml View File

@@ -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

+ 1
- 0
lang/nl.yml View File

@@ -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

+ 1
- 0
lang/pl.yml View File

@@ -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

+ 1
- 0
lang/pt-br.yml View File

@@ -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

+ 1
- 0
lang/pt.yml View File

@@ -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

+ 1
- 0
lang/ro.yml View File

@@ -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

+ 1
- 0
lang/ru.yml View File

@@ -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

+ 1
- 0
lang/sr.yml View File

@@ -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

+ 1
- 0
lang/sv.yml View File

@@ -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

+ 1
- 0
lang/uk.yml View File

@@ -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

+ 1
- 0
lang/zh-tw.yml View File

@@ -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

+ 1
- 0
lang/zh.yml View File

@@ -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

Loading…
Cancel
Save