Merge branch 'master' into recaptcha

This commit is contained in:
James Mason 2017-11-08 09:33:03 -08:00 committed by GitHub
commit ce4e993fe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 669 additions and 42 deletions

View file

@ -3,7 +3,24 @@ module Admin
load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource through: :conference
def index; end
def index
@file_name = "booths_for_#{@conference.short_title}"
@booth_export_option = params[:booth_export_option]
respond_to do |format|
format.html
# Explicity call #to_json to avoid the use of EventSerializer
format.json { render json: Booth.where(state: :confirmed, program: @program).to_json }
format.xlsx do
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.xlsx\""
render 'booths'
end
format.pdf { render 'booths' }
format.csv do
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.csv\""
render 'booths'
end
end
end
def show; end

View file

@ -7,7 +7,25 @@ module Admin
# Show flash message with ajax calls
after_action :prepare_unobtrusive_flash, only: :toggle_cfp_inclusion
def index; end
def index
@file_name = "tracks_for_#{@conference.short_title}"
@track_export_option = params[:track_export_option]
respond_to do |format|
format.html
# Explicity call #to_json to avoid the use of EventSerializer
format.json { render json: Track.where(state: :confirmed, program: @program).to_json }
format.xlsx do
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.xlsx\""
render 'tracks'
end
format.pdf { render 'tracks' }
format.csv do
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.csv\""
render 'tracks'
end
end
end
def show
respond_to do |format|

View file

@ -4,4 +4,10 @@ class OrganizationsController < ApplicationController
def index
@organizations = Organization.all
end
def conferences
@current = @organization.conferences.upcoming.reorder(start_date: :asc)
@antiquated = @organization.conferences.past
render '/conferences/index'
end
end