Commit ad5ea14210cc6dcb674c421e296b67ed2d0e6dbc
1 parent
fec28388
Exists in
master
and in
4 other branches
Move commit.show partial from commits/ to commit/
Showing
3 changed files
with
51 additions
and
51 deletions
Show diff stats
... | ... | @@ -0,0 +1,50 @@ |
1 | +.ui-box.ui-box-show | |
2 | + .ui-box-head | |
3 | + .pull-right | |
4 | + - if @notes_count > 0 | |
5 | + %span.btn.disabled.grouped | |
6 | + %i.icon-comment | |
7 | + = @notes_count | |
8 | + .left.btn-group | |
9 | + %a.btn.grouped.dropdown-toggle{ data: {toggle: :dropdown} } | |
10 | + %i.icon-download-alt | |
11 | + Download as | |
12 | + %span.caret | |
13 | + %ul.dropdown-menu | |
14 | + %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch) | |
15 | + %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff) | |
16 | + = link_to project_tree_path(@project, @commit), class: "btn btn-primary grouped" do | |
17 | + %span Browse Code » | |
18 | + %h3.commit-title.page_title | |
19 | + = gfm escape_once(@commit.title) | |
20 | + - if @commit.description.present? | |
21 | + %pre.commit-description | |
22 | + = gfm escape_once(@commit.description) | |
23 | + .ui-box-body | |
24 | + .row | |
25 | + .span5 | |
26 | + .author | |
27 | + = @commit.author_link avatar: true, size: 32 | |
28 | + authored | |
29 | + %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")} | |
30 | + #{time_ago_in_words(@commit.authored_date)} ago | |
31 | + - if @commit.different_committer? | |
32 | + .committer | |
33 | + → | |
34 | + = @commit.committer_link | |
35 | + committed | |
36 | + %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")} | |
37 | + #{time_ago_in_words(@commit.committed_date)} ago | |
38 | + .span6.pull-right | |
39 | + .pull-right | |
40 | + .sha-block | |
41 | + %span.cgray commit | |
42 | + %span.label_commit= @commit.id | |
43 | + .clearfix | |
44 | + .pull-right | |
45 | + .sha-block | |
46 | + %span.cgray= pluralize(@commit.parents.count, "parent") | |
47 | + - @commit.parents.each do |parent| | |
48 | + = link_to parent.id[0...10], project_commit_path(@project, parent) | |
49 | + | |
50 | + | ... | ... |
app/views/commit/show.html.haml
app/views/commits/_commit_box.html.haml
... | ... | @@ -1,50 +0,0 @@ |
1 | -.ui-box.ui-box-show | |
2 | - .ui-box-head | |
3 | - .pull-right | |
4 | - - if @notes_count > 0 | |
5 | - %span.btn.disabled.grouped | |
6 | - %i.icon-comment | |
7 | - = @notes_count | |
8 | - .left.btn-group | |
9 | - %a.btn.grouped.dropdown-toggle{ data: {toggle: :dropdown} } | |
10 | - %i.icon-download-alt | |
11 | - Download as | |
12 | - %span.caret | |
13 | - %ul.dropdown-menu | |
14 | - %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch) | |
15 | - %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff) | |
16 | - = link_to project_tree_path(@project, @commit), class: "btn btn-primary grouped" do | |
17 | - %span Browse Code » | |
18 | - %h3.commit-title.page_title | |
19 | - = gfm escape_once(@commit.title) | |
20 | - - if @commit.description.present? | |
21 | - %pre.commit-description | |
22 | - = gfm escape_once(@commit.description) | |
23 | - .ui-box-body | |
24 | - .row | |
25 | - .span5 | |
26 | - .author | |
27 | - = @commit.author_link avatar: true, size: 32 | |
28 | - authored | |
29 | - %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")} | |
30 | - #{time_ago_in_words(@commit.authored_date)} ago | |
31 | - - if @commit.different_committer? | |
32 | - .committer | |
33 | - → | |
34 | - = @commit.committer_link | |
35 | - committed | |
36 | - %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")} | |
37 | - #{time_ago_in_words(@commit.committed_date)} ago | |
38 | - .span6.pull-right | |
39 | - .pull-right | |
40 | - .sha-block | |
41 | - %span.cgray commit | |
42 | - %span.label_commit= @commit.id | |
43 | - .clearfix | |
44 | - .pull-right | |
45 | - .sha-block | |
46 | - %span.cgray= pluralize(@commit.parents.count, "parent") | |
47 | - - @commit.parents.each do |parent| | |
48 | - = link_to parent.id[0...10], project_commit_path(@project, parent) | |
49 | - | |
50 | - |