OSDN Git Service

squash commit summary in one sentence
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Thu, 18 Jul 2013 08:49:40 +0000 (11:49 +0300)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Thu, 18 Jul 2013 08:49:40 +0000 (11:49 +0300)
app/assets/stylesheets/common.scss
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
app/assets/stylesheets/sections/commits.scss
app/views/projects/commit/show.html.haml
app/views/projects/commits/_diffs.html.haml

index 20c772d..abbd687 100644 (file)
@@ -142,23 +142,6 @@ input[type=text] {
   }
 }
 
-li.commit {
-  .avatar {
-    width: 24px;
-    top:-5px;
-    margin-right: 10px;
-    margin-left: 10px;
-  }
-
-  code {
-    padding: 2px 2px 0;
-    margin-top: -2px;
-    &:hover {
-      color: black;
-      border: 1px solid #ccc;
-    }
-  }
-}
 p.time {
   color: #999;
   font-size: 90%;
index c5bbb9b..053c275 100644 (file)
@@ -62,7 +62,6 @@
 
   .ui-box-body {
     border: none;
-    font-size: 12px;
     background-color: #f5f5f5;
     border: none;
     border-top: 1px solid #eee;
index dd96e6f..5054453 100644 (file)
 .ui-box.commit-box {
   margin-top: 0;
 }
+
+.commit-stat-summary {
+  color: #666;
+  line-height: 2;
+}
+
+li.commit {
+  .avatar {
+    width: 24px;
+    top:-5px;
+    margin-right: 5px;
+    margin-left: 10px;
+  }
+
+  code {
+    padding: 2px 2px 0;
+    margin-top: -2px;
+    &:hover {
+      color: black;
+      border: 1px solid #ccc;
+    }
+  }
+}
index 6034062..38c98d8 100644 (file)
@@ -1,11 +1,3 @@
 = render "commit_box"
-
-- unless @commit.has_zero_stats?
-  %p.pull-right.cgray
-    This commit has
-    %span.cgreen #{@commit.stats.additions} additions
-    and
-    %span.cred #{@commit.stats.deletions} deletions
-
 = render "projects/commits/diffs", diffs: @commit.diffs
 = render "projects/notes/notes_with_form"
index 8e3cbff..a60bf75 100644 (file)
@@ -7,8 +7,15 @@
       But if you still want to see diff
       = link_to "click this link", project_commit_path(@project, @commit, force_show_diff: true), class: "underlined_link"
 
-%p.cgray
-  Showing #{pluralize(diffs.count, "changed file")}
+%p.commit-stat-summary
+  Showing
+  %strong.cdark #{pluralize(diffs.count, "changed file")}
+  - if current_controller?(:commit)
+    - unless @commit.has_zero_stats?
+      with
+      %strong.cgreen #{@commit.stats.additions} additions
+      and
+      %strong.cred #{@commit.stats.deletions} deletions
 .file-stats
   = render "projects/commits/diff_head", diffs: diffs