diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-29 18:10:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-29 18:10:45 +0300 |
commit | 51a7dc1b9d146b33ddf8ec167944151f4b58e620 (patch) | |
tree | 704e26d941c90ecc6215053a5f855174cc9a0e5c /app/presenters/blob_presenter.rb | |
parent | 21a78a7f74298cfd1a27b490bf6c94d2652e1167 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/blob_presenter.rb')
-rw-r--r-- | app/presenters/blob_presenter.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/presenters/blob_presenter.rb b/app/presenters/blob_presenter.rb index 3bd92ebc942..e525d1d6a62 100644 --- a/app/presenters/blob_presenter.rb +++ b/app/presenters/blob_presenter.rb @@ -63,6 +63,22 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated project_ci_pipeline_editor_path(project, branch_name: blob.commit_id) if can_collaborate_with_project?(project) && blob.path == project.ci_config_path_or_default end + def find_file_path + url_helpers.project_find_file_path(project, ref_qualified_path) + end + + def blame_path + url_helpers.project_blame_path(project, ref_qualified_path) + end + + def history_path + url_helpers.project_commits_path(project, ref_qualified_path) + end + + def permalink_path + url_helpers.project_blob_path(project, File.join(project.repository.commit.sha, blob.path)) + end + # Will be overridden in EE def code_owners [] |