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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 09:08:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 09:08:40 +0300
commit116d4e56e83a1f408afe710ce070e699ba206475 (patch)
treecc62d3820d9bfa199061edfdef3a2f4bda140507 /app/helpers/services_helper.rb
parentdddde902acfa6acfb11583c61faa67cc7c8d11b6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/services_helper.rb')
-rw-r--r--app/helpers/services_helper.rb30
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