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