Add confirmed booths to splashpage
This commit is contained in:
parent
3f324d4e6f
commit
8b5ebb3dd7
10 changed files with 51 additions and 1 deletions
|
|
@ -118,6 +118,7 @@ linters:
|
||||||
- "app/views/conference_registrations/_registration_info.html.haml"
|
- "app/views/conference_registrations/_registration_info.html.haml"
|
||||||
- "app/views/conference_registrations/_volunteer.html.haml"
|
- "app/views/conference_registrations/_volunteer.html.haml"
|
||||||
- "app/views/conference_registrations/show.html.haml"
|
- "app/views/conference_registrations/show.html.haml"
|
||||||
|
- "app/views/conferences/_booths.html.haml"
|
||||||
- "app/views/conferences/_call_for_paper.html.haml"
|
- "app/views/conferences/_call_for_paper.html.haml"
|
||||||
- "app/views/conferences/_conference_details.html.haml"
|
- "app/views/conferences/_conference_details.html.haml"
|
||||||
- "app/views/conferences/_gallery.html.haml"
|
- "app/views/conferences/_gallery.html.haml"
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,8 @@ module Admin
|
||||||
:include_tracks, :include_program, :include_cfp,
|
:include_tracks, :include_program, :include_cfp,
|
||||||
:include_venue, :include_registrations,
|
:include_venue, :include_registrations,
|
||||||
:include_tickets, :include_lodgings,
|
:include_tickets, :include_lodgings,
|
||||||
:include_sponsors, :include_social_media)
|
:include_sponsors, :include_social_media,
|
||||||
|
:include_booths)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ class Booth < ActiveRecord::Base
|
||||||
:submitter_relationship,
|
:submitter_relationship,
|
||||||
presence: true
|
presence: true
|
||||||
|
|
||||||
|
scope :confirmed, -> { where(state: 'confirmed') }
|
||||||
|
|
||||||
mount_uploader :picture, PictureUploader, mount_on: :logo_link
|
mount_uploader :picture, PictureUploader, mount_on: :logo_link
|
||||||
|
|
||||||
state_machine initial: :new do
|
state_machine initial: :new do
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
= f.input :include_tickets, label: 'Display tickets', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tickets) }
|
= f.input :include_tickets, label: 'Display tickets', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tickets) }
|
||||||
= f.input :include_lodgings, label: 'Display the lodgings', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_lodgings) }
|
= f.input :include_lodgings, label: 'Display the lodgings', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_lodgings) }
|
||||||
= f.input :include_sponsors, label: 'Display sponsors', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_sponsors) }
|
= f.input :include_sponsors, label: 'Display sponsors', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_sponsors) }
|
||||||
|
= f.input :include_booths, label: 'Display confirmed booths', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
|
||||||
= f.input :include_social_media, label: 'Display social media', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
|
= f.input :include_social_media, label: 'Display social media', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
|
||||||
= f.inputs name: 'Access' do
|
= f.inputs name: 'Access' do
|
||||||
= f.input :public, label: 'Make splash page public?'
|
= f.input :public, label: 'Make splash page public?'
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,13 @@
|
||||||
Yes
|
Yes
|
||||||
- else
|
- else
|
||||||
No
|
No
|
||||||
|
%dt
|
||||||
|
Include Booths
|
||||||
|
%dd
|
||||||
|
- if @splashpage.include_booths
|
||||||
|
Yes
|
||||||
|
- else
|
||||||
|
No
|
||||||
%dt
|
%dt
|
||||||
Include Social Media:
|
Include Social Media:
|
||||||
%dd
|
%dd
|
||||||
|
|
|
||||||
24
app/views/conferences/_booths.html.haml
Normal file
24
app/views/conferences/_booths.html.haml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
= content_for :splash_nav do
|
||||||
|
%li
|
||||||
|
%a.smoothscroll{ href: '#booths' } Booths
|
||||||
|
|
||||||
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-12.text-center
|
||||||
|
%h2 Booths
|
||||||
|
- @conference.booths.confirmed.each_slice(3).with_index do |slice, index_for_row|
|
||||||
|
.row.row-centered
|
||||||
|
- slice.each.with_index do |booth, index_for_column|
|
||||||
|
.col-md-4.col-sm-4.col-xs-10.col-centered.col-top
|
||||||
|
.thumbnail
|
||||||
|
- if booth.logo_link
|
||||||
|
= link_to booth.website_url, class: 'thumbnail' do
|
||||||
|
= image_tag booth.picture.large.url
|
||||||
|
.caption
|
||||||
|
%h3.text-center
|
||||||
|
= booth.title
|
||||||
|
%p.text-center.text-muted
|
||||||
|
= link_to "#show_descrition_#{index_for_row}_#{index_for_column}", "data-toggle"=>"collapse" do
|
||||||
|
learn more
|
||||||
|
.collapse{ id: "show_descrition_#{index_for_row}_#{index_for_column}" }
|
||||||
|
= markdown(booth.description)
|
||||||
|
|
@ -38,6 +38,10 @@
|
||||||
= link_to "My Proposals", conference_program_proposals_path(conference.short_title), class: 'btn btn-default'
|
= link_to "My Proposals", conference_program_proposals_path(conference.short_title), class: 'btn btn-default'
|
||||||
- elsif can? :new, conference.program.events.new
|
- elsif can? :new, conference.program.events.new
|
||||||
= link_to "Submit Proposal", new_conference_program_proposal_path(conference.short_title), class: 'btn btn-default'
|
= link_to "Submit Proposal", new_conference_program_proposal_path(conference.short_title), class: 'btn btn-default'
|
||||||
|
- if current_user && current_user.booths.where(conference_id: conference.id).count > 0
|
||||||
|
= link_to 'My Booth Requests', conference_booths_path(conference.short_title), class: 'btn btn-default'
|
||||||
|
- elsif can? :new, conference.booths.new
|
||||||
|
= link_to 'Request Booth', new_conference_booth_path(conference.short_title), class: 'btn btn-default'
|
||||||
- if current_user.nil? || !current_user.subscribed?(conference)
|
- if current_user.nil? || !current_user.subscribed?(conference)
|
||||||
= link_to 'Subscribe', conference_subscriptions_path(conference.short_title), method: :post, class: 'btn btn-default'
|
= link_to 'Subscribe', conference_subscriptions_path(conference.short_title), method: :post, class: 'btn btn-default'
|
||||||
- else
|
- else
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,10 @@
|
||||||
%section#tickets
|
%section#tickets
|
||||||
= render 'tickets'
|
= render 'tickets'
|
||||||
|
|
||||||
|
- if @conference.booths.confirmed.any? and @conference.splashpage.include_booths
|
||||||
|
%section#booths
|
||||||
|
= render 'booths'
|
||||||
|
|
||||||
- if @conference.sponsors.any? and @conference.splashpage.include_sponsors
|
- if @conference.sponsors.any? and @conference.splashpage.include_sponsors
|
||||||
%section#sponsors
|
%section#sponsors
|
||||||
= render 'sponsors'
|
= render 'sponsors'
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddIncludeBoothsToSplashpages < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :splashpages, :include_booths, :boolean
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -451,6 +451,7 @@ ActiveRecord::Schema.define(version: 20170807092805) do
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.boolean "include_cfp", default: false
|
t.boolean "include_cfp", default: false
|
||||||
|
t.boolean "include_booths"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "sponsors", force: :cascade do |t|
|
create_table "sponsors", force: :cascade do |t|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue