From 655dc18d71af4408e6313a6cad6a9c1ad68e6bc6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 2 Dec 2011 22:21:18 +0000 Subject: [PATCH] Do not show warnings for disabled scm. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8031 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/settings/_repositories.html.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/settings/_repositories.html.erb b/app/views/settings/_repositories.html.erb index cfd72f051..595a6afdc 100644 --- a/app/views/settings/_repositories.html.erb +++ b/app/views/settings/_repositories.html.erb @@ -12,17 +12,19 @@ <% scm_class = "Repository::#{choice}".constantize %> <% text, value = (choice.is_a?(Array) ? choice : [choice, choice]) %> <% setting = :enabled_scm %> + <% enabled = Setting.send(setting).include?(value) %> <%= check_box_tag( "settings[#{setting}][]", value, - Setting.send(setting).include?(value)) + enabled) %> <%= text.to_s %> + <% if enabled %> <%= image_tag( (scm_class.scm_available ? 'true.png' : 'exclamation.png'), @@ -30,9 +32,10 @@ ) %> <%= scm_class.scm_command %> + <% end %> - <%= scm_class.scm_version_string %> + <%= scm_class.scm_version_string if enabled %> <% end %>