aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Perles2016-01-06 17:38:43 +0100
committerBruno Perles2016-01-07 09:28:51 +0100
commitf46b02367430be136e8e91cb138be4f84eed24d9 (patch)
tree36959f61da3c1ffdf52cecbba061b4ac2daf24cf
parentc260768aef3be1cbe9aed4914509bd10ac4e8d76 (diff)
downloadchouette-core-f46b02367430be136e8e91cb138be4f84eed24d9.tar.bz2
Hide link to add route 'max_instance_limitation' on HUB : #33329
-rw-r--r--app/views/lines/show.html.erb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index 0d9a47142..7cfbf8b23 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -129,7 +129,9 @@
<li><%= link_to t('lines.actions.new'), new_referential_line_path(@referential), :class => "add" %></li>
<li><%= link_to t('lines.actions.edit'), edit_referential_line_path(@referential, @line), :class => "edit" %></li>
<li><%= link_to t('lines.actions.destroy'), referential_line_path(@referential, @line), :method => :delete, :data => {:confirm => t('lines.actions.destroy_confirm')}, :class => "remove" %></li>
- <li><%= link_to t('routes.actions.new'), new_referential_line_route_path(@referential, @line), :class => "add" %></li>
+ <% if !@line.hub_restricted? || (@line.hub_restricted? && @line.routes.size < 2) %>
+ <li><%= link_to t('routes.actions.new'), new_referential_line_route_path(@referential, @line), :class => "add" %></li>
+ <% end %>
</ul>
<%= creation_tag(@line) %>
<% end %>