diff options
| author | cedricnjanga | 2018-01-30 23:26:45 -0800 |
|---|---|---|
| committer | cedricnjanga | 2018-01-30 23:26:45 -0800 |
| commit | e54ee3a4379afb763906ab2ba2fd980349c48334 (patch) | |
| tree | c8c98ec76f57f20bdefeb51edad704727a2c7847 | |
| parent | 0506396d3ca91d169ac61ffc2e6f68bebd03cc55 (diff) | |
| download | chouette-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.rb | 1 |
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| |
