osem-fcy/app/views/admin/conferences/index.html.haml
James Mason 516e53d9df Use chartkick globally
* Clean up legacy charting imports
* Update existing donut and line charts
* Create helpers for parsing out existing chart data
* Move chart partials to a more common path
2018-12-30 16:57:22 -08:00

54 lines
2 KiB
Text

.row
.col-sm-3.col-xs-3
= render "big_statistic",
icon: "user", subtitle: "User", value: @total_user, delta: @new_user
.col-sm-3.col-xs-3
= render "big_statistic",
icon: "check-square", subtitle: "Registration", value: @total_reg, delta: @new_reg
.col-sm-3.col-xs-3
= render "big_statistic",
icon: "file-text", subtitle: "Submission", value: @total_submissions, delta: @new_submissions
.col-sm-3.col-xs-3
= render "big_statistic",
icon: "archive", subtitle: "Withdrawn", value: @total_withdrawn, delta: @new_withdrawn, reverse: true
.row#registrations
.col-md-8
= render 'line_chart', title: 'Registrations per week', data: @registrations
.col-md-4
= render 'donut_chart', title: 'Events',
data: @event_distribution, colors: @event_distribution_colors
.row#submissions
.col-md-8
= render 'line_chart', title: 'Submissions per week', data: @submissions
.col-md-4
= render 'donut_chart', title: 'Users',
data: @user_distribution, colors: @user_distribution_colors
.row#tickets
.col-md-8
= render 'line_chart', title: 'Tickets sold per week', data: @tickets
%br
.row
.col-md-8
%ul.nav.nav-tabs#recentTable
%li.active
%a{ href: '#recent_user', 'data-toggle' => 'tab' }
%span.fa.fa-user
Recent Users
%li
%a{ href: '#recent_reg', 'data-toggle' => 'tab' }
%span.fa.fa-check-square
Recent Registrations
%li
%a{ href: '#recent_submissions', 'data-toggle' => 'tab' }
%span.fa.fa-file-text
Recent Submissions
.tab-content
.tab-pane.active#recent_user
= render partial: 'recent_users', locals: {recent_users: @recent_users}
.tab-pane#recent_reg
= render partial: 'recent_registrations', locals: {recent_registrations: @recent_registrations}
.tab-pane#recent_submissions
= render partial: 'recent_submissions', locals: {recent_events: @recent_events}
.col-md-4
= render partial: 'top_submitter', locals: {top_submitter: @top_submitter}