aboutsummaryrefslogtreecommitdiffstats
path: root/app/decorators
diff options
context:
space:
mode:
authorAlban Peignier2017-12-21 17:39:29 +0100
committerAlban Peignier2017-12-21 17:39:29 +0100
commitdcbb755e047907b3e9f032534556c05b38bf7073 (patch)
tree9b5e68616edd2694fd53195ffd0dd1bfed58df85 /app/decorators
parent3cd644d0b1b0083af328616b1877fb03ed5e6cf9 (diff)
downloadchouette-core-dcbb755e047907b3e9f032534556c05b38bf7073.tar.bz2
Add purchase_windows link when optional feature is present. Refs #5301
Diffstat (limited to 'app/decorators')
-rw-r--r--app/decorators/referential_decorator.rb7
1 files changed, 7 insertions, 0 deletions
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)