Commit 94d364e8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

UI fixes for commits lists

parent a30ce866
......@@ -469,7 +469,6 @@ li.commit {
}
.commit_short_id {
float: left;
min-width: 65px;
font-family: $monospace_font;
}
......@@ -494,4 +493,15 @@ li.commit {
@extend .cgray;
}
}
&.inline-commit {
.commit-row-title {
font-size: 13px;
}
.committed_ago {
float: right;
@extend .cgray;
}
}
}
......@@ -56,10 +56,6 @@
margin-left: 35px;
margin-right: 100px;
.commit p {
color: #666;
padding-top: 5px;
}
.event-info {
color: #666;
}
......@@ -107,13 +103,6 @@
}
}
ul {
.avatar {
width: 18px;
margin: 2px 4px;
}
}
&:last-child { border:none }
.event_commits {
......@@ -124,12 +113,14 @@
background: transparent;
padding: 3px;
border: none;
color: #666;
.commit-row-title {
font-size: 12px;
}
}
&.commits-stat {
display: block;
padding: 3px;
margin-top: 3px;
&:hover {
background: none;
......
......@@ -64,13 +64,6 @@
margin: 0;
padding: 0;
padding: 5px 0;
.avatar { position:relative }
.commit-author-name,
.dash,
.committed_ago,
.browse_code_link_holder {
display: none;
}
list-style: none;
&:hover {
background: none;
......
......@@ -56,8 +56,9 @@ module CommitsHelper
end
end
def commit_to_html commit, project
escape_javascript(render 'projects/commits/commit', commit: commit, project: project) unless commit.nil?
def commit_to_html(commit, project, inline = true)
template = inline ? "inline_commit" : "commit"
escape_javascript(render "projects/commits/#{template}", commit: commit, project: project) unless commit.nil?
end
def diff_line_content(line)
......
%li.commit
%p
.commit-row-title
= link_to commit[:id][0..8], project_commit_path(project, commit[:id]), class: "commit_short_id", alt: ''
%span= commit[:author][:name]
–
= image_tag gravatar_icon(commit[:author][:email]), class: "avatar", width: 16
= gfm escape_once(truncate(commit[:message], length: 50)) rescue "--broken encoding"
 
= gfm escape_once(truncate(commit[:message], length: 70)) rescue "--broken encoding"
%li.commit.inline-commit
.commit-row-title
= link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"
 
= link_to_gfm truncate(commit.title, length: 40), project_commit_path(project, commit.id), class: "commit-row-message"
%time.committed_ago{ datetime: commit.committed_date, title: commit.committed_date.stamp("Aug 21, 2011 9:23pm") }
= time_ago_in_words(commit.committed_date)
ago
 
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