Implements active user and submissions for global dashboard

This commit is contained in:
Chrisbr 2014-06-02 14:57:53 +02:00
parent 7573a19240
commit dd22ce3608
3 changed files with 24 additions and 8 deletions

View file

@ -62,8 +62,9 @@ body > #messages {
} }
.dashbox .icon { .dashbox .icon {
padding-left: 8px;
display: block; display: block;
font-size: 3.5em; font-size: 2.3em;
} }
.dashbox var { .dashbox var {
@ -72,6 +73,3 @@ body > #messages {
font-style: normal; font-style: normal;
} }
.dashbox label {
font-size: 1.2em;
}

View file

@ -6,6 +6,8 @@ class Admin::ConferenceController < ApplicationController
@new_user = User.where('created_at > ?', current_user.last_sign_in_at).count @new_user = User.where('created_at > ?', current_user.last_sign_in_at).count
@new_reg = Registration.where('created_at > ?', current_user.last_sign_in_at).count @new_reg = Registration.where('created_at > ?', current_user.last_sign_in_at).count
@total_reg = Registration.count @total_reg = Registration.count
@active_user = User.where('last_sign_in_at > ?', Date.today - 3.months).count
@submissions_count = Event.count
@conferences = Conference.select('id, short_title, color, start_date, @conferences = Conference.select('id, short_title, color, start_date,
registration_end_date, registration_start_date') registration_end_date, registration_start_date')

View file

@ -1,5 +1,5 @@
.row .row
.col-sm-3 .col-sm-2
.dashbox.well.well-sm.text-center .dashbox.well.well-sm.text-center
.icon .icon
%i.glyphicon.glyphicon-user %i.glyphicon.glyphicon-user
@ -7,7 +7,7 @@
%var %var
= @total_user = @total_user
%label.text-muted total user %label.text-muted total user
.col-sm-3 .col-sm-2
.dashbox.well.well-sm.text-center .dashbox.well.well-sm.text-center
.icon .icon
%i.glyphicon.glyphicon-thumbs-up %i.glyphicon.glyphicon-thumbs-up
@ -15,7 +15,15 @@
%var %var
= @new_user = @new_user
%label.text-muted new user %label.text-muted new user
.col-sm-3 .col-sm-2
.dashbox.well.well-sm.text-center
.icon
%i.glyphicon.glyphicon-heart-empty
.text
%var
= @active_user
%label.text-muted active user
.col-sm-2
.dashbox.well.well-sm.text-center .dashbox.well.well-sm.text-center
.icon .icon
%i.glyphicon.glyphicon-star %i.glyphicon.glyphicon-star
@ -23,7 +31,7 @@
%var %var
= @total_reg = @total_reg
%label.text-muted total registrations %label.text-muted total registrations
.col-sm-3 .col-sm-2
.dashbox.well.well-sm.text-center .dashbox.well.well-sm.text-center
.icon .icon
%i.glyphicon.glyphicon-usd %i.glyphicon.glyphicon-usd
@ -31,6 +39,14 @@
%var %var
= @new_reg = @new_reg
%label.text-muted new registrations %label.text-muted new registrations
.col-sm-2
.dashbox.well.well-sm.text-center
.icon
%i.glyphicon.glyphicon-comment
.text
%var
= @submissions_count
%label.text-muted submissions
.row .row
.col-md-12 .col-md-12
.well#submissions .well#submissions