[feat]Add include_happening_now checkbox to the admin splashpage

This commit is contained in:
Jimmy 2021-04-01 13:14:31 +08:00 committed by CactusPuppy
parent fd8652d768
commit 6fd3c88f76
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
4 changed files with 8 additions and 1 deletions

View file

@ -50,7 +50,7 @@ module Admin
:include_venue, :include_registrations,
:include_tickets, :include_lodgings,
:include_sponsors, :include_social_media,
:include_booths)
:include_booths, :include_happening_now)
end
end
end

View file

@ -44,6 +44,9 @@
%li
= f.input :include_social_media, label: 'Display social media links', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
%li
= f.input :include_happening_now, label: 'Display events happening now', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_happening_now) }
= f.inputs name: 'Access' do
%ul.fa-ul
%li

View file

@ -45,6 +45,9 @@
%li
%i{ class: "fa-li #{icon_for_todo @splashpage.include_social_media?}" }
Display social media links
%li
%i{ class: "fa-li #{icon_for_todo @splashpage.include_happening_now?}" }
Display events happening now
%li
- if @conference.splashpage && @conference.splashpage.public
%i{ class: "fa-li #{icon_for_todo @splashpage.public?}" }

View file

@ -45,6 +45,7 @@ FactoryBot.define do
include_sponsors { true }
include_lodgings { true }
include_cfp { true }
include_happening_now { true }
end
end
end