# HG changeset patch # User luisf # Date 1300718414 0 # Node ID ec56461d37700d87ca7865e7f320d19adb7f39b9 # Parent 4d493e74dcfc6bab9ddae1b0163fafb7eff9248b the status messages now depend on the repository type. diff -r 4d493e74dcfc -r ec56461d3770 app/controllers/projects_controller.rb --- a/app/controllers/projects_controller.rb Mon Mar 21 13:31:25 2011 +0000 +++ b/app/controllers/projects_controller.rb Mon Mar 21 14:40:14 2011 +0000 @@ -190,13 +190,6 @@ @trackers = Tracker.all @repository ||= @project.repository @wiki ||= @project.wiki - - # luisf. change - if !@repository - @repository = Repository.factory(params[:repository_scm]) - @repository.project = @project if @repository - end - end def edit diff -r 4d493e74dcfc -r ec56461d3770 app/views/projects/settings/_repository.rhtml --- a/app/views/projects/settings/_repository.rhtml Mon Mar 21 13:31:25 2011 +0000 +++ b/app/views/projects/settings/_repository.rhtml Mon Mar 21 14:40:14 2011 +0000 @@ -9,12 +9,21 @@ <%= error_messages_for 'repository' %>
-<% if !@repository %> - +<% if @repository %> + <% if @repository.is_external %> + <%= l(:text_settings_repo_is_external) %> + <% else %> + <%= l(:text_settings_repo_is_internal) %> +<% end %> + <% else %> + <%= l(:text_settings_repo_creation) %> +<% end %> + -<% end %> + +

<%= label_tag('repository_is_external', l(:label_is_external_repository)) %> @@ -38,5 +47,5 @@ <% end %>

-<%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save), :onclick => remote_function(:url => { :controller => 'repositories', :action => 'edit', :id => @project }, :method => :get, :with => "Form.serialize(this.form)")) %> +<%= submit_tag(l(:button_save), :onclick => remote_function(:url => { :controller => 'repositories', :action => 'edit', :id => @project }, :method => :get, :with => "Form.serialize(this.form)")) %> <% end %> diff -r 4d493e74dcfc -r ec56461d3770 config/locales/en-GB.yml --- a/config/locales/en-GB.yml Mon Mar 21 13:31:25 2011 +0000 +++ b/config/locales/en-GB.yml Mon Mar 21 14:40:14 2011 +0000 @@ -900,6 +900,9 @@ text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?" text_settings_repo_creation: The repository for a project should be set up automatically within a few minutes of the project being created.
You should not have to adjust any settings here; please check again in ten minutes. + text_settings_repo_is_internal: The repository for this project is an internal Mercurial Repository, hosted by SoundSoftware.ac.uk. + text_settings_repo_is_external: You are tracking an external repository, with a mirror Mercurial repository hosted by SoundSoftware.ac.uk. + default_role_manager: Manager default_role_developer: Developer default_role_reporter: Reporter diff -r 4d493e74dcfc -r ec56461d3770 config/locales/en.yml --- a/config/locales/en.yml Mon Mar 21 13:31:25 2011 +0000 +++ b/config/locales/en.yml Mon Mar 21 14:40:14 2011 +0000 @@ -929,6 +929,10 @@ text_zoom_in: Zoom in text_zoom_out: Zoom out text_settings_repo_creation: The repository for a project should be set up automatically within a few minutes of the project being created.
You should not have to adjust any settings here.
Please check again in ten minutes, and contact us if there is any problem. + text_settings_repo_is_internal: The repository for this project is an internal Mercurial Repository, hosted by SoundSoftware.ac.uk. + text_settings_repo_is_external: You are tracking an external repository, with a mirror Mercurial repository hosted by SoundSoftware.ac.uk. + + default_role_manager: Manager default_role_developer: Developer