diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
commit | 14bd84b61276ef29b97d23642d698de769bacfd2 (patch) | |
tree | f9eba90140c1bd874211dea17750a0d422c04080 /app/helpers/blob_helper.rb | |
parent | 891c388697b2db0d8ee0c8358a9bdbf6dc56d581 (diff) |
Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r-- | app/helpers/blob_helper.rb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index 281d5c923d0..bb6fd6c3dad 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -2,9 +2,7 @@ module BlobHelper def edit_blob_path(project = @project, ref = @ref, path = @path, options = {}) - project_edit_blob_path(project, - tree_join(ref, path), - options[:link_opts]) + project_edit_blob_path(project, tree_join(ref, path), options[:link_opts]) end def ide_edit_path(project = @project, ref = @ref, path = @path) @@ -52,9 +50,11 @@ module BlobHelper def fork_path_for_current_user(project, path, with_notice: true) return unless current_user - project_forks_path(project, - namespace_key: current_user.namespace&.id, - continue: edit_blob_fork_params(path, with_notice: with_notice)) + project_forks_path( + project, + namespace_key: current_user.namespace&.id, + continue: edit_blob_fork_params(path, with_notice: with_notice) + ) end def encode_ide_path(path) @@ -66,12 +66,14 @@ module BlobHelper common_classes = "btn gl-button btn-confirm js-edit-blob gl-ml-3 #{options[:extra_class]}" - edit_button_tag(blob, - common_classes, - _('Edit'), - edit_blob_path(project, ref, path, options), - project, - ref) + edit_button_tag( + blob, + common_classes, + _('Edit'), + edit_blob_path(project, ref, path, options), + project, + ref + ) end def can_modify_blob?(blob, project = @project, ref = @ref) @@ -282,8 +284,8 @@ module BlobHelper fork_path = project_forks_path(project, namespace_key: current_user.namespace.id, continue: params) button_tag label, - class: "#{common_classes} js-edit-blob-link-fork-toggler", - data: { action: action, fork_path: fork_path } + class: "#{common_classes} js-edit-blob-link-fork-toggler", + data: { action: action, fork_path: fork_path } end def edit_disabled_button_tag(button_text, common_classes) |