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>2019-12-11 00:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-11 00:08:01 +0300
commit4ba55564e1dd7fdbdb89065be8eefd01d8c2d607 (patch)
tree32e6eaec4cf44b40607e3fd8c4077050c3ce9771 /app/helpers/gitlab_routing_helper.rb
parent115c8ea7af7ef69ca3f09c333314546e9b5712f9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/gitlab_routing_helper.rb')
-rw-r--r--app/helpers/gitlab_routing_helper.rb68
1 files changed, 32 insertions, 36 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb
index 3810041b2af..78c41257404 100644
--- a/app/helpers/gitlab_routing_helper.rb
+++ b/app/helpers/gitlab_routing_helper.rb
@@ -194,88 +194,84 @@ module GitlabRoutingHelper
take_ownership_project_pipeline_schedule_path(project, schedule, *args)
end
- def snippet_path(snippet, *args)
- if snippet.type == "ProjectSnippet"
- application_url_helpers.project_snippet_path(snippet.project, snippet, *args)
+ def gitlab_snippet_path(snippet, *args)
+ if snippet.is_a?(ProjectSnippet)
+ project_snippet_path(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.snippet_path(snippet, *new_args)
+ snippet_path(snippet, *new_args)
end
end
- def snippet_url(snippet, *args)
- if snippet.type == "ProjectSnippet"
- application_url_helpers.project_snippet_url(snippet.project, snippet, *args)
+ def gitlab_snippet_url(snippet, *args)
+ if snippet.is_a?(ProjectSnippet)
+ project_snippet_url(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.snippet_url(snippet, *new_args)
+ snippet_url(snippet, *new_args)
end
end
- def raw_snippet_path(snippet, *args)
- if snippet.type == "ProjectSnippet"
- application_url_helpers.raw_project_snippet_path(snippet.project, snippet, *args)
+ def gitlab_raw_snippet_path(snippet, *args)
+ if snippet.is_a?(ProjectSnippet)
+ raw_project_snippet_path(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.raw_snippet_path(snippet, *new_args)
+ raw_snippet_path(snippet, *new_args)
end
end
- def raw_snippet_url(snippet, *args)
- if snippet.type == "ProjectSnippet"
- application_url_helpers.raw_project_snippet_url(snippet.project, snippet, *args)
+ def gitlab_raw_snippet_url(snippet, *args)
+ if snippet.is_a?(ProjectSnippet)
+ raw_project_snippet_url(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.raw_snippet_url(snippet, *new_args)
+ raw_snippet_url(snippet, *new_args)
end
end
- def snippet_notes_path(snippet, *args)
+ def gitlab_snippet_notes_path(snippet, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.snippet_notes_path(snippet, *new_args)
+ snippet_notes_path(snippet, *new_args)
end
- def snippet_notes_url(snippet, *args)
+ def gitlab_snippet_notes_url(snippet, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.snippet_notes_url(snippet, *new_args)
+ snippet_notes_url(snippet, *new_args)
end
- def snippet_note_path(snippet, note, *args)
+ def gitlab_snippet_note_path(snippet, note, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.snippet_note_path(snippet, note, *new_args)
+ snippet_note_path(snippet, note, *new_args)
end
- def snippet_note_url(snippet, note, *args)
+ def gitlab_snippet_note_url(snippet, note, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.snippet_note_url(snippet, note, *new_args)
+ snippet_note_url(snippet, note, *new_args)
end
- def toggle_award_emoji_snippet_note_path(snippet, note, *args)
+ def gitlab_toggle_award_emoji_snippet_note_path(snippet, note, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.toggle_award_emoji_snippet_note_path(snippet, note, *new_args)
+ toggle_award_emoji_snippet_note_path(snippet, note, *new_args)
end
- def toggle_award_emoji_snippet_note_url(snippet, note, *args)
+ def gitlab_toggle_award_emoji_snippet_note_url(snippet, note, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.toggle_award_emoji_snippet_note_url(snippet, note, *new_args)
+ toggle_award_emoji_snippet_note_url(snippet, note, *new_args)
end
- def toggle_award_emoji_snippet_path(snippet, *args)
+ def gitlab_toggle_award_emoji_snippet_path(snippet, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.toggle_award_emoji_snippet_path(snippet, *new_args)
+ toggle_award_emoji_snippet_path(snippet, *new_args)
end
- def toggle_award_emoji_snippet_url(snippet, *args)
+ def gitlab_toggle_award_emoji_snippet_url(snippet, *args)
new_args = snippet_query_params(snippet, *args)
- application_url_helpers.toggle_award_emoji_snippet_url(snippet, *new_args)
+ toggle_award_emoji_snippet_url(snippet, *new_args)
end
private
- def application_url_helpers
- Gitlab::Routing.url_helpers
- end
-
def snippet_query_params(snippet, *args)
opts = case args.last
when Hash