From 88974b500f18a9de32f778e407c8d6909095443f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 7 Apr 2012 23:13:18 +0300 Subject: [PATCH] projects list on dashboard with commit links --- app/assets/stylesheets/common.scss | 28 ++++---- app/views/dashboard/_projects_feed.html.haml | 3 +- app/views/dashboard/index.html.haml | 72 +++++++++----------- 3 files changed, 49 insertions(+), 54 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index e1d2971b..89e82e7e 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -17,6 +17,11 @@ a { &.lined { text-decoration:underlined; } + + &.gray { + color:gray; + } + &.supp_diff_link { text-align:center; padding:20px 0; @@ -24,6 +29,10 @@ a { width:100%; float:left; } + + &.neib { + margin-right:15px; + } } .btn { @@ -46,10 +55,6 @@ a:focus { color: $link_color !important; } -.dlink { - -} - .pills a:hover { background-color:#ccc; } @@ -60,10 +65,6 @@ a:focus { .label { background-color: #474D57; - - &.pushed { - background-color: $link_color; - } } .pretty_label { @@ -873,26 +874,24 @@ p.time { } +/** + * Dashboard page + * + */ .dashboard_category { margin-bottom:30px; - h3 a { color:#474D57; - &:hover { text-decoration:underline; } } .dashboard_block { - width:840px; - margin:auto; - .dash_project_item { margin-bottom:10px; border:none; padding:0px 5px; - .project_link { color:#888; &:hover { @@ -902,7 +901,6 @@ p.time { } } } - h4 { color:#666; } diff --git a/app/views/dashboard/_projects_feed.html.haml b/app/views/dashboard/_projects_feed.html.haml index b41b1e5f..a5468fc6 100644 --- a/app/views/dashboard/_projects_feed.html.haml +++ b/app/views/dashboard/_projects_feed.html.haml @@ -10,4 +10,5 @@ .right %small - %strong= link_to "Browse Code »", tree_project_ref_path(project, project.root_ref), :class => "vlink" + %strong= link_to "Browse Code »", tree_project_ref_path(project, project.root_ref), :class => "neib gray" + %strong= link_to "Commits »", project_commits_path(project), :class => "gray" diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index a33a7d77..acef7c51 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -17,38 +17,37 @@ = link_to projects_path do Projects list → %hr - .row - .dashboard_block - .row - .span4.right - %div.lborder.ipadded - %h3 - = pluralize current_user.projects.count, "project", "projects" - - if current_user.can_create_project? - %hr - %div - You can create up to - = current_user.projects_limit - projects. Click on button below to add a new one - .link_holder - %br - = link_to new_project_path, :class => "btn" do - New Project » - - else - %hr - %div - You've reached project limit for your account. - You cannot create new projects. - .link_holder - %br - = link_to profile_path, :class => "btn" do - Your Profile » - .span10.left= render "dashboard/projects_feed", :projects => @active_projects - - if @last_push && @last_push.valid_push? - .padded.prepend-top-20 - %h5 - %small Latest push was to the #{@last_push.ref_name} #{@last_push.ref_type} of #{@last_push.project.name}: - %ul.unstyled= render @last_push + .dashboard_block + .row + .span4.right + %div.lborder.ipadded + %h3 + = pluralize current_user.projects.count, "project", "projects" + - if current_user.can_create_project? + %hr + %div + You can create up to + = current_user.projects_limit + projects. Click on button below to add a new one + .link_holder + %br + = link_to new_project_path, :class => "btn" do + New Project » + - else + %hr + %div + You've reached project limit for your account. + You cannot create new projects. + .link_holder + %br + = link_to profile_path, :class => "btn" do + Your Profile » + .span12.left= render "dashboard/projects_feed", :projects => @active_projects + - if @last_push && @last_push.valid_push? + .padded.prepend-top-20 + %h5 + %small Latest push was to the #{@last_push.ref_name} #{@last_push.ref_type} of #{@last_push.project.name}: + %ul.unstyled= render @last_push - if @merge_requests.any? %div.dashboard_category @@ -60,8 +59,7 @@ = link_to dashboard_merge_requests_path do Visit merge requests page → %hr - .row - .dashboard_block= render "dashboard/merge_requests_feed" + .dashboard_block= render "dashboard/merge_requests_feed" - if @issues.any? %div.dashboard_category @@ -72,8 +70,7 @@ = link_to dashboard_issues_path do Visit issues page → %hr - .row - .dashboard_block= render "dashboard/issues_feed" + .dashboard_block= render "dashboard/issues_feed" - if @events.any? %div.dashboard_category @@ -82,5 +79,4 @@ = link_to "Activities" , "#activities", :id => "activities" %hr - .row - .dashboard_block= render @events + .dashboard_block= render @events