mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Keynote Speakers implemented
This commit is contained in:
parent
1106f4e227
commit
67ea900dc3
4 changed files with 22 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
|||
class ConferenceController < ApplicationController
|
||||
load_and_authorize_resource find_by: :short_title
|
||||
|
||||
def show; end
|
||||
def show
|
||||
@keynote_speakers = @conference.keynote_speakers
|
||||
end
|
||||
|
||||
def subscribe
|
||||
conference = Conference.find_by_short_title(params[:id])
|
||||
|
|
|
|||
|
|
@ -556,6 +556,10 @@ class Conference < ActiveRecord::Base
|
|||
email_settings.updated_conference_registration_dates_template
|
||||
end
|
||||
|
||||
def keynote_speakers
|
||||
User.with_role(:keynote_speaker, self)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
after_create do
|
||||
|
|
|
|||
11
app/views/conference/_keynote_speakers.html.haml
Normal file
11
app/views/conference/_keynote_speakers.html.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
%div.row.text-center
|
||||
%div.col-md-12
|
||||
%h3 Keynote Speakers
|
||||
- @keynote_speakers.each do |k|
|
||||
%div{ class: (@keynote_speakers.count.to_i <= 2 ? "col-md-#{12/@keynote_speakers.count.to_i}" : "col-md-4") }
|
||||
= image_tag(k.gravatar_url(size: '80'), class: 'img-circle') unless k.gravatar_url.blank?
|
||||
%h4
|
||||
= k.name
|
||||
-unless k.biography.blank?
|
||||
%p
|
||||
= k.biography
|
||||
|
|
@ -12,6 +12,10 @@
|
|||
= link_to 'Schedule', conference_schedule_path(@conference.short_title), target: '_blank'
|
||||
- else
|
||||
%span The schedule is not ready yet. Stay tuned!
|
||||
|
||||
- unless @keynote_speakers.blank?
|
||||
= render 'keynote_speakers'
|
||||
|
||||
-unless @conference.tracks.blank?
|
||||
- if @conference.splashpage.include_tracks
|
||||
= render 'tracks'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue