Splaspage: Add highlights. Fix cfp inclusion.

This commit is contained in:
Stella Rouzi 2014-11-27 20:40:26 +02:00
parent 0768514d89
commit 88f73bb6fc
4 changed files with 24 additions and 20 deletions

View file

@ -566,6 +566,18 @@ class Conference < ActiveRecord::Base
email_settings.updated_conference_registration_dates_template
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
after_create do

View file

@ -24,31 +24,13 @@
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
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
Don't miss out!
%br
- if @conference.events.highlights.any?
- if @conference.highlights.any?
.row
.col-md-12
- @conference.events.highlights.each_slice(2) do |slice|
- @conference.highlights.each_slice(2) do |slice|
.row.row-centered
- slice.each do |event|
.col-md-6.col-centered.col-top.highlights

View file

@ -0,0 +1,5 @@
class RemoveColumnIncludeCfpInSplashFromCfp < ActiveRecord::Migration
def change
remove_column :call_for_papers, :include_cfp_in_splash, :boolean, default: false
end
end

View file

@ -0,0 +1,5 @@
class AddIncludeCfpInSplashpages < ActiveRecord::Migration
def change
add_column :splashpages, :include_cfp, :boolean, default: false
end
end