diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2018-09-11 18:24:34 +0300 |
---|---|---|
committer | Martin Wortschack <mwortschack@gitlab.com> | 2018-09-11 18:26:15 +0300 |
commit | 48ee697bf2fa4536be6dbee9cb579fde625d50b4 (patch) | |
tree | 6198b5efa7307cddc15be375009a56679e47d0fe /app/helpers | |
parent | b4c7e7225a4c48a8a78344a2de2dd585cfd62027 (diff) |
remove 'Geo' and 'Templates' template from CE and display menu items for EE only
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bb7ae03313c..7846de9f481 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -6,7 +6,15 @@ require 'uri' module ApplicationHelper # See https://docs.gitlab.com/ee/development/ee_features.html#code-in-app-views def render_if_exists(partial, locals = {}) - render(partial, locals) if lookup_context.exists?(partial, [], true) + render(partial, locals) if partial_exists?(partial) + end + + def partial_exists?(partial) + lookup_context.exists?(partial, [], true) + end + + def view_exists?(partial) + lookup_context.exists?(partial, [], false) end # Check if a particular controller is the current one |