Splaspage: Add highlights. Fix cfp inclusion.
This commit is contained in:
parent
0768514d89
commit
88f73bb6fc
4 changed files with 24 additions and 20 deletions
|
|
@ -566,6 +566,18 @@ class Conference < ActiveRecord::Base
|
||||||
email_settings.updated_conference_registration_dates_template
|
email_settings.updated_conference_registration_dates_template
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def keynote_speakers
|
||||||
|
User.with_role(:keynote_speaker, self)
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
#
|
||||||
|
# ====Returns
|
||||||
|
# * +Array+ -> Events with attribute 'is_highlight'
|
||||||
|
def highlights
|
||||||
|
events.where(is_highlight: true)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
after_create do
|
after_create do
|
||||||
|
|
|
||||||
|
|
@ -24,31 +24,13 @@
|
||||||
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
|
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
|
||||||
Full Schedule
|
Full Schedule
|
||||||
|
|
||||||
- if @conference.events.keynotes.any?
|
|
||||||
.row
|
|
||||||
.col-md12
|
|
||||||
%h3.text-center
|
|
||||||
Keynote Talks!
|
|
||||||
.row
|
|
||||||
.col-md-12
|
|
||||||
- @conference.events.keynotes.each_slice(3) do |slice|
|
|
||||||
.row.row-centered
|
|
||||||
- slice.each do |event|
|
|
||||||
.col-md-6.col-centered
|
|
||||||
.thumbnail
|
|
||||||
%p.text-center
|
|
||||||
%b= event.title
|
|
||||||
%h5.text-center
|
|
||||||
= simple_format truncate(event.abstract, length: 500, separator: ' ')
|
|
||||||
= link_to "Read More", conference_proposal_path(@conference.short_title, event)
|
|
||||||
|
|
||||||
%h3.text-center
|
%h3.text-center
|
||||||
Don't miss out!
|
Don't miss out!
|
||||||
%br
|
- if @conference.highlights.any?
|
||||||
- if @conference.events.highlights.any?
|
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
- @conference.events.highlights.each_slice(2) do |slice|
|
- @conference.highlights.each_slice(2) do |slice|
|
||||||
.row.row-centered
|
.row.row-centered
|
||||||
- slice.each do |event|
|
- slice.each do |event|
|
||||||
.col-md-6.col-centered.col-top.highlights
|
.col-md-6.col-centered.col-top.highlights
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveColumnIncludeCfpInSplashFromCfp < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
remove_column :call_for_papers, :include_cfp_in_splash, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddIncludeCfpInSplashpages < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :splashpages, :include_cfp, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue