_commits.html.haml 979 Bytes
Newer Older
1 2 3 4
- merge_request = local_assigns.fetch(:merge_request, nil)
- project = local_assigns.fetch(:project) { merge_request&.project }
- ref = local_assigns.fetch(:ref) { merge_request&.source_branch }

5
- commits, hidden = limited_commits(@commits)
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
6

Sean McGivern's avatar
Sean McGivern committed
7
- commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, commits|
8
  %li.commit-header.js-commit-header{ data: { day: day } }
9 10
    %span.day= l(day, format: '%d %b, %Y')
    %span.commits-count= n_("%d commit", "%d commits", commits.count) % commits.count
11 12

  %li.commits-row{ data: { day: day } }
13
    %ul.content-list.commit-list.flex-list
14
      = render partial: 'projects/commits/commit', collection: commits, locals: { project: project, ref: ref, merge_request: merge_request }
15

16
- if hidden > 0
Phil Hughes's avatar
Phil Hughes committed
17
  %li.alert.alert-warning
18
    = n_('%s additional commit has been omitted to prevent performance issues.', '%s additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden)