Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2018-09-11 18:24:34 +0300
committerMartin Wortschack <mwortschack@gitlab.com>2018-09-11 18:26:15 +0300
commit48ee697bf2fa4536be6dbee9cb579fde625d50b4 (patch)
tree6198b5efa7307cddc15be375009a56679e47d0fe /app/helpers/application_helper.rb
parentb4c7e7225a4c48a8a78344a2de2dd585cfd62027 (diff)
remove 'Geo' and 'Templates' template from CE and display menu items for EE only
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb10
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