2017-06-29 17:19:09 -04:00
- 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 }
2016-03-04 09:45:58 -05:00
- commits, hidden = limited_commits(@commits)
2015-01-17 17:54:54 -05:00
2016-05-18 12:38:00 -04:00
- commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, commits|
2017-06-02 21:40:20 -04:00
%li.commit-header.js-commit-header{ data: { day: day } }
2017-06-09 12:17:16 -04:00
%span.day= l(day, format: '%d %b, %Y')
%span.commits-count= n_("%d commit", "%d commits", commits.count) % commits.count
2017-06-02 21:40:20 -04:00
%li.commits-row{ data: { day: day } }
2017-07-06 10:30:43 -04:00
%ul.content-list.commit-list.flex-list
2017-06-29 17:19:09 -04:00
= render partial: 'projects/commits/commit', collection: commits, locals: { project: project, ref: ref, merge_request: merge_request }
2016-03-04 09:20:30 -05:00
2016-03-04 09:45:58 -05:00
- if hidden > 0
2016-05-24 03:28:18 -04:00
%li.alert.alert-warning
2017-07-05 11:54:33 -04:00
= 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)