From bb7be246f6928368d0bdadfb7a3258d610d48252 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 8 Mar 2015 17:30:01 -0700 Subject: [PATCH 1/2] Show active users(non-blocked) on admin dashboard --- app/views/admin/dashboard/index.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 931b0c5c10..34e4e33626 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -32,9 +32,9 @@ %span.light.pull-right = Milestone.count %p - Users who signed in during last 30 days + Users %span.light.pull-right - = User.where("current_sign_in_at > ?", 30.days.ago).count + = User.count .col-md-4 %h4 Features @@ -91,10 +91,10 @@ = link_to('New Project', new_project_path, class: "btn btn-new") .col-sm-4 .light-well - %h4 Users + %h4 Active Users .data = link_to admin_users_path do - %h1= User.count + %h1= User.active.count %hr = link_to 'New User', new_admin_user_path, class: "btn btn-new" .col-sm-4 From bb9560a35a7860e6de44c51b6d2300f3ee1e27ae Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 8 Mar 2015 20:45:03 -0700 Subject: [PATCH 2/2] Show total user count on dashboard page --- app/views/admin/dashboard/index.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 34e4e33626..d1c586328a 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -32,9 +32,9 @@ %span.light.pull-right = Milestone.count %p - Users + Active Users %span.light.pull-right - = User.count + = User.active.count .col-md-4 %h4 Features @@ -91,10 +91,10 @@ = link_to('New Project', new_project_path, class: "btn btn-new") .col-sm-4 .light-well - %h4 Active Users + %h4 Users .data = link_to admin_users_path do - %h1= User.active.count + %h1= User.count %hr = link_to 'New User', new_admin_user_path, class: "btn btn-new" .col-sm-4