summaryrefslogtreecommitdiffstats
path: root/app/views/settings/_repositories.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/settings/_repositories.html.erb')
-rw-r--r--app/views/settings/_repositories.html.erb7
1 files 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) %>
<tr>
<td class="scm_name">
<%=
check_box_tag(
"settings[#{setting}][]",
value,
- Setting.send(setting).include?(value))
+ enabled)
%>
<%= text.to_s %>
</td>
<td>
+ <% if enabled %>
<%=
image_tag(
(scm_class.scm_available ? 'true.png' : 'exclamation.png'),
@@ -30,9 +32,10 @@
)
%>
<%= scm_class.scm_command %>
+ <% end %>
</td>
<td>
- <%= scm_class.scm_version_string %>
+ <%= scm_class.scm_version_string if enabled %>
</td>
</tr>
<% end %>