diff --git a/app/assets/stylesheets/osem.css b/app/assets/stylesheets/osem.css index 08c9f1a7..611173fb 100644 --- a/app/assets/stylesheets/osem.css +++ b/app/assets/stylesheets/osem.css @@ -55,3 +55,25 @@ body > #messages { display: inline-block; padding: 0px 10px 0px 0px; } + +.dashbox { + text-align: center; + padding-top: 20px; + padding-bottom: 20px; +} + +.dashbox .icon { + display: block; + font-size: 3.5em; + text-align: center; +} + +.dashbox var { + display: block; + font-size: 2em; + font-style: normal; +} + +.dashbox label { + font-size: 1.2em; +} diff --git a/app/controllers/admin/conference_controller.rb b/app/controllers/admin/conference_controller.rb index 4d10bf18..30999e98 100644 --- a/app/controllers/admin/conference_controller.rb +++ b/app/controllers/admin/conference_controller.rb @@ -2,6 +2,12 @@ class Admin::ConferenceController < ApplicationController before_filter :verify_organizer def index + last_sign_in = current_user.last_sign_in_at + @total_user = User.count + @new_user = User.where('created_at > ?', last_sign_in).count + @new_reg = Registration.where('created_at > ?', last_sign_in).count + @total_reg = Registration.count + @conferences = Conference.select('id, short_title, color, start_date, registration_end_date, registration_start_date') diff --git a/app/views/admin/conference/index.html.haml b/app/views/admin/conference/index.html.haml index 33a05411..33b721cd 100644 --- a/app/views/admin/conference/index.html.haml +++ b/app/views/admin/conference/index.html.haml @@ -1,3 +1,36 @@ +.row + .col-sm-3 + .dashbox.well.well-sm + .icon + %i.glyphicon.glyphicon-user + .text + %var + = @total_user + %label.text-muted total user + .col-sm-3 + .dashbox.well.well-sm + .icon + %i.glyphicon.glyphicon-thumbs-up + .text + %var + = @new_user + %label.text-muted new user + .col-sm-3 + .dashbox.well.well-sm + .icon + %i.glyphicon.glyphicon-star + .text + %var + = @total_reg + %label.text-muted total registrations + .col-sm-3 + .dashbox.well.well-sm + .icon + %i.glyphicon.glyphicon-usd + .text + %var + = @new_reg + %label.text-muted new registrations .row .col-md-12 .well#submissions