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/learn_gitlab_helper.rb')
-rw-r--r--app/helpers/learn_gitlab_helper.rb25
1 files changed, 15 insertions, 10 deletions
diff --git a/app/helpers/learn_gitlab_helper.rb b/app/helpers/learn_gitlab_helper.rb
index 421cf84f98c..a07922e451a 100644
--- a/app/helpers/learn_gitlab_helper.rb
+++ b/app/helpers/learn_gitlab_helper.rb
@@ -21,8 +21,8 @@ module LearnGitlabHelper
end
def learn_gitlab_onboarding_available?(project)
- OnboardingProgress.onboarding?(project.namespace) &&
- LearnGitlab::Project.new(current_user).available?
+ Onboarding::Progress.onboarding?(project.namespace) &&
+ Onboarding::LearnGitlab.new(current_user).available?
end
private
@@ -33,10 +33,12 @@ module LearnGitlabHelper
action_urls(project).to_h do |action, url|
[
action,
- url: url,
- completed: attributes[OnboardingProgress.column_name(action)].present?,
- svg: image_path("learn_gitlab/#{action}.svg"),
- enabled: true
+ {
+ url: url,
+ completed: attributes[Onboarding::Progress.column_name(action)].present?,
+ svg: image_path("learn_gitlab/#{action}.svg"),
+ enabled: true
+ }
]
end
end
@@ -70,11 +72,14 @@ module LearnGitlabHelper
end
def action_issue_urls
- LearnGitlab::Onboarding::ACTION_ISSUE_IDS.transform_values { |id| project_issue_url(learn_gitlab_project, id) }
+ Onboarding::Completion::ACTION_ISSUE_IDS.transform_values do |id|
+ project_issue_url(learn_gitlab_project, id)
+ end
end
def deploy_section_action_urls(project)
- experiment(:security_actions_continuous_onboarding,
+ experiment(
+ :security_actions_continuous_onboarding,
namespace: project.namespace,
user: current_user,
sticky_to: current_user
@@ -91,11 +96,11 @@ module LearnGitlabHelper
end
def learn_gitlab_project
- @learn_gitlab_project ||= LearnGitlab::Project.new(current_user).project
+ @learn_gitlab_project ||= Onboarding::LearnGitlab.new(current_user).project
end
def onboarding_progress(project)
- OnboardingProgress.find_by(namespace: project.namespace) # rubocop: disable CodeReuse/ActiveRecord
+ Onboarding::Progress.find_by(namespace: project.namespace) # rubocop: disable CodeReuse/ActiveRecord
end
end