From fe7bef3a537aa4c613cc2e4b40d6b94496427268 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 18 Jul 2013 11:49:40 +0300 Subject: [PATCH] squash commit summary in one sentence --- app/assets/stylesheets/common.scss | 17 ---------------- .../stylesheets/gitlab_bootstrap/blocks.scss | 1 - app/assets/stylesheets/sections/commits.scss | 23 ++++++++++++++++++++++ app/views/projects/commit/show.html.haml | 8 -------- app/views/projects/commits/_diffs.html.haml | 11 +++++++++-- 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 20c772d8e..abbd68710 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -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%; diff --git a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss b/app/assets/stylesheets/gitlab_bootstrap/blocks.scss index c5bbb9b73..053c275c3 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/blocks.scss @@ -62,7 +62,6 @@ .ui-box-body { border: none; - font-size: 12px; background-color: #f5f5f5; border: none; border-top: 1px solid #eee; diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss index dd96e6fd6..50544535c 100644 --- a/app/assets/stylesheets/sections/commits.scss +++ b/app/assets/stylesheets/sections/commits.scss @@ -441,3 +441,26 @@ .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; + } + } +} diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index 603406202..38c98d81b 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -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" diff --git a/app/views/projects/commits/_diffs.html.haml b/app/views/projects/commits/_diffs.html.haml index 8e3cbff8f..a60bf7517 100644 --- a/app/views/projects/commits/_diffs.html.haml +++ b/app/views/projects/commits/_diffs.html.haml @@ -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 -- 2.11.0