FIXUP: Reorder splashpage & align form

* Per PR comments, place program above registration/tickets
* Reorder splashpage admin form based on splashpage order
This commit is contained in:
James Mason 2017-11-29 09:15:42 -08:00
parent 245a312c1b
commit 5fb09f398a
3 changed files with 90 additions and 110 deletions

View file

@ -2,21 +2,46 @@
.col-md-12 .col-md-12
.page-header .page-header
%h1 Splashpage %h1 Splashpage
.row
.col-md-8
= semantic_form_for(@splashpage, url: admin_conference_splashpage_path(@conference.short_title)) do |f| = semantic_form_for(@splashpage, url: admin_conference_splashpage_path(@conference.short_title)) do |f|
.row
.col-md-12
= f.inputs name: 'Components' do = f.inputs name: 'Components' do
= f.input :include_tracks, label: 'Display tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) } %ul.fa-ul
= f.input :include_program, label: 'Display program', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_program) } %li
= f.input :include_cfp, label: 'Display call for papers and call for tracks information on splashpage, while open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) } = f.input :include_cfp, label: 'Display call for papers and call for tracks, while open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) }
= f.input :include_venue, label: 'Display venue', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_venue) } %li
= f.input :include_program, label: 'Display the program', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_program) }
%ul.fa-ul
%li
= f.input :include_tracks, label: 'Include confirmed tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) }
%li
= f.input :include_booths, label: 'Include confirmed booths', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
%li
= f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) } = f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) }
%li
= 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) }
%li
= f.input :include_venue, label: 'Display the venue', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_venue) }
%li
= 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) }
%li
= 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) } %li
= f.input :include_social_media, label: 'Display social media links', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
= f.inputs name: 'Access' do = f.inputs name: 'Access' do
%ul.fa-ul
%li
= f.input :public, label: 'Make splash page public?' = f.input :public, label: 'Make splash page public?'
.row
.col-md-12
%p.text-right %p.text-right
= f.submit 'Save Splashpage', class: 'btn btn-primary' = f.submit 'Save Changes', class: 'btn btn-primary'

View file

@ -8,85 +8,40 @@
with all the information for your conference with all the information for your conference
- if @splashpage - if @splashpage
.row .row
.col-md-8 .col-md-12
%dl.dl-horizontal %ul.fa-ul
%dt %li
Include Tracks: %i{ class: "fa-li #{icon_for_todo @splashpage.include_cfp?}" }
%dd Display call for papers and call for tracks, while open
- if @splashpage.include_tracks %li
Yes %i{ class: "fa-li #{icon_for_todo @splashpage.include_program?}" }
- else Display the program
No %ul.fa-ul
%dt %li
Include Program: %i{ class: "fa-li #{icon_for_todo @splashpage.include_program?}" }
%dd Include confirmed tracks
- if @splashpage.include_program %li
Yes %i{ class: "fa-li #{icon_for_todo @splashpage.include_booths?}" }
- else Include confirmed booths
No %li
%dt %i{ class: "fa-li #{icon_for_todo @splashpage.include_registrations?}" }
Include Calls for Content: Display the registration period
%dd %li
- if @splashpage.include_cfp %i{ class: "fa-li #{icon_for_todo @splashpage.include_tickets?}" }
Yes Display tickets
- else %li
No %i{ class: "fa-li #{icon_for_todo @splashpage.include_venue?}" }
%dt Display the venue
Include Venue: %li
%dd %i{ class: "fa-li #{icon_for_todo @splashpage.include_lodgings?}" }
-if @splashpage.include_venue Display the lodgings
Yes %li
-else %i{ class: "fa-li #{icon_for_todo @splashpage.include_sponsors?}" }
No Display sponsors
%dt %li
Include Registrations: %i{ class: "fa-li #{icon_for_todo @splashpage.include_social_media?}" }
%dd Display social media links
- if @splashpage.include_registrations
Yes
- else
No
%dt
Include Tickets:
%dd
- if @splashpage.include_tickets
Yes
- else
No
%dt
Include Lodgins
%dd
-if @splashpage.include_lodgings
Yes
-else
No
%dt
Include Sponsors:
%dd
- if @splashpage.include_sponsors
Yes
- else
No
%dt
Include Booths
%dd
- if @splashpage.include_booths
Yes
- else
No
%dt
Include Social Media:
%dd
- if @splashpage.include_social_media
Yes
- else
No
%dt
Public
%dd
- if @splashpage.public
Yes
- else
No
.row .row
.col-md-12 .col-md-12
- if can? :update, @splashpage - if can? :update, @splashpage

View file

@ -11,33 +11,33 @@
= @conference.title = @conference.title
#splash #splash
// header/description -# header/description
= render 'header', conference: @conference = render 'header', conference: @conference
// attendance/registration -# calls for content, or program
- if @conference.splashpage.include_cfp
= render 'call_for_content', conference: @conference
- if @conference.splashpage.include_program
= render 'program', conference: @conference
-# attendance/registration
- if @conference.splashpage.include_registrations - if @conference.splashpage.include_registrations
- if @conference.registration_open? - if @conference.registration_open?
= render 'registration', conference: @conference = render 'registration', conference: @conference
- if @conference.splashpage.include_tickets && @conference.tickets.any? - if @conference.splashpage.include_tickets && @conference.tickets.any?
= render 'tickets', conference: @conference = render 'tickets', conference: @conference
// calls for content, or program -# geo
- if @conference.splashpage.include_cfp
= render 'call_for_content', conference: @conference
- if @conference.splashpage.include_program
= render 'program', conference: @conference
// geo
- if @conference.splashpage.include_venue && @conference.venue - if @conference.splashpage.include_venue && @conference.venue
= render 'venue', conference: @conference = render 'venue', conference: @conference
- if @conference.splashpage.include_lodgings && @conference.lodgings.any? - if @conference.splashpage.include_lodgings && @conference.lodgings.any?
= render 'lodging', conference: @conference = render 'lodging', conference: @conference
// sponsorship -# sponsorship
- if @conference.splashpage.include_sponsors - if @conference.splashpage.include_sponsors
= render 'sponsors', conference: @conference = render 'sponsors', conference: @conference
// footer -# footer
- if @conference.splashpage.include_social_media - if @conference.splashpage.include_social_media
- if @conference.contact.has_social_media? - if @conference.contact.has_social_media?
= render 'social_media', conference: @conference = render 'social_media', conference: @conference