_event_push.html.haml 1.1 KB
Newer Older
1
%div
2
  .event_icon= image_tag "event_push.png"
3
  = image_tag gravatar_icon(event.author_email), class: "avatar"
4
  %strong #{event.author_name}
5
  %span.event_label.pushed= event.push_action_name
6
  = event.ref_type
7
  = link_to project_commits_path(event.project, ref: event.ref_name) do
8
    %strong= event.ref_name
9
  at
10 11 12 13
  %strong= link_to event.project.name, event.project
  %span.cgray
    = time_ago_in_words(event.created_at)
    ago.
14

15
  - if event.push_with_commits?
16
    - if event.commits_count > 1
17
      = link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
18
        %strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
19
    - project = event.project
20
    %ul.unstyled.event_commits
21
      - if event.commits_count > 3
22
        - event.commits[0...2].each do |commit|
23
          = render "events/commit", commit: commit, project: project
24 25
        %li
          %br
26
          \... and #{event.commits_count - 2} more commits
27
      - else
28
        - event.commits.each do |commit|
29
          = render "events/commit", commit: commit, project: project
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
30