Merge branch 'master' into develop
This commit is contained in:
commit
20385ff1e4
31 changed files with 369 additions and 52 deletions
|
|
@ -20,6 +20,10 @@ module Admin
|
|||
@total_submissions = Event.count
|
||||
@new_submissions = Event.where('created_at > ?', current_user.last_sign_in_at).count
|
||||
|
||||
@total_withdrawn = Event.where(state: :withdrawn).count
|
||||
@new_withdrawn = Event
|
||||
.where('state = ? and created_at > ?', 'withdrawn', current_user.last_sign_in_at).count
|
||||
|
||||
@active_conferences = Conference.get_active_conferences_for_dashboard # pending or the last two
|
||||
@deactive_conferences = Conference
|
||||
.get_conferences_without_active_for_dashboard(@active_conferences) # conferences without active
|
||||
|
|
@ -116,13 +120,19 @@ module Admin
|
|||
@total_reg = @conference.registrations.count
|
||||
@new_reg = @conference.registrations.where('created_at > ?', current_user.last_sign_in_at).count
|
||||
|
||||
@total_submissions = @program.events.count
|
||||
@new_submissions = @program.events
|
||||
@all_events = @program.events
|
||||
|
||||
@total_submissions = @all_events.count
|
||||
@new_submissions = @all_events
|
||||
.where('created_at > ?', current_user.last_sign_in_at).count
|
||||
|
||||
@program_length = @conference.current_program_hours
|
||||
@new_program_length = @conference.new_program_hours(current_user.last_sign_in_at)
|
||||
|
||||
@total_withdrawn = @all_events.where(state: :withdrawn).count
|
||||
@new_withdrawn = @all_events
|
||||
.where('state = "withdrawn" and created_at > ?', current_user.last_sign_in_at).count
|
||||
|
||||
# Step by step list
|
||||
@conference_progress = @conference.get_status
|
||||
|
||||
|
|
@ -162,13 +172,17 @@ module Admin
|
|||
# Doughnut charts
|
||||
@event_type_distribution = @conference.event_type_distribution
|
||||
@event_type_distribution_confirmed = @conference.event_type_distribution(:confirmed)
|
||||
@event_type_distribution_withdrawn = @conference.event_type_distribution(:withdrawn)
|
||||
|
||||
@difficulty_levels_distribution = @conference.difficulty_levels_distribution
|
||||
@difficulty_levels_distribution_confirmed = @conference
|
||||
.difficulty_levels_distribution(:confirmed)
|
||||
@difficulty_levels_distribution_withdrawn = @conference
|
||||
.difficulty_levels_distribution(:withdrawn)
|
||||
|
||||
@tracks_distribution = @conference.tracks_distribution
|
||||
@tracks_distribution_confirmed = @conference.tracks_distribution(:confirmed)
|
||||
@tracks_distribution_withdrawn = @conference.tracks_distribution(:withdrawn)
|
||||
|
||||
# Recent actions information
|
||||
@recent_events = @conference.program.events.limit(5).order(created_at: :desc)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ class ConferencesController < ApplicationController
|
|||
authorize! :show, @conference # TODO: reduce the 10 queries performed here
|
||||
|
||||
splashpage = @conference.splashpage
|
||||
|
||||
unless splashpage.present?
|
||||
redirect_to admin_conference_splashpage_path(@conference.short_title) && return
|
||||
end
|
||||
|
||||
if splashpage.include_cfp
|
||||
cfps = @conference.program.cfps
|
||||
@call_for_events = cfps.find { |call| call.cfp_type == 'events' }
|
||||
|
|
@ -50,6 +55,7 @@ class ConferencesController < ApplicationController
|
|||
@sponsorship_levels = @conference.sponsorship_levels.eager_load(
|
||||
:sponsors
|
||||
).order('sponsorship_levels.position ASC', 'sponsors.name')
|
||||
@sponsors = @conference.sponsors
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class PhysicalTicketsController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
@file_name = "ticket_for_#{@conference.short_title}"
|
||||
@file_name = "ticket_for_#{@conference.short_title}.pdf"
|
||||
@user = @physical_ticket.user
|
||||
@ticket_layout = @conference.ticket_layout.to_sym
|
||||
@qrcode_image = RQRCode::QRCode.new(@physical_ticket.token).as_png(size: 180, border_modules: 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue