Project

General

Profile

Patch #842 ยป public_default.diff

Rocco Stanzione, 2008-03-12 19:01

View differences:

config/settings.yml (working copy)
103 103
  - updated_on
104 104
display_subprojects_issues:
105 105
  default: 1
106
projects_public:
107
  default: 1
106 108
# encodings used to convert repository files content to UTF-8
107 109
# multiple values accepted, comma separated
108 110
repositories_encodings:
......
113 115
  default: |-
114 116
    You have received this notification because you have either subscribed to it, or are involved in it.
115 117
    To change your notification preferences, please click here: http://hostname/my/account
116
  
118
  
app/controllers/projects_controller.rb (working copy)
70 70
    if request.get?
71 71
      @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
72 72
      @project.trackers = Tracker.all
73
      @project.is_public = Setting.projects_public
73 74
    else
74 75
      @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids]
75 76
      @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 79
        @project.enabled_module_names = params[:enabled_modules]
79 80
        flash[:notice] = l(:notice_successful_create)
80 81
        redirect_to :controller => 'admin', :action => 'projects'
81
	  end		
82
	    end		
82 83
    end	
83 84
  end
84 85
	
app/views/settings/_general.rhtml (working copy)
46 46

  
47 47
<p><label><%= l(:setting_feeds_limit) %></label>
48 48
<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
49

  
50
<p><label><%= l(:setting_projects_public) %></label>
51
<%= check_box_tag 'settings[projects_public]', 1, Setting.projects_public? %>
52
<%= hidden_field_tag 'settings[projects_public]', 0 %>
49 53
</div>
50 54

  
51 55
<%= submit_tag l(:button_save) %>
lang/en.yml (working copy)
193 194
setting_text_formatting: Text formatting
194 195
setting_wiki_compression: Wiki history compression
195 196
setting_feeds_limit: Feed content limit
197
setting_projects_public: Projects are public by default
196 198
setting_autofetch_changesets: Autofetch commits
197 199
setting_sys_api_enabled: Enable WS for repository management
198 200
setting_commit_ref_keywords: Referencing keywords
    (1-1/1)