add event_type keynote
This commit is contained in:
parent
ed8a71e554
commit
2511a7dd51
4 changed files with 25 additions and 7 deletions
|
|
@ -7,9 +7,7 @@ class ConferenceController < ApplicationController
|
|||
@antiquated = @conferences - @current
|
||||
end
|
||||
|
||||
def show
|
||||
@keynote_speakers = @conference.keynote_speakers
|
||||
end
|
||||
def show; end
|
||||
|
||||
def gallery_photos
|
||||
@photos = @conference.photos
|
||||
|
|
|
|||
|
|
@ -558,8 +558,8 @@ class Conference < ActiveRecord::Base
|
|||
email_settings.updated_conference_registration_dates_template
|
||||
end
|
||||
|
||||
def keynote_speakers
|
||||
User.with_role(:keynote_speaker, self)
|
||||
def keynotes
|
||||
events.where(state: 'confirmed').select { |e| e.event_type.title == 'Keynote'}
|
||||
end
|
||||
|
||||
##
|
||||
|
|
@ -902,6 +902,9 @@ class Conference < ActiveRecord::Base
|
|||
event_types << EventType.create(title: 'Workshop', length: 60, color: '#0000FF',
|
||||
minimum_abstract_length: 0,
|
||||
maximum_abstract_length: 500)
|
||||
event_types << EventType.create(title: 'Keynote', length: 60, color: '#00FF00',
|
||||
minimum_abstract_length: 0,
|
||||
maximum_abstract_length: 500)
|
||||
true
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
= event_type.length
|
||||
Minutes
|
||||
%td
|
||||
= "#{event_type.minimum_abstract_length}:#{event_type.maximum_abstract_length}"
|
||||
= "#{event_type.minimum_abstract_length} - #{event_type.maximum_abstract_length}"
|
||||
Words
|
||||
%td
|
||||
%span.label{style: "background-color: #{event_type.color};"}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,27 @@
|
|||
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
|
||||
Full Schedule
|
||||
|
||||
- #FIXME: Display keynotes https://github.com/openSUSE/osem/issues/544
|
||||
- if @conference.keynotes.any?
|
||||
.row
|
||||
.col-md12
|
||||
%h3.text-center
|
||||
Keynote Talks!
|
||||
.row
|
||||
.col-md-12
|
||||
- @conference.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.highlights.any?
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue