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
|
@antiquated = @conferences - @current
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show; end
|
||||||
@keynote_speakers = @conference.keynote_speakers
|
|
||||||
end
|
|
||||||
|
|
||||||
def gallery_photos
|
def gallery_photos
|
||||||
@photos = @conference.photos
|
@photos = @conference.photos
|
||||||
|
|
|
||||||
|
|
@ -558,8 +558,8 @@ class Conference < ActiveRecord::Base
|
||||||
email_settings.updated_conference_registration_dates_template
|
email_settings.updated_conference_registration_dates_template
|
||||||
end
|
end
|
||||||
|
|
||||||
def keynote_speakers
|
def keynotes
|
||||||
User.with_role(:keynote_speaker, self)
|
events.where(state: 'confirmed').select { |e| e.event_type.title == 'Keynote'}
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
@ -902,6 +902,9 @@ class Conference < ActiveRecord::Base
|
||||||
event_types << EventType.create(title: 'Workshop', length: 60, color: '#0000FF',
|
event_types << EventType.create(title: 'Workshop', length: 60, color: '#0000FF',
|
||||||
minimum_abstract_length: 0,
|
minimum_abstract_length: 0,
|
||||||
maximum_abstract_length: 500)
|
maximum_abstract_length: 500)
|
||||||
|
event_types << EventType.create(title: 'Keynote', length: 60, color: '#00FF00',
|
||||||
|
minimum_abstract_length: 0,
|
||||||
|
maximum_abstract_length: 500)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
= event_type.length
|
= event_type.length
|
||||||
Minutes
|
Minutes
|
||||||
%td
|
%td
|
||||||
= "#{event_type.minimum_abstract_length}:#{event_type.maximum_abstract_length}"
|
= "#{event_type.minimum_abstract_length} - #{event_type.maximum_abstract_length}"
|
||||||
Words
|
Words
|
||||||
%td
|
%td
|
||||||
%span.label{style: "background-color: #{event_type.color};"}
|
%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
|
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
|
||||||
Full Schedule
|
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
|
%h3.text-center
|
||||||
Don't miss out!
|
Don't miss out!
|
||||||
|
%br
|
||||||
- if @conference.highlights.any?
|
- if @conference.highlights.any?
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue