Skip to content
Snippets Groups Projects
Commit eb06dd79 authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Update views for GFM

parent 20496491
No related branches found
No related tags found
1 merge request!1183Gitlab flavored markdown
Showing
with 19 additions and 18 deletions
Loading
Loading
@@ -90,6 +90,7 @@ class RefsController < ApplicationController
 
@repo = project.repo
@commit = project.commit(@ref)
@commit = CommitDecorator.decorate(@commit)
@tree = Tree.new(@commit.tree, project, @ref, params[:path])
@tree = TreeDecorator.new(@tree)
@hex_path = Digest::SHA1.hexdigest(params[:path] || "/")
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@
%strong.cgray= commit.author_name
&ndash;
= 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
= time_ago_in_words(commit.committed_date)
Loading
Loading
Loading
Loading
@@ -11,10 +11,10 @@
= link_to tree_project_ref_path(@project, @commit.id), :class => "browse-button primary grouped" do
%strong Browse Code »
%h3.commit-title.page_title
= commit_msg_with_link_to_issues(@project, @commit.title)
= gfm @commit.title
- if @commit.description.present?
%pre.commit-description
= commit_msg_with_link_to_issues(@project, @commit.description)
= gfm @commit.description
.commit-info
.row
.span4
Loading
Loading
Loading
Loading
@@ -17,7 +17,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
xml.name commit.author_name
xml.email commit.author_email
end
xml.summary commit.description
xml.summary gfm(commit.description)
end
end
end
Loading
Loading
@@ -5,5 +5,5 @@
%strong.cdark= commit.author_name
&ndash;
= 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"
 
Loading
Loading
@@ -24,7 +24,7 @@
- else
= 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
%small.cdark= "##{issue.id}"
Loading
Loading
Loading
Loading
@@ -31,7 +31,7 @@
.alert-message.error.status_info Closed
- else
.alert-message.success.status_info Open
= @issue.title
= gfm @issue.title
 
.middle_box_content
%cite.cgray Created by
Loading
Loading
@@ -46,7 +46,7 @@
- if @issue.milestone
- milestone = @issue.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
- @issue.labels.each do |label|
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@
= merge_request.target_branch
= 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
%small.cdark= "##{merge_request.id}"
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@
.alert-message.error.status_info Closed
- else
.alert-message.success.status_info Open
= @merge_request.title
= gfm @merge_request.title
 
.middle_box_content
%div
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@
- 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"
%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
= milestone.expires_at
%br
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@
.alert-message.error.status_info Closed
- else
.alert-message.success.status_info Open
= @milestone.title
= gfm @milestone.title
%small.right= @milestone.expires_at
 
.middle_box_content
Loading
Loading
@@ -51,7 +51,7 @@
= link_to [@project, issue] do
%span.badge.badge-info ##{issue.id}
&ndash;
= link_to truncate(issue.title, :length => 60), [@project, issue]
= link_to_gfm truncate(issue.title, :length => 60), [@project, issue]
%br
= paginate @issues, :theme => "gitlab"
 
Loading
Loading
- if 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"
Loading
Loading
@@ -33,7 +33,7 @@
%td.blame_commit
&nbsp;
%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
= preserve do
%pre
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@
%code= commit.short_id
 
= image_tag gravatar_icon(commit.author_email), :class => "", :width => 16
= truncate(commit.title, :length => 40)
= gfm truncate(commit.title, :length => 40)
%td
%span.update-author.right
= time_ago_in_words(commit.committed_date)
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@
= link_to project_commits_path(@project, commit.id) do
%code= commit.short_id
= image_tag gravatar_icon(commit.author_email), :class => "", :width => 16
= truncate(commit.title, :length => 40)
= gfm truncate(commit.title, :length => 40)
%td
%span.right.cgray
= time_ago_in_words(commit.committed_date)
Loading
Loading
Loading
Loading
@@ -17,7 +17,7 @@
= link_to project_commit_path(@project, commit.id) do
%code= commit.short_id
= image_tag gravatar_icon(commit.author_email), :class => "", :width => 16
= truncate(commit.title, :length => 40)
= gfm truncate(commit.title, :length => 40)
%td
%span.update-author.right
= time_ago_in_words(commit.committed_date)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment