_commit_box.html.haml 2.02 KB
Newer Older
1 2 3
.pull-right
  %div
    - if @notes_count > 0
4
      %span.btn.disabled.btn-grouped
5
        %i.fa.fa-comment
6 7
        = @notes_count
    .pull-left.btn-group
8
      %a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} }
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
9
        %i.fa.fa-download
10 11 12
        Download as
        %span.caret
      %ul.dropdown-menu
13 14
        - unless @commit.parents.length > 1
          %li= link_to "Email Patches", namespace_project_commit_path(@project.namespace, @project, @commit, format: :patch)
Vinnie Okada's avatar
Vinnie Okada committed
15 16
        %li= link_to "Plain Diff",    namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff)
    = link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-primary btn-grouped" do
17 18
      %span Browse Code »
  %div
randx's avatar
randx committed
19

20 21
%p
  %span.light Commit
Vinnie Okada's avatar
Vinnie Okada committed
22
  = link_to @commit.id, namespace_project_commit_path(@project.namespace, @project, @commit)
23 24 25 26
.commit-info-row
  %span.light Authored by
  %strong
    = commit_author_link(@commit, avatar: true, size: 24)
27
  #{time_ago_with_tooltip(@commit.authored_date)}
randx's avatar
randx committed
28

29 30 31 32 33
- if @commit.different_committer?
  .commit-info-row
    %span.light Committed by
    %strong
      = commit_committer_link(@commit, avatar: true, size: 24)
34
    #{time_ago_with_tooltip(@commit.committed_date)}
35 36 37 38

.commit-info-row
  %span.cgray= pluralize(@commit.parents.count, "parent")
  - @commit.parents.each do |parent|
Vinnie Okada's avatar
Vinnie Okada committed
39
    = link_to parent.short_id, namespace_project_commit_path(@project.namespace, @project, parent)
40

41 42 43 44 45 46 47
- if @ci_commit
  .pull-right
    = link_to ci_status_path(@ci_commit), class: "ci-status ci-#{@ci_commit.status}" do
      = ci_status_icon(@ci_commit)
      build:
      = @ci_commit.status

48 49
.commit-info-row.branches
  %i.fa.fa-spinner.fa-spin
50

51
.commit-box.gray-content-block.middle-block
52 53 54 55
  %h3.commit-title
    = gfm escape_once(@commit.title)
  - if @commit.description.present?
    %pre.commit-description
56
      = preserve(gfm(escape_once(@commit.description)))
57 58

:coffeescript
59
  $(".commit-info-row.branches").load("#{branches_namespace_project_commit_path(@project.namespace, @project, @commit.id)}")