diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-26 06:08:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-26 06:08:40 +0000 |
commit | 116d4e56e83a1f408afe710ce070e699ba206475 (patch) | |
tree | cc62d3820d9bfa199061edfdef3a2f4bda140507 /app/helpers/services_helper.rb | |
parent | dddde902acfa6acfb11583c61faa67cc7c8d11b6 (diff) | |
download | gitlab-ce-116d4e56e83a1f408afe710ce070e699ba206475.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/services_helper.rb')
-rw-r--r-- | app/helpers/services_helper.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/helpers/services_helper.rb b/app/helpers/services_helper.rb index d2336de7193..fe2df918819 100644 --- a/app/helpers/services_helper.rb +++ b/app/helpers/services_helper.rb @@ -66,6 +66,36 @@ module ServicesHelper edit_admin_application_settings_integration_path(integration) end + def scoped_integrations_path + if @project.present? + project_settings_integrations_path(@project) + elsif @group.present? + group_settings_integrations_path(@group) + else + integrations_admin_application_settings_path + end + end + + def scoped_integration_path(integration) + if @project.present? + project_settings_integration_path(@project, integration) + elsif @group.present? + group_settings_integration_path(@group, integration) + else + admin_application_settings_integration_path(integration) + end + end + + def scoped_test_integration_path(integration) + if @project.present? + test_project_settings_integration_path(@project, integration) + elsif @group.present? + test_group_settings_integration_path(@group, integration) + else + test_admin_application_settings_integration_path(integration) + end + end + extend self end |