diff options
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r-- | app/helpers/commits_helper.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index f5c75d62097..93776503dd6 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -105,7 +105,7 @@ module CommitsHelper tooltip = _("Browse Directory") end - link_to url, class: "btn gl-button btn-default has-tooltip", title: tooltip, data: { container: "body" } do + link_to url, class: "btn gl-button btn-default btn-icon has-tooltip", title: tooltip, data: { container: "body" } do sprite_icon('folder-open') end end @@ -127,13 +127,23 @@ module CommitsHelper end def conditionally_paginate_diff_files(diffs, paginate:, per: Projects::CommitController::COMMIT_DIFFS_PER_PAGE) - if paginate && Feature.enabled?(:paginate_commit_view, @project, type: :development) + if paginate Kaminari.paginate_array(diffs.diff_files.to_a).page(params[:page]).per(per) else diffs.diff_files end end + def cherry_pick_projects_data(project) + target_projects(project).map do |project| + { + id: project.id.to_s, + name: project.full_path, + refsUrl: refs_project_path(project) + } + end + end + protected # Private: Returns a link to a person. If the person has a matching user and |