_commit_box.html.haml 2.13 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
        %li= link_to "Plain Diff",    namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff)
16 17 18
    = link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-grouped" do
      = icon('files-o')
      Browse Files
19
  %div
randx's avatar
randx committed
20

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

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

.commit-info-row
  %span.cgray= pluralize(@commit.parents.count, "parent")
  - @commit.parents.each do |parent|
Kamil Trzcinski's avatar
Kamil Trzcinski committed
41
    = link_to parent.short_id, namespace_project_commit_path(@project.namespace, @project, parent), class: "monospace"
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:
48
      = ci_status_label(@ci_commit)
49

50 51
.commit-info-row.branches
  %i.fa.fa-spinner.fa-spin
52

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

60 61
:javascript
  $(".commit-info-row.branches").load("#{branches_namespace_project_commit_path(@project.namespace, @project, @commit.id)}");