diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
index a5f10586c..4c7a7c44e 100644
--- a/app/helpers/settings_helper.rb
+++ b/app/helpers/settings_helper.rb
@@ -33,7 +33,9 @@ module SettingsHelper
choices = [[blank_text.is_a?(Symbol) ? l(blank_text) : blank_text, '']] + choices
end
setting_label(setting, options) +
- select_tag("settings[#{setting}]", options_for_select(choices, Setting.send(setting).to_s), options)
+ select_tag("settings[#{setting}]",
+ options_for_select(choices, Setting.send(setting).to_s),
+ options)
end
def setting_multiselect(setting, choices, options={})
@@ -44,10 +46,15 @@ module SettingsHelper
hidden_field_tag("settings[#{setting}][]", '') +
choices.collect do |choice|
text, value = (choice.is_a?(Array) ? choice : [choice, choice])
- content_tag('label',
- check_box_tag("settings[#{setting}][]", value, Setting.send(setting).include?(value)) + text.to_s,
+ content_tag(
+ 'label',
+ check_box_tag(
+ "settings[#{setting}][]",
+ value,
+ Setting.send(setting).include?(value)
+ ) + text.to_s,
:class => 'block'
- )
+ )
end.join
end
@@ -64,7 +71,7 @@ module SettingsHelper
def setting_check_box(setting, options={})
setting_label(setting, options) +
hidden_field_tag("settings[#{setting}]", 0) +
- check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options)
+ check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options)
end
def setting_label(setting, options={})
diff --git a/app/views/projects/settings/_repository.rhtml b/app/views/projects/settings/_repository.rhtml
index 57406a8ba..3bd3b4338 100644
--- a/app/views/projects/settings/_repository.rhtml
+++ b/app/views/projects/settings/_repository.rhtml
@@ -8,12 +8,9 @@
<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
-<% if @repository %>
-
-<%= image_tag((@repository.class.scm_available ? 'true.png' : 'exclamation.png'))%>
-<%= l(:text_scm_command) -%>: <%= @repository.class.scm_command %>
-|
-<%= l(:text_scm_command_version) -%>: <%= @repository.class.scm_version_string %>
+<% if @repository && ! @repository.class.scm_available %>
+
+ <%= content_tag 'span', l(:text_scm_command_not_available), :class => 'error' %>
<% end %>
<% button_disabled = true %>
diff --git a/app/views/settings/_repositories.rhtml b/app/views/settings/_repositories.rhtml
index f5fdc154e..b3c252f16 100644
--- a/app/views/settings/_repositories.rhtml
+++ b/app/views/settings/_repositories.rhtml
@@ -1,41 +1,95 @@
<% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
+
+
<%= setting_check_box :autofetch_changesets %>
<%= setting_check_box :sys_api_enabled,
- :onclick => "if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %>
+ :onclick =>
+ "if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %>
-
<%= setting_text_field :sys_api_key, :size => 30,
- :id => 'settings_sys_api_key',
- :disabled => !Setting.sys_api_enabled?,
- :label => :setting_mail_handler_api_key %>
- <%= link_to_function l(:label_generate_key), "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
+
<%= setting_text_field :sys_api_key,
+ :size => 30,
+ :id => 'settings_sys_api_key',
+ :disabled => !Setting.sys_api_enabled?,
+ :label => :setting_mail_handler_api_key %>
+ <%= link_to_function l(:label_generate_key),
+ "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
-
<%= setting_multiselect(:enabled_scm, Redmine::Scm::Base.all) %>
-
<%= setting_text_field :repositories_encodings, :size => 60 %>
<%= l(:text_comma_separated) %>
<%= setting_text_field :repository_log_display_limit, :size => 6 %>
-