Module: LearnGitlabHelper
- Defined in:
- app/helpers/learn_gitlab_helper.rb
Constant Summary collapse
- IMAGE_PATH_PLAN =
"learn_gitlab/section_plan.svg"
- IMAGE_PATH_DEPLOY =
"learn_gitlab/section_deploy.svg"
- IMAGE_PATH_WORKSPACE =
"learn_gitlab/section_workspace.svg"
Instance Method Summary collapse
- #learn_gitlab_data(project) ⇒ Object
- #learn_gitlab_enabled?(project) ⇒ Boolean
- #learn_gitlab_onboarding_available?(project) ⇒ Boolean
Instance Method Details
#learn_gitlab_data(project) ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/helpers/learn_gitlab_helper.rb', line 14 def learn_gitlab_data(project) { actions: onboarding_actions_data(project).to_json, sections: onboarding_sections_data.to_json, project: onboarding_project_data(project).to_json } end |
#learn_gitlab_enabled?(project) ⇒ Boolean
8 9 10 11 12 |
# File 'app/helpers/learn_gitlab_helper.rb', line 8 def learn_gitlab_enabled?(project) return false unless current_user learn_gitlab_onboarding_available?(project) end |
#learn_gitlab_onboarding_available?(project) ⇒ Boolean
22 23 24 25 |
# File 'app/helpers/learn_gitlab_helper.rb', line 22 def learn_gitlab_onboarding_available?(project) OnboardingProgress.onboarding?(project.namespace) && LearnGitlab::Project.new(current_user).available? end |