summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-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