_commit_box.html.haml 1.74 KB
Newer Older
1
.commit-box{class: @commit.parents_count > 1 ? "merge-commit" : ""}
randx's avatar
randx committed
2
  .commit-head
3 4
    .right
      - if @notes_count > 0
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
5
        %span.btn.disabled.grouped
6 7
          %i.icon-comment
          = @notes_count
8 9 10 11 12 13 14 15
      .left.btn-group
        %a.btn.small.grouped.dropdown-toggle{ data: {toggle: :dropdown} }
          %i.icon-download-alt
          Download as
          %span.caret
        %ul.dropdown-menu
          %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch)
          %li= link_to "Plain Diff",    project_commit_path(@project, @commit, format: :diff)
16
      = link_to project_tree_path(@project, @commit), class: "browse-button primary grouped" do
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
17
        %strong Browse Code »
randx's avatar
randx committed
18
    %h3.commit-title.page_title
19
      = gfm escape_once(@commit.title)
randx's avatar
randx committed
20 21
    - if @commit.description.present?
      %pre.commit-description
22
        = gfm escape_once(@commit.description)
randx's avatar
randx committed
23 24
  .commit-info
    .row
25
      .span5
randx's avatar
randx committed
26
        .author
27
          %strong= @commit.author_link avatar: true, size: 40
randx's avatar
randx committed
28 29 30 31 32 33
          authored
          %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")}
            #{time_ago_in_words(@commit.authored_date)} ago
        - if @commit.different_committer?
          .committer
            →
34
            %strong= @commit.committer_link
randx's avatar
randx committed
35 36 37
            committed
            %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")}
              #{time_ago_in_words(@commit.committed_date)} ago
38
      .span6.right
randx's avatar
randx committed
39 40
        .sha-block
          %span.cgray commit
41
          %code.label_commit= @commit.id
randx's avatar
randx committed
42 43 44 45 46 47
        .sha-block
          %span.cgray= pluralize(@commit.parents.count, "parent")
          - @commit.parents.each do |parent|
            = link_to parent.id[0...10], project_commit_path(@project, parent)