aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedricnjanga2018-01-30 23:26:45 -0800
committercedricnjanga2018-01-30 23:26:45 -0800
commite54ee3a4379afb763906ab2ba2fd980349c48334 (patch)
treec8c98ec76f57f20bdefeb51edad704727a2c7847
parent0506396d3ca91d169ac61ffc2e6f68bebd03cc55 (diff)
downloadchouette-core-e54ee3a4379afb763906ab2ba2fd980349c48334.tar.bz2
Refs ##5370 Set network action_link to disabled if line doesn't have one
-rw-r--r--app/decorators/line_decorator.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/decorators/line_decorator.rb b/app/decorators/line_decorator.rb
index 9171a6310..adeb89f70 100644
--- a/app/decorators/line_decorator.rb
+++ b/app/decorators/line_decorator.rb
@@ -20,6 +20,7 @@ class LineDecorator < AF83::Decorator
instance_decorator.action_link secondary: :show do |l|
l.content t('lines.actions.show_network')
l.href { [context[:line_referential], object.network] }
+ l.disabled { object.network.nil? }
end
instance_decorator.action_link secondary: :show do |l|