From 635d3e09b72232b6e92a38de6cc184147e5bcb41 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 19 Feb 2012 21:30:31 +0200 Subject: [PATCH] Issues, Merge Requests counters --- app/assets/stylesheets/common.scss | 28 +++++++++++++++++------ app/assets/stylesheets/top_panel.scss | 4 ---- app/views/commits/_commit.html.haml | 3 ++- app/views/layouts/_project_menu.html.haml | 5 +++- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 6fd03272..981327f3 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -101,15 +101,24 @@ nav.main_menu { border-radius: 4px; margin: auto; margin:30px $app_padding; - background:#f1f1f1; + background:#eee; border:1px solid #ccc; height:38px; - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f1f1f1), to(#dfdfdf)); - background-image: -webkit-linear-gradient(#f1f1f1 6.6%, #dfdfdf); - background-image: -moz-linear-gradient(#f1f1f1 6.6%, #dfdfdf); - background-image: -o-linear-gradient(#f1f1f1 6.6%, #dfdfdf); + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf)); + background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf); + background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf); + background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); + -moz-box-shadow: 0 0 3px #ddd; + -webkit-box-shadow: 0 0 3px #ddd; + box-shadow: 0 0 3px #ddd; + + + .count { + color:#bbb; + margin-left:3px; + } .label { background:$hover; @@ -131,12 +140,13 @@ nav.main_menu { padding: 10px 25px; display: inline-block; color: $style_color; - border-right: 1px solid #ccc; + border-right: 1px solid #d5d5d5; position: relative; box-shadow: 1px 0 0 rgba(255, 255, 255, 0.1); margin: 0; float:left; text-shadow:0 1px 1px white; + &.home { padding:7px 35px; @@ -281,7 +291,11 @@ img.lil_av { h5, .title { padding: 0 10px; background:#f5f5f5; - border-bottom: 1px solid #ccc; + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); + background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); + background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); + background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); + border-bottom: 1px solid #eee; @include round-borders-top(4px); border-top:none; diff --git a/app/assets/stylesheets/top_panel.scss b/app/assets/stylesheets/top_panel.scss index c4d4fb2e..b5f751b7 100644 --- a/app/assets/stylesheets/top_panel.scss +++ b/app/assets/stylesheets/top_panel.scss @@ -79,10 +79,6 @@ body header { font-weight:bold; color:#aaa; text-shadow: 0 1px 1px #FFF; - - &:hover { - color:$style_color; - } } img { diff --git a/app/views/commits/_commit.html.haml b/app/views/commits/_commit.html.haml index 747eddd6..1df31b3e 100644 --- a/app/views/commits/_commit.html.haml +++ b/app/views/commits/_commit.html.haml @@ -1,6 +1,6 @@ %li.wll.commit .right.span2 - = link_to "Browse Code", tree_project_ref_path(@project, commit.id), :class => "btn small right" + = link_to "Browse Code ยป", tree_project_ref_path(@project, commit.id), :class => "btn small right" = link_to project_commit_path(@project, :id => commit.id) do %p %code.left= commit.id.to_s[0..10] @@ -12,4 +12,5 @@ %span.right.cgray = time_ago_in_words(commit.committed_date) ago +   diff --git a/app/views/layouts/_project_menu.html.haml b/app/views/layouts/_project_menu.html.haml index c47a1863..06b16fdc 100644 --- a/app/views/layouts/_project_menu.html.haml +++ b/app/views/layouts/_project_menu.html.haml @@ -10,10 +10,13 @@ = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil - if @project.issues_enabled = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do - Issues + Issues + %span.count= @project.issues.opened.count + - if @project.merge_requests_enabled = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do Merge Requests + %span.count= @project.issues.opened.count - if @project.wall_enabled = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do