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 {
padding-left: 8px;
display: block;
font-size: 3.5em;
font-size: 2.3em;
}
.dashbox var {
@ -72,6 +73,3 @@ body > #messages {
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_reg = Registration.where('created_at > ?', current_user.last_sign_in_at).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,
registration_end_date, registration_start_date')

View file

@ -1,5 +1,5 @@
.row
.col-sm-3
.col-sm-2
.dashbox.well.well-sm.text-center
.icon
%i.glyphicon.glyphicon-user
@ -7,7 +7,7 @@
%var
= @total_user
%label.text-muted total user
.col-sm-3
.col-sm-2
.dashbox.well.well-sm.text-center
.icon
%i.glyphicon.glyphicon-thumbs-up
@ -15,7 +15,15 @@
%var
= @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
.icon
%i.glyphicon.glyphicon-star
@ -23,7 +31,7 @@
%var
= @total_reg
%label.text-muted total registrations
.col-sm-3
.col-sm-2
.dashbox.well.well-sm.text-center
.icon
%i.glyphicon.glyphicon-usd
@ -31,6 +39,14 @@
%var
= @new_reg
%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
.col-md-12
.well#submissions