From f0c3fc357b5a46b73ab63e5914a3ced573b37dac Mon Sep 17 00:00:00 2001 From: James Mason Date: Tue, 21 Nov 2017 10:56:46 -0800 Subject: [PATCH] Fold call for papers & call for tracks into one splashpage section --- Gemfile.lock | 2 +- app/views/admin/splashpages/_form.html.haml | 2 +- app/views/admin/splashpages/show.html.haml | 2 +- app/views/conferences/_call_for_content.haml | 14 ++++ .../conferences/_call_for_paper.html.haml | 81 ++++++++----------- .../conferences/_call_for_tracks.html.haml | 47 +++++------ app/views/conferences/show.html.haml | 6 +- spec/features/versions_spec.rb | 2 +- 8 files changed, 73 insertions(+), 83 deletions(-) create mode 100644 app/views/conferences/_call_for_content.haml diff --git a/Gemfile.lock b/Gemfile.lock index 1645c8be..0f64b0e8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -293,7 +293,7 @@ GEM multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.4.9) + mysql2 (0.4.10) nenv (0.3.0) netrc (0.11.0) nio4r (2.1.0) diff --git a/app/views/admin/splashpages/_form.html.haml b/app/views/admin/splashpages/_form.html.haml index c1897745..96a1a300 100644 --- a/app/views/admin/splashpages/_form.html.haml +++ b/app/views/admin/splashpages/_form.html.haml @@ -8,7 +8,7 @@ = f.inputs name: 'Components' do = f.input :include_tracks, label: 'Display tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) } = f.input :include_program, label: 'Display program', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_program) } - = f.input :include_cfp, label: 'Display call for papers information on splashpage, while cfp is open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) } + = 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_venue, label: 'Display venue', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_venue) } = f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) } = f.input :include_tickets, label: 'Display tickets', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tickets) } diff --git a/app/views/admin/splashpages/show.html.haml b/app/views/admin/splashpages/show.html.haml index c185b119..8d799eda 100644 --- a/app/views/admin/splashpages/show.html.haml +++ b/app/views/admin/splashpages/show.html.haml @@ -25,7 +25,7 @@ - else No %dt - Include CFP: + Include Calls for Content: %dd - if @splashpage.include_cfp Yes diff --git a/app/views/conferences/_call_for_content.haml b/app/views/conferences/_call_for_content.haml new file mode 100644 index 00000000..7f8703c4 --- /dev/null +++ b/app/views/conferences/_call_for_content.haml @@ -0,0 +1,14 @@ += content_for :splash_nav do + %li + %a.smoothscroll{ href: '#call' } Call For Content + +%section#call + .container + .row + - if @conference.call_for_events.try(:open?) ^ @conference.call_for_tracks.try(:open?) + .col-md-3.col-sm-3.hidden-xs   + - if @conference.call_for_events.try(:open?) + = render 'call_for_paper' + .col-md-2.col-sm-2   + - if @conference.call_for_tracks.try(:open?) + = render 'call_for_tracks' diff --git a/app/views/conferences/_call_for_paper.html.haml b/app/views/conferences/_call_for_paper.html.haml index 9d8188fa..d173356c 100644 --- a/app/views/conferences/_call_for_paper.html.haml +++ b/app/views/conferences/_call_for_paper.html.haml @@ -1,48 +1,37 @@ -= content_for :splash_nav do - %li - %a.smoothscroll{ href: '#callforpapers' } Call For Papers - - cache [@conference, @conference.call_for_events, @conference.confirmed_tracks, '#splash#callforpapers'] do - %section#callforpapers - .container - .row - .col-md-12.text-center - %h2 - Call for Papers - %p.lead - We are ready to accept your proposals for sessions! - .row - .col-md-6.col-md-offset-3.col-sm-10.col-sm-offset-1 - %p - - if @conference.event_types.any? - You can submit proposals for - %span.notranslate - = "#{event_types(@conference)}." - - if @conference.confirmed_tracks.any? - Proposals should fit in one of the - %span.notranslate - = "#{pluralize(@conference.confirmed_tracks.length, 'track')}:" - = "#{tracks(@conference)}." - - if @conference.call_for_events.try(:open?) - The submission period is open - %em.notranslate - = "#{date_string(@conference.call_for_events.start_date, - @conference.call_for_events.end_date)}." - %b - You have - = pluralize(@conference.call_for_events.remaining_days, 'day') - left! - Remember - %span.notranslate - = @conference.title - will only be as good as the sessions you present. - Submit early, submit often! - - else - The submission period is closed. - .row - .col-md-12.text-center - %p.cta-button - = link_to "Submit your paper now", - conference_program_proposals_path(@conference.short_title), - class: 'btn btn-success btn-lg text-center' + .col-md-5.col-sm-5.text-center + %h2 + Call for Papers + %p.lead + We are ready to accept your proposals for sessions! + %p + - if @conference.event_types.any? + You can submit proposals for + %span.notranslate + = "#{event_types(@conference)}." + - if @conference.confirmed_tracks.any? + Proposals should fit in one of the + %span.notranslate + = "#{pluralize(@conference.confirmed_tracks.length, 'track')}:" + = "#{tracks(@conference)}." + - if @conference.call_for_events.try(:open?) + The submission period is open + %em.notranslate + = "#{date_string(@conference.call_for_events.start_date, + @conference.call_for_events.end_date)}." + %b + You have + = pluralize(@conference.call_for_events.remaining_days, 'day') + left! + Remember + %span.notranslate + = @conference.title + will only be as good as the sessions you present. + Submit early, submit often! + - else + The submission period is closed. + %p.cta-button + = link_to "Submit your paper now", + conference_program_proposals_path(@conference.short_title), + class: 'btn btn-success btn-lg text-center' diff --git a/app/views/conferences/_call_for_tracks.html.haml b/app/views/conferences/_call_for_tracks.html.haml index e627fca8..d1851a12 100644 --- a/app/views/conferences/_call_for_tracks.html.haml +++ b/app/views/conferences/_call_for_tracks.html.haml @@ -1,30 +1,19 @@ -= content_for :splash_nav do - %li - %a.smoothscroll{ href: '#callfortracks' } Call For Tracks - - cache [@conference, @conference.call_for_tracks, '#splash#callfortracks'] do - %section#callfortracks - .container - .row - .col-md-12.text-center - %h2 - Call for Tracks - %p.lead - We are ready to accept requests for tracks! - .row - .col-md-6.col-md-offset-3.col-sm-10.col-sm-offset-1 - %p - The submission period for track requests is open - %em.notranslate - = "#{date_string(@conference.call_for_tracks.start_date, - @conference.call_for_tracks.end_date)}." - %b - You have - = pluralize(@conference.call_for_tracks.remaining_days, 'day') - left! - .row - .col-md-12.text-center - %p.cta-button - = link_to("Submit your request for track", - conference_program_tracks_path(@conference.short_title), - class: 'btn btn-success btn-lg text-center') + .col-md-5.col-sm-5.text-center + %h2 + Call for Tracks + %p.lead + We are ready to accept requests for tracks! + %p + The submission period for track requests is open + %em.notranslate + = "#{date_string(@conference.call_for_tracks.start_date, + @conference.call_for_tracks.end_date)}." + %b + You have + = pluralize(@conference.call_for_tracks.remaining_days, 'day') + left! + %p.cta-button + = link_to("Submit your request for track", + conference_program_tracks_path(@conference.short_title), + class: 'btn btn-success btn-lg text-center') diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml index 95d82ca0..86254efd 100644 --- a/app/views/conferences/show.html.haml +++ b/app/views/conferences/show.html.haml @@ -21,10 +21,8 @@ = render 'tickets' // calls for content, or program - - if @conference.splashpage.include_cfp && @conference.call_for_events.try(:open?) - = render 'call_for_paper' - - if @conference.splashpage.include_cfp && @conference.call_for_tracks.try(:open?) - = render 'call_for_tracks' + - if @conference.splashpage.include_cfp + = render 'call_for_content' - if @conference.splashpage.include_program = render 'schedule_splashpage' diff --git a/spec/features/versions_spec.rb b/spec/features/versions_spec.rb index 37ad4e15..1451b907 100644 --- a/spec/features/versions_spec.rb +++ b/spec/features/versions_spec.rb @@ -237,7 +237,7 @@ feature 'Version' do click_link 'Edit' uncheck('Display program') - uncheck('Display call for papers information on splashpage, while cfp is open') + uncheck('Display call for papers and call for tracks information on splashpage, while open') uncheck('Display venue') uncheck('Display tickets') uncheck('Display the lodgings')