diff options
Diffstat (limited to 'app/controllers/concerns/work_items_hierarchy.rb')
-rw-r--r-- | app/controllers/concerns/work_items_hierarchy.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/concerns/work_items_hierarchy.rb b/app/controllers/concerns/work_items_hierarchy.rb new file mode 100644 index 00000000000..6008256408c --- /dev/null +++ b/app/controllers/concerns/work_items_hierarchy.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module WorkItemsHierarchy + extend ActiveSupport::Concern + + # rubocop:disable Gitlab/ModuleWithInstanceVariables + def planning_hierarchy + return render_404 unless Feature.enabled?(:work_items_hierarchy, @project, default_enabled: :yaml) + + render 'shared/planning_hierarchy' + end + # rubocop:enable Gitlab/ModuleWithInstanceVariables +end + +WorkItemsHierarchy.prepend_mod_with('WorkItemsHierarchy') |