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:
Diffstat (limited to 'app/helpers/user_callouts_helper.rb')
-rw-r--r--app/helpers/user_callouts_helper.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/user_callouts_helper.rb b/app/helpers/user_callouts_helper.rb
index 34c8ce51df0..98159369fb1 100644
--- a/app/helpers/user_callouts_helper.rb
+++ b/app/helpers/user_callouts_helper.rb
@@ -7,13 +7,15 @@ module UserCalloutsHelper
SUGGEST_POPOVER_DISMISSED = 'suggest_popover_dismissed'
TABS_POSITION_HIGHLIGHT = 'tabs_position_highlight'
WEBHOOKS_MOVED = 'webhooks_moved'
+ CUSTOMIZE_HOMEPAGE = 'customize_homepage'
def show_admin_integrations_moved?
!user_dismissed?(ADMIN_INTEGRATIONS_MOVED)
end
def show_gke_cluster_integration_callout?(project)
- can?(current_user, :create_cluster, project) &&
+ active_nav_link?(controller: sidebar_operations_paths) &&
+ can?(current_user, :create_cluster, project) &&
!user_dismissed?(GKE_CLUSTER_INTEGRATION)
end
@@ -35,14 +37,14 @@ module UserCalloutsHelper
!user_dismissed?(SUGGEST_POPOVER_DISMISSED)
end
- def show_tabs_feature_highlight?
- current_user && !user_dismissed?(TABS_POSITION_HIGHLIGHT) && !Rails.env.test?
- end
-
def show_webhooks_moved_alert?
!user_dismissed?(WEBHOOKS_MOVED)
end
+ def show_customize_homepage_banner?(customize_homepage)
+ customize_homepage && !user_dismissed?(CUSTOMIZE_HOMEPAGE)
+ end
+
private
def user_dismissed?(feature_name, ignore_dismissal_earlier_than = nil)