summaryrefslogtreecommitdiff
path: root/app/views/projects/merge_requests/show/_commits.html.haml
blob: e62ab9d9d307b6326d77bb7658ec3c25ab116214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- if @commits.present?
  .panel.panel-default
    .panel-heading
      %i.icon-list
      Commits (#{@commits.count})
    .commits
      - if @commits.count > 8
        %ul.first-commits.well-list
          - @commits.first(8).each do |commit|
            = render "projects/commits/commit", commit: commit, project: @merge_request.source_project
          %li.bottom
            8 of #{@commits.count} commits displayed.
            %strong
              %a.show-all-commits Click here to show all
        - if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
          %ul.all-commits.hide.well-list
            - @commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE).each do |commit|
              = render "projects/commits/inline_commit", commit: commit, project: @merge_request.source_project
            %li
              other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden top prevent performance issues.
        - else
          %ul.all-commits.hide.well-list
            - @commits.each do |commit|
              = render "projects/commits/inline_commit", commit: commit, project: @merge_request.source_project

      - else
        %ul.well-list
          - @commits.each do |commit|
            = render "projects/commits/commit", commit: commit, project: @merge_request.source_project