Commit eb06dd79 authored by Riyad Preukschas's avatar Riyad Preukschas

Update views for GFM

parent 20496491
...@@ -90,6 +90,7 @@ class RefsController < ApplicationController ...@@ -90,6 +90,7 @@ class RefsController < ApplicationController
@repo = project.repo @repo = project.repo
@commit = project.commit(@ref) @commit = project.commit(@ref)
@commit = CommitDecorator.decorate(@commit)
@tree = Tree.new(@commit.tree, project, @ref, params[:path]) @tree = Tree.new(@commit.tree, project, @ref, params[:path])
@tree = TreeDecorator.new(@tree) @tree = TreeDecorator.new(@tree)
@hex_path = Digest::SHA1.hexdigest(params[:path] || "/") @hex_path = Digest::SHA1.hexdigest(params[:path] || "/")
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
%strong.cgray= commit.author_name %strong.cgray= commit.author_name
&ndash; &ndash;
= image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16
= link_to truncate(commit.title, :length => 50), project_commit_path(@project, :id => commit.id), :class => "row_title" = link_to_gfm truncate(commit.title, :length => 50), project_commit_path(@project, :id => commit.id), :class => "row_title"
%span.committed_ago %span.committed_ago
= time_ago_in_words(commit.committed_date) = time_ago_in_words(commit.committed_date)
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
= link_to tree_project_ref_path(@project, @commit.id), :class => "browse-button primary grouped" do = link_to tree_project_ref_path(@project, @commit.id), :class => "browse-button primary grouped" do
%strong Browse Code » %strong Browse Code »
%h3.commit-title.page_title %h3.commit-title.page_title
= commit_msg_with_link_to_issues(@project, @commit.title) = gfm @commit.title
- if @commit.description.present? - if @commit.description.present?
%pre.commit-description %pre.commit-description
= commit_msg_with_link_to_issues(@project, @commit.description) = gfm @commit.description
.commit-info .commit-info
.row .row
.span4 .span4
......
...@@ -17,7 +17,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear ...@@ -17,7 +17,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
xml.name commit.author_name xml.name commit.author_name
xml.email commit.author_email xml.email commit.author_email
end end
xml.summary commit.description xml.summary gfm(commit.description)
end end
end end
end end
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
%strong.cdark= commit.author_name %strong.cdark= commit.author_name
&ndash; &ndash;
= image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16
= truncate(commit.title, :length => 50) rescue "--broken encoding" = gfm truncate(commit.title, :length => 50), project_commit_path(project, :id => commit.id) rescue "--broken encoding"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
- else - else
= image_tag "no_avatar.png", :class => "avatar" = image_tag "no_avatar.png", :class => "avatar"
%p= link_to truncate(issue.title, :length => 100), project_issue_path(issue.project, issue), :class => "row_title" %p= link_to_gfm truncate(issue.title, :length => 100), project_issue_path(issue.project, issue), :class => "row_title"
%span.update-author %span.update-author
%small.cdark= "##{issue.id}" %small.cdark= "##{issue.id}"
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
.alert-message.error.status_info Closed .alert-message.error.status_info Closed
- else - else
.alert-message.success.status_info Open .alert-message.success.status_info Open
= @issue.title = gfm @issue.title
.middle_box_content .middle_box_content
%cite.cgray Created by %cite.cgray Created by
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
- if @issue.milestone - if @issue.milestone
- milestone = @issue.milestone - milestone = @issue.milestone
%cite.cgray and attached to milestone %cite.cgray and attached to milestone
%strong= link_to truncate(milestone.title, :length => 20), project_milestone_path(milestone.project, milestone) %strong= link_to_gfm truncate(milestone.title, :length => 20), project_milestone_path(milestone.project, milestone)
.right .right
- @issue.labels.each do |label| - @issue.labels.each do |label|
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
= merge_request.target_branch = merge_request.target_branch
= image_tag gravatar_icon(merge_request.author_email), :class => "avatar" = image_tag gravatar_icon(merge_request.author_email), :class => "avatar"
%p= link_to truncate(merge_request.title, :length => 80), project_merge_request_path(merge_request.project, merge_request), :class => "row_title" %p= link_to_gfm truncate(merge_request.title, :length => 80), project_merge_request_path(merge_request.project, merge_request), :class => "row_title"
%span.update-author %span.update-author
%small.cdark= "##{merge_request.id}" %small.cdark= "##{merge_request.id}"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.alert-message.error.status_info Closed .alert-message.error.status_info Closed
- else - else
.alert-message.success.status_info Open .alert-message.success.status_info Open
= @merge_request.title = gfm @merge_request.title
.middle_box_content .middle_box_content
%div %div
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- if can? current_user, :admin_milestone, milestone.project - if can? current_user, :admin_milestone, milestone.project
= link_to 'Edit', edit_project_milestone_path(milestone.project, milestone), :class => "btn small edit-milestone-link grouped" = link_to 'Edit', edit_project_milestone_path(milestone.project, milestone), :class => "btn small edit-milestone-link grouped"
%h4 %h4
= link_to truncate(milestone.title, :length => 100), project_milestone_path(milestone.project, milestone), :class => "row_title" = link_to_gfm truncate(milestone.title, :length => 100), project_milestone_path(milestone.project, milestone), :class => "row_title"
%small %small
= milestone.expires_at = milestone.expires_at
%br %br
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
.alert-message.error.status_info Closed .alert-message.error.status_info Closed
- else - else
.alert-message.success.status_info Open .alert-message.success.status_info Open
= @milestone.title = gfm @milestone.title
%small.right= @milestone.expires_at %small.right= @milestone.expires_at
.middle_box_content .middle_box_content
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
= link_to [@project, issue] do = link_to [@project, issue] do
%span.badge.badge-info ##{issue.id} %span.badge.badge-info ##{issue.id}
&ndash; &ndash;
= link_to truncate(issue.title, :length => 60), [@project, issue] = link_to_gfm truncate(issue.title, :length => 60), [@project, issue]
%br %br
= paginate @issues, :theme => "gitlab" = paginate @issues, :theme => "gitlab"
......
- if tm - if tm
%strong= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) %strong= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
= link_to truncate(content_commit.title, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link" = link_to_gfm truncate(content_commit.title, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link"
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
%td.blame_commit %td.blame_commit
&nbsp; &nbsp;
%code= link_to commit.short_id, project_commit_path(@project, :id => commit.id) %code= link_to commit.short_id, project_commit_path(@project, :id => commit.id)
= link_to truncate(commit.title, :length => 30), project_commit_path(@project, :id => commit.id), :class => "row_title" rescue "--broken encoding" = link_to_gfm truncate(commit.title, :length => 30), project_commit_path(@project, :id => commit.id), :class => "row_title" rescue "--broken encoding"
%td.lines %td.lines
= preserve do = preserve do
%pre %pre
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%code= commit.short_id %code= commit.short_id
= image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16
= truncate(commit.title, :length => 40) = gfm truncate(commit.title, :length => 40)
%td %td
%span.update-author.right %span.update-author.right
= time_ago_in_words(commit.committed_date) = time_ago_in_words(commit.committed_date)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= link_to project_commits_path(@project, commit.id) do = link_to project_commits_path(@project, commit.id) do
%code= commit.short_id %code= commit.short_id
= image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16
= truncate(commit.title, :length => 40) = gfm truncate(commit.title, :length => 40)
%td %td
%span.right.cgray %span.right.cgray
= time_ago_in_words(commit.committed_date) = time_ago_in_words(commit.committed_date)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
= link_to project_commit_path(@project, commit.id) do = link_to project_commit_path(@project, commit.id) do
%code= commit.short_id %code= commit.short_id
= image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16
= truncate(commit.title, :length => 40) = gfm truncate(commit.title, :length => 40)
%td %td
%span.update-author.right %span.update-author.right
= time_ago_in_words(commit.committed_date) = time_ago_in_words(commit.committed_date)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment