summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-12 22:22:31 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-12 22:22:31 +0300
commit7300440a74fb476bad454a99d3a39e509d77e70f (patch)
tree0827cff602b7fc5e9677b15bc50544d55e408204
parent57b62c2b98bbebd1732c439fab2a3ff119ba5051 (diff)
downloadgitlab-ce-7300440a74fb476bad454a99d3a39e509d77e70f.tar.gz
Improve Commit#show page UI
-rw-r--r--app/assets/stylesheets/sections/commits.scss33
-rw-r--r--app/views/projects/commit/_commit_box.html.haml93
2 files changed, 71 insertions, 55 deletions
diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss
index fd3307dd923..faae0e127d9 100644
--- a/app/assets/stylesheets/sections/commits.scss
+++ b/app/assets/stylesheets/sections/commits.scss
@@ -440,17 +440,24 @@
margin-top: 10px;
}
-.ui-box.commit-box {
- margin-top: 0;
-
- .commit-committer-link,
- .commit-author-link {
- color: #333;
+.commit-box {
+ margin: 10px 0;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ padding: 20px 0;
+
+ .commit-title {
+ margin: 0;
+ font-size: 20px;
font-weight: bold;
- text-shadow: 0 1px 1px #FFF;
+ }
+
+ .commit-description {
+ margin-top: 15px;
}
}
+
.commit-stat-summary {
color: #666;
line-height: 2;
@@ -477,3 +484,15 @@ li.commit {
.commit-breadcrumb {
padding: 0;
}
+
+.commit-info-row {
+ margin-bottom: 10px;
+ .avatar {
+ @extend .avatar-inline;
+ }
+ .commit-committer-link,
+ .commit-author-link {
+ color: #444;
+ font-weight: bold;
+ }
+}
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml
index a592823a070..1f493452064 100644
--- a/app/views/projects/commit/_commit_box.html.haml
+++ b/app/views/projects/commit/_commit_box.html.haml
@@ -1,50 +1,47 @@
-.ui-box.ui-box-show.commit-box
- .ui-box-head
- .pull-right
- - if @notes_count > 0
- %span.btn.disabled.grouped
- %i.icon-comment
- = @notes_count
- .left.btn-group
- %a.btn.grouped.dropdown-toggle{ data: {toggle: :dropdown} }
- %i.icon-download-alt
- Download as
- %span.caret
- %ul.dropdown-menu
- %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch)
- %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff)
- = link_to project_tree_path(@project, @commit), class: "btn btn-primary grouped" do
- %span Browse Code »
- %h3.commit-title.page-title
- = gfm escape_once(@commit.title)
- - if @commit.description.present?
- %pre.commit-description
- = gfm escape_once(@commit.description)
- .ui-box-body
- .row
- .span5
- .author
- = commit_author_link(@commit, avatar: true, size: 32)
- authored
- %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")}
- #{time_ago_in_words(@commit.authored_date)} ago
- - if @commit.different_committer?
- .committer
- &rarr;
- = commit_committer_link(@commit)
- committed
- %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")}
- #{time_ago_in_words(@commit.committed_date)} ago
- .span6.pull-right
- .pull-right
- .sha-block
- %span.cgray commit
- %span.label_commit= @commit.id
- .clearfix
- .pull-right
- .sha-block
- %span.cgray= pluralize(@commit.parents.count, "parent")
- - @commit.parents.each do |parent|
- = link_to parent.id[0...10], project_commit_path(@project, parent)
+.pull-right
+ %div
+ - if @notes_count > 0
+ %span.btn.disabled.grouped
+ %i.icon-comment
+ = @notes_count
+ .pull-left.btn-group
+ %a.btn.grouped.dropdown-toggle{ data: {toggle: :dropdown} }
+ %i.icon-download-alt
+ Download as
+ %span.caret
+ %ul.dropdown-menu
+ %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch)
+ %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff)
+ = link_to project_tree_path(@project, @commit), class: "btn btn-primary grouped" do
+ %span Browse Code »
+ %div
+%p
+ %span.light Commit
+ = link_to @commit.id, project_commit_path(@project, @commit)
+.commit-info-row
+ %span.light Authored by
+ %strong
+ = commit_author_link(@commit, avatar: true, size: 24)
+ %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")}
+ #{time_ago_in_words(@commit.authored_date)} ago
+- if @commit.different_committer?
+ .commit-info-row
+ %span.light Committed by
+ %strong
+ = commit_committer_link(@commit, avatar: true, size: 24)
+ %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")}
+ #{time_ago_in_words(@commit.committed_date)} ago
+
+.commit-info-row
+ %span.cgray= pluralize(@commit.parents.count, "parent")
+ - @commit.parents.each do |parent|
+ = link_to parent.id[0...10], project_commit_path(@project, parent)
+
+.commit-box
+ %h3.commit-title
+ = gfm escape_once(@commit.title)
+ - if @commit.description.present?
+ %pre.commit-description
+ = gfm escape_once(@commit.description)