changeset 275:ec56461d3770 feature_72

the status messages now depend on the repository type.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 21 Mar 2011 14:40:14 +0000
parents 4d493e74dcfc
children ab672e427b9b d242e28efb23 949998e221e9
files app/controllers/projects_controller.rb app/views/projects/settings/_repository.rhtml config/locales/en-GB.yml config/locales/en.yml
diffstat 4 files changed, 20 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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' %>
 
 <div class="box tabular">
-<% if !@repository %>
-<ul><li><%= l(:text_settings_repo_creation) %></li></ul>
 
 
+<% if @repository %>
+   <% if @repository.is_external %>
+   <%= l(:text_settings_repo_is_external) %></ br>
+   <% else %>
+   <%= l(:text_settings_repo_is_internal) %></ br>
+<% end %>
+   <% else %>
+	<%= l(:text_settings_repo_creation) %></ br>
+<% end %>
+  
 
-<% end %>
+
+
 
 <p>
 	<%= label_tag('repository_is_external', l(:label_is_external_repository)) %>
@@ -38,5 +47,5 @@
 <% end %>
 </div>
 
-<%= 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 %>
--- 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.<br>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
--- 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.<br>You should not have to adjust any settings here.<br>Please check again in ten minutes, and <a href="/projects/soundsoftware-site/wiki/Help">contact us</a> 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