Registrations dashbox eliminated from registrations

This commit is contained in:
Ana 2016-06-20 16:02:05 +02:00
parent 62c3ee1631
commit 1d7f3207a6
5 changed files with 205 additions and 209 deletions

View file

@ -57,3 +57,7 @@
display: inline-block; display: inline-block;
padding: 0px 10px 0px 0px; padding: 0px 10px 0px 0px;
} }
.margin-event-table{
margin-top: 40px !important;
}

View file

@ -10,7 +10,6 @@ module Admin
@registrations = @conference.registrations.includes(:user).order('registrations.created_at ASC') @registrations = @conference.registrations.includes(:user).order('registrations.created_at ASC')
@attended = @conference.registrations.where('attended = ?', true).count @attended = @conference.registrations.where('attended = ?', true).count
@new_reg = @conference.registrations.where('created_at > ?', current_user.last_sign_in_at).count
@registration_distribution = @conference.registration_distribution @registration_distribution = @conference.registration_distribution
@affiliation_distribution = @conference.affiliation_distribution @affiliation_distribution = @conference.affiliation_distribution
end end

View file

@ -14,8 +14,9 @@
= render partial: 'admin/conference/doughnut_chart', locals: {title: 'Confirmed events scheduled', data: @scheduled_event_distribution} = render partial: 'admin/conference/doughnut_chart', locals: {title: 'Confirmed events scheduled', data: @scheduled_event_distribution}
.col-md-4 .col-md-4
= render partial: 'admin/conference/doughnut_chart', locals: {title: 'Tracks of confirmed events', data: @tracks_distribution_confirmed} = render partial: 'admin/conference/doughnut_chart', locals: {title: 'Tracks of confirmed events', data: @tracks_distribution_confirmed}
.row{ style: "margin-top: 40px;"} .row
.col-md-12 .col-md-12
%div.margin-event-table
%table.table.table-striped.table-bordered.table-hover.datatable %table.table.table-striped.table-bordered.table-hover.datatable
%thead %thead
%th %th

View file

@ -11,19 +11,6 @@
= link_to 'Export XLS', {format: :xlsx}, class: 'btn btn-success' = link_to 'Export XLS', {format: :xlsx}, class: 'btn btn-success'
%p.text-muted %p.text-muted
All the people who registered to your event All the people who registered to your event
.row
.col-sm-4.col-xs-4
.dashbox.text-center
%span.fa.fa-user.fa-lg
%span.fa.fa-lg
= @registrations.length
%p
%small
#{'Registration'.pluralize(@registrations.length)}
- if @new_reg
%span.label.label-success{title: "+#{@new_reg} since you last logged in!"}
+
= @new_reg
.col-md-4 .col-md-4
= render partial: 'admin/conference/doughnut_chart', locals: {title: 'Affiliation', data: @affiliation_distribution} = render partial: 'admin/conference/doughnut_chart', locals: {title: 'Affiliation', data: @affiliation_distribution}
- unless @conference.pending? - unless @conference.pending?
@ -31,6 +18,7 @@
= render partial: 'admin/conference/doughnut_chart', locals: {title: 'Attended registrations', data: @registration_distribution} = render partial: 'admin/conference/doughnut_chart', locals: {title: 'Attended registrations', data: @registration_distribution}
.row .row
.col-md-12 .col-md-12
%div.margin-event-table
%table.table.table-hover.datatable#registrations %table.table.table-hover.datatable#registrations
%thead %thead
%tr %tr

View file

@ -352,6 +352,10 @@ ActiveRecord::Schema.define(version: 20160427104236) do
t.boolean "include_registrations" t.boolean "include_registrations"
t.boolean "include_sponsors" t.boolean "include_sponsors"
t.boolean "include_lodgings" t.boolean "include_lodgings"
t.string "banner_photo_file_name"
t.string "banner_photo_content_type"
t.integer "banner_photo_file_size"
t.datetime "banner_photo_updated_at"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.boolean "include_cfp", default: false t.boolean "include_cfp", default: false