summaryrefslogtreecommitdiff
path: root/app/views/projects/commits/_commits.html.haml
blob: cf8dffc8957038946e8b020e5f4ec08e59cacdf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- ref = local_assigns.fetch(:ref)
- commits, hidden = limited_commits(@commits)

- commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, commits|
  %li.commit-header.js-commit-header{ data: { day: day } }
    %span.day= l(day, format: '%d %b, %Y')
    %span.commits-count= n_("%d commit", "%d commits", commits.count) % commits.count

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

- if hidden > 0
  %li.alert.alert-warning
    = n_('%d additional commit has been omitted to prevent performance issues.', '%d additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden)