From 353ab119bb628947000ed57f740d3b380be057d3 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Wed, 9 May 2018 21:41:40 -0700 Subject: Refs #6863 Display import & export actions on conditions --- app/views/workbenches/show.html.slim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index 213c9e5f2..979e7ff04 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -6,8 +6,8 @@ - if policy(Workbench).update? = link_to t('workbenches.actions.configure'), edit_workbench_path(@workbench), class: 'btn btn-primary' - if policy(Referential).create? - = link_to t('actions.import'), workbench_imports_path(@workbench), class: 'btn btn-primary' - = link_to t('actions.export'), workbench_exports_path(@workbench), class: 'btn btn-primary' + = link_to t('actions.import'), workbench_imports_path(@workbench), class: 'btn btn-primary' unless @workbench.workgroup.import_types.empty? + = link_to t('actions.export'), workbench_exports_path(@workbench), class: 'btn btn-primary' unless @workbench.workgroup.export_types.empty? = link_to t('actions.add'), new_workbench_referential_path(@workbench), class: 'btn btn-primary' = link_to t('workbenches.actions.show_output'), workbench_output_path(@workbench), class: 'btn btn-primary' -- cgit v1.2.3