Commit eb06dd79f8285c5a375bbbe796d6e92ab7080cab
1 parent
20496491
Exists in
master
and in
4 other branches
Update views for GFM
Showing
16 changed files
with
19 additions
and
18 deletions
Show diff stats
app/controllers/refs_controller.rb
... | ... | @@ -90,6 +90,7 @@ class RefsController < ApplicationController |
90 | 90 | |
91 | 91 | @repo = project.repo |
92 | 92 | @commit = project.commit(@ref) |
93 | + @commit = CommitDecorator.decorate(@commit) | |
93 | 94 | @tree = Tree.new(@commit.tree, project, @ref, params[:path]) |
94 | 95 | @tree = TreeDecorator.new(@tree) |
95 | 96 | @hex_path = Digest::SHA1.hexdigest(params[:path] || "/") | ... | ... |
app/views/commits/_commit.html.haml
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | %strong.cgray= commit.author_name |
8 | 8 | – |
9 | 9 | = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 |
10 | - = link_to truncate(commit.title, :length => 50), project_commit_path(@project, :id => commit.id), :class => "row_title" | |
10 | + = link_to_gfm truncate(commit.title, :length => 50), project_commit_path(@project, :id => commit.id), :class => "row_title" | |
11 | 11 | |
12 | 12 | %span.committed_ago |
13 | 13 | = time_ago_in_words(commit.committed_date) | ... | ... |
app/views/commits/_commit_box.html.haml
... | ... | @@ -11,10 +11,10 @@ |
11 | 11 | = link_to tree_project_ref_path(@project, @commit.id), :class => "browse-button primary grouped" do |
12 | 12 | %strong Browse Code » |
13 | 13 | %h3.commit-title.page_title |
14 | - = commit_msg_with_link_to_issues(@project, @commit.title) | |
14 | + = gfm @commit.title | |
15 | 15 | - if @commit.description.present? |
16 | 16 | %pre.commit-description |
17 | - = commit_msg_with_link_to_issues(@project, @commit.description) | |
17 | + = gfm @commit.description | |
18 | 18 | .commit-info |
19 | 19 | .row |
20 | 20 | .span4 | ... | ... |
app/views/commits/index.atom.builder
... | ... | @@ -17,7 +17,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear |
17 | 17 | xml.name commit.author_name |
18 | 18 | xml.email commit.author_email |
19 | 19 | end |
20 | - xml.summary commit.description | |
20 | + xml.summary gfm(commit.description) | |
21 | 21 | end |
22 | 22 | end |
23 | 23 | end | ... | ... |
app/views/events/_commit.html.haml
... | ... | @@ -5,5 +5,5 @@ |
5 | 5 | %strong.cdark= commit.author_name |
6 | 6 | – |
7 | 7 | = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 |
8 | - = truncate(commit.title, :length => 50) rescue "--broken encoding" | |
8 | + = gfm truncate(commit.title, :length => 50), project_commit_path(project, :id => commit.id) rescue "--broken encoding" | |
9 | 9 | ... | ... |
app/views/issues/_show.html.haml
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | - else |
25 | 25 | = image_tag "no_avatar.png", :class => "avatar" |
26 | 26 | |
27 | - %p= link_to truncate(issue.title, :length => 100), project_issue_path(issue.project, issue), :class => "row_title" | |
27 | + %p= link_to_gfm truncate(issue.title, :length => 100), project_issue_path(issue.project, issue), :class => "row_title" | |
28 | 28 | |
29 | 29 | %span.update-author |
30 | 30 | %small.cdark= "##{issue.id}" | ... | ... |
app/views/issues/show.html.haml
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | .alert-message.error.status_info Closed |
32 | 32 | - else |
33 | 33 | .alert-message.success.status_info Open |
34 | - = @issue.title | |
34 | + = gfm @issue.title | |
35 | 35 | |
36 | 36 | .middle_box_content |
37 | 37 | %cite.cgray Created by |
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | - if @issue.milestone |
47 | 47 | - milestone = @issue.milestone |
48 | 48 | %cite.cgray and attached to milestone |
49 | - %strong= link_to truncate(milestone.title, :length => 20), project_milestone_path(milestone.project, milestone) | |
49 | + %strong= link_to_gfm truncate(milestone.title, :length => 20), project_milestone_path(milestone.project, milestone) | |
50 | 50 | |
51 | 51 | .right |
52 | 52 | - @issue.labels.each do |label| | ... | ... |
app/views/merge_requests/_merge_request.html.haml
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | = merge_request.target_branch |
17 | 17 | = image_tag gravatar_icon(merge_request.author_email), :class => "avatar" |
18 | 18 | |
19 | - %p= link_to truncate(merge_request.title, :length => 80), project_merge_request_path(merge_request.project, merge_request), :class => "row_title" | |
19 | + %p= link_to_gfm truncate(merge_request.title, :length => 80), project_merge_request_path(merge_request.project, merge_request), :class => "row_title" | |
20 | 20 | |
21 | 21 | %span.update-author |
22 | 22 | %small.cdark= "##{merge_request.id}" | ... | ... |
app/views/merge_requests/show/_mr_box.html.haml
app/views/milestones/_milestone.html.haml
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | - if can? current_user, :admin_milestone, milestone.project |
8 | 8 | = link_to 'Edit', edit_project_milestone_path(milestone.project, milestone), :class => "btn small edit-milestone-link grouped" |
9 | 9 | %h4 |
10 | - = link_to truncate(milestone.title, :length => 100), project_milestone_path(milestone.project, milestone), :class => "row_title" | |
10 | + = link_to_gfm truncate(milestone.title, :length => 100), project_milestone_path(milestone.project, milestone), :class => "row_title" | |
11 | 11 | %small |
12 | 12 | = milestone.expires_at |
13 | 13 | %br | ... | ... |
app/views/milestones/show.html.haml
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | .alert-message.error.status_info Closed |
22 | 22 | - else |
23 | 23 | .alert-message.success.status_info Open |
24 | - = @milestone.title | |
24 | + = gfm @milestone.title | |
25 | 25 | %small.right= @milestone.expires_at |
26 | 26 | |
27 | 27 | .middle_box_content |
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | = link_to [@project, issue] do |
52 | 52 | %span.badge.badge-info ##{issue.id} |
53 | 53 | – |
54 | - = link_to truncate(issue.title, :length => 60), [@project, issue] | |
54 | + = link_to_gfm truncate(issue.title, :length => 60), [@project, issue] | |
55 | 55 | %br |
56 | 56 | = paginate @issues, :theme => "gitlab" |
57 | 57 | ... | ... |
app/views/refs/_tree_commit.html.haml
1 | 1 | - if tm |
2 | 2 | %strong= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) |
3 | -= link_to truncate(content_commit.title, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link" | |
3 | += link_to_gfm truncate(content_commit.title, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link" | ... | ... |
app/views/refs/blame.html.haml
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | %td.blame_commit |
34 | 34 | |
35 | 35 | %code= link_to commit.short_id, project_commit_path(@project, :id => commit.id) |
36 | - = link_to truncate(commit.title, :length => 30), project_commit_path(@project, :id => commit.id), :class => "row_title" rescue "--broken encoding" | |
36 | + = link_to_gfm truncate(commit.title, :length => 30), project_commit_path(@project, :id => commit.id), :class => "row_title" rescue "--broken encoding" | |
37 | 37 | %td.lines |
38 | 38 | = preserve do |
39 | 39 | %pre | ... | ... |
app/views/repositories/_branch.html.haml
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | %code= commit.short_id |
12 | 12 | |
13 | 13 | = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 |
14 | - = truncate(commit.title, :length => 40) | |
14 | + = gfm truncate(commit.title, :length => 40) | |
15 | 15 | %td |
16 | 16 | %span.update-author.right |
17 | 17 | = time_ago_in_words(commit.committed_date) | ... | ... |
app/views/repositories/_feed.html.haml
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | = link_to project_commits_path(@project, commit.id) do |
14 | 14 | %code= commit.short_id |
15 | 15 | = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 |
16 | - = truncate(commit.title, :length => 40) | |
16 | + = gfm truncate(commit.title, :length => 40) | |
17 | 17 | %td |
18 | 18 | %span.right.cgray |
19 | 19 | = time_ago_in_words(commit.committed_date) | ... | ... |
app/views/repositories/tags.html.haml
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | = link_to project_commit_path(@project, commit.id) do |
18 | 18 | %code= commit.short_id |
19 | 19 | = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 |
20 | - = truncate(commit.title, :length => 40) | |
20 | + = gfm truncate(commit.title, :length => 40) | |
21 | 21 | %td |
22 | 22 | %span.update-author.right |
23 | 23 | = time_ago_in_words(commit.committed_date) | ... | ... |