From dcbb755e047907b3e9f032534556c05b38bf7073 Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Thu, 21 Dec 2017 17:39:29 +0100 Subject: Add purchase_windows link when optional feature is present. Refs #5301 --- app/decorators/referential_decorator.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app') diff --git a/app/decorators/referential_decorator.rb b/app/decorators/referential_decorator.rb index 0863b7f4b..d75ad1050 100644 --- a/app/decorators/referential_decorator.rb +++ b/app/decorators/referential_decorator.rb @@ -12,6 +12,13 @@ class ReferentialDecorator < Draper::Decorator ) end + if has_feature?(:purchase_windows) + links << Link.new( + content: h.t('purchase_windows.index.title'), + href: h.referential_purchase_windows_path(object) + ) + end + links << Link.new( content: h.t('time_tables.index.title'), href: h.referential_time_tables_path(object) -- cgit v1.2.3