_commit_box.html.haml 2.1 KB
Newer Older
1 2 3
.pull-right
  %div
    - if @notes_count > 0
4
      %span.btn.disabled.btn-grouped
S
Sullivan SENECHAL 已提交
5
        %i.fa.fa-comment
6 7
        = @notes_count
    .pull-left.btn-group
8
      %a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} }
S
Sullivan SENECHAL 已提交
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)
V
Vinnie Okada 已提交
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
R
randx 已提交
19

20 21
%p
  %span.light Commit
K
Kamil Trzcinski 已提交
22
  = link_to @commit.id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace"
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)}
R
randx 已提交
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|
K
Kamil Trzcinski 已提交
39
    = link_to parent.short_id, namespace_project_commit_path(@project.namespace, @project, parent), class: "monospace"
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
H
Hannes Rosenögger 已提交
50

D
Dmitriy Zaporozhets 已提交
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 59
:javascript
  $(".commit-info-row.branches").load("#{branches_namespace_project_commit_path(@project.namespace, @project, @commit.id)}");