osem-fcy/app/views/admin/conferences/show.html.haml
2018-09-27 15:42:08 +02:00

130 lines
5.8 KiB
Text

= javascript_include_tag 'Chart'
%h1
%span.fa.fa-tachometer
Dashboard for #{@conference.title}
%hr
.row
.col-sm-3.col-xs-3
= render "shared/big_statistic",
icon: "user", subtitle: "Registration", value: @total_reg, delta: @new_reg
.col-sm-3.col-xs-3
= render "shared/big_statistic",
icon: "check-square", subtitle: "Submission", value: @total_submissions, delta: @new_submissions
.col-sm-3.col-xs-3
= render "shared/big_statistic",
icon: "file-text", subtitle: "Hour", value: @program_length, delta: @new_program_length
.col-sm-3.col-xs-3
= render "shared/big_statistic",
icon: "archive", subtitle: "Withdrawn", value: @total_withdrawn, delta: @new_withdrawn
.row
.col-md-12
.row
.col-md-8
.row#registrations
.col-md-12
= render partial: 'line_chart', locals: { title: 'Registrations over time',
name: 'registrations',
conferences: [@conference],
active_conferences: [@conference],
deactive_conferences: [],
y: @registrations,
x: @registration_weeks,
unit: 'weeks' }
.row#submissions
.col-md-12
= render partial: 'line_chart', locals: { title: 'Submissions over time',
name: 'submissions',
conferences: @submissions,
active_conferences: @submissions,
deactive_conferences: [],
y: @submissions_data,
x: @cfp_weeks,
unit: 'weeks' }
.col-md-4
= render partial: 'todo_list', locals: { conference_progress: @conference_progress,
conference: @conference }
.row#tickets
.col-md-8
= render partial: 'line_chart', locals: { title: 'Tickets sold over time',
name: 'tickets',
conferences: @tickets,
active_conferences: @tickets,
deactive_conferences: [],
y: @tickets_data,
x: @ticket_weeks,
unit: 'weeks' }
%br
.row
.col-md-12#doughnut
%ul.nav.nav-tabs#doughnut_tabs
%li.active
%a{ href: '#distribution_all', 'data-toggle' => 'tab' }
%span.fa.fa-star
All
%li
%a{ href: '#distribution_confirmed', 'data-toggle' => 'tab' }
%span.fa.fa-comment
Confirmed
%li
%a{ href: '#distribution_withdrawn', 'data-toggle' => 'tab' }
%span.fa.fa-archive
Withdrawn
.tab-content
.tab-pane.active#distribution_all
.row
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Event types', data: @event_type_distribution}
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Difficulty levels', data: @difficulty_levels_distribution}
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Tracks', data: @tracks_distribution}
.tab-pane#distribution_confirmed
.row
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Event types', data: @event_type_distribution_confirmed}
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Difficulty levels', data: @difficulty_levels_distribution_confirmed}
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Tracks', data: @tracks_distribution_confirmed}
.tab-pane#distribution_withdrawn
.row
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Event types', data: @event_type_distribution_withdrawn}
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Difficulty levels', data: @difficulty_levels_distribution_withdrawn}
.col-md-4
= render partial: 'doughnut_chart', locals: {title: 'Tracks', data: @tracks_distribution_withdrawn}
.row
.col-md-8
%ul.nav.nav-tabs#recentTable
%li{ 'class' => "active #{hidden_if_conference_over(@conference)}" }
%a{ href: '#recent_reg', 'data-toggle' => 'tab' }
%span.fa.fa-user
Recent Registrations
%li{ 'class' => "#{hidden_if_conference_over(@conference)}" }
%a{ href: '#recent_submissions', 'data-toggle' => 'tab' }
%span.fa.fa-file-text
Recent Submissions
.tab-content
.tab-pane.active#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}
.row
.col-md-12
%h3
%span
%i.fa.fa-flag
Campaigns
= render partial: 'campaigns', locals: {campaigns: @campaigns, name: 'campaigns'}
:javascript
$('#recentTable a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})