summaryrefslogtreecommitdiff
path: root/app/views/projects/commits/_commits.html.haml
blob: e708b2df54034c228a9c514a1156c9ab32689c82 (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
- unless defined?(project)
  - project = @project
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
  - commits = @commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE)
  - overflow = true
- else
  - commits = @commits
  - overflow = false

- commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits|
  .row.commits-row
    .col-md-2.hidden-xs.hidden-sm
      %h5.commits-row-date
        %i.fa.fa-calendar
        %span= day.strftime('%d %b, %Y')
      .light
        = pluralize(commits.count, 'commit')
    .col-md-10.col-sm-12
      %ul.bordered-list
        = render commits, project: project
  %hr.lists-separator

- if overflow
  .alert.alert-warning
    Not shown: #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} more commits