Merge branch 'master' into rebased_1530
This commit is contained in:
commit
aebdd66034
12 changed files with 90 additions and 24 deletions
|
|
@ -90,6 +90,10 @@ module Admin
|
|||
update_state(:cancel, 'Booth is canceled')
|
||||
end
|
||||
|
||||
def confirm
|
||||
update_state(:confirm, 'Booth successfully confirmed')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def update_state(transition, notice)
|
||||
|
|
|
|||
|
|
@ -1,18 +1,29 @@
|
|||
class ConferencesController < ApplicationController
|
||||
protect_from_forgery with: :null_session
|
||||
before_action :respond_to_options
|
||||
load_and_authorize_resource find_by: :short_title
|
||||
load_resource :program, through: :conference, singleton: true, except: :index
|
||||
load_and_authorize_resource find_by: :short_title, except: :show
|
||||
|
||||
def index
|
||||
@current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc)
|
||||
@antiquated = @conferences - @current
|
||||
end
|
||||
|
||||
def show; end
|
||||
def show
|
||||
@conference = if params[:id]
|
||||
Conference.find_by_short_title(params[:id])
|
||||
else
|
||||
load_conference_by_domain
|
||||
end
|
||||
authorize! :show, @conference
|
||||
@program = @conference.program
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_conference_by_domain
|
||||
Conference.find_by(custom_domain: request.domain)
|
||||
end
|
||||
|
||||
def respond_to_options
|
||||
respond_to do |format|
|
||||
format.html { head :ok }
|
||||
|
|
|
|||
|
|
@ -42,3 +42,8 @@
|
|||
%li= link_to 'Cancel booth',
|
||||
cancel_admin_conference_booth_path(@conference.short_title, booth),
|
||||
method: :patch, id: "cancel_booth_#{booth.id}"
|
||||
|
||||
- if booth.transition_possible? :confirm
|
||||
%li= link_to 'Confirm booth',
|
||||
confirm_admin_conference_booth_path(@conference.short_title, booth),
|
||||
method: :patch, id: "confirm_booth_#{booth.id}"
|
||||
|
|
|
|||
|
|
@ -12,22 +12,26 @@
|
|||
= @conference.venue.city
|
||||
%p.lead
|
||||
We recommend these affordable lodging accommodations for your visit.
|
||||
- @conference.lodgings.each_slice(3) do |slice|
|
||||
.row.row-centered
|
||||
- slice.each do |lodging|
|
||||
.col-md-4.col-sm-4.ticket.col-centered.col-top
|
||||
.thumbnail
|
||||
- unless lodging.picture?
|
||||
%p.text-center
|
||||
%i.fa.fa-home.fa-5x
|
||||
|
||||
.row.row-centered{ style:"display: flex; flex-wrap: wrap" }
|
||||
- @conference.lodgings.each do |lodging|
|
||||
.col-md-4.col-sm-4.col-centered.col-top{ style:"display:flex;" }
|
||||
.thumbnail
|
||||
- if lodging.picture?
|
||||
-if lodging.website_link.present?
|
||||
= link_to(lodging.website_link, class: 'thumbnail') do
|
||||
= image_tag lodging.picture.large.url, class: 'img-responsive img-lodging'
|
||||
- else
|
||||
= image_tag lodging.picture.large.url, class: 'img-responsive img-lodging'
|
||||
- else
|
||||
%p.text-center
|
||||
-if lodging.website_link.present?
|
||||
= link_to(lodging.website_link, class: 'thumbnail') do
|
||||
= image_tag lodging.picture.large.url, class: 'img-responsive img-lodging'
|
||||
%i.fa.fa-home.fa-5x
|
||||
- else
|
||||
= image_tag lodging.picture.large.url, class: 'img-responsive img-lodging'
|
||||
.caption
|
||||
%h3.text-center
|
||||
= lodging.name
|
||||
-if lodging.description.present?
|
||||
= markdown(lodging.description)
|
||||
%i.fa.fa-home.fa-5x
|
||||
.caption
|
||||
%h3.text-center
|
||||
= lodging.name
|
||||
-if lodging.description.present?
|
||||
= markdown(lodging.description)
|
||||
|
|
|
|||
|
|
@ -116,7 +116,11 @@
|
|||
- if can? :update, @conference.tickets.build
|
||||
%li{class: active_nav_li(admin_conference_tickets_path(@conference.short_title)) }
|
||||
= link_to 'Tickets', admin_conference_tickets_path(@conference.short_title)
|
||||
|
||||
- if can? :manage, @conference.booths.build
|
||||
%li
|
||||
= link_to admin_conference_booths_path(@conference.short_title) do
|
||||
%span.fa.fa-shopping-bag
|
||||
Booths
|
||||
- if (can? :manage, @conference.targets.build) || (can? :manage, @conference.campaigns.build)
|
||||
%li
|
||||
%a
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@
|
|||
= link_to(conference_program_tracks_path(@conference.short_title)) do
|
||||
%span.fa.fa-road
|
||||
My Tracks
|
||||
-if @conference && @conference.program && (@conference.program.cfps.for_booths.try(:open?) || current_user.booths.where(conference_id: @conference.id).count > 0)
|
||||
%li
|
||||
= link_to (conference_booths_path(@conference.short_title)) do
|
||||
%span.fa.fa-shopping-bag
|
||||
My Booth Requests
|
||||
%li
|
||||
- if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||
= link_to(destroy_user_ichain_session_path, method: 'delete') do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue