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