display all speakers in an event when highlighted
This commit is contained in:
parent
4c97dacf5c
commit
20ea622bd3
2 changed files with 12 additions and 12 deletions
|
|
@ -51,7 +51,7 @@ class Conference < ApplicationRecord
|
||||||
has_many :highlighted_events,
|
has_many :highlighted_events,
|
||||||
-> { where(state: :confirmed, is_highlight: true) },
|
-> { where(state: :confirmed, is_highlight: true) },
|
||||||
through: :program,
|
through: :program,
|
||||||
source: :events
|
source: :events
|
||||||
has_many :event_types, through: :program
|
has_many :event_types, through: :program
|
||||||
|
|
||||||
has_many :surveys, as: :surveyable, dependent: :destroy do
|
has_many :surveys, as: :surveyable, dependent: :destroy do
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@
|
||||||
.col-md-12
|
.col-md-12
|
||||||
.row.row-centered.shuffle-deck
|
.row.row-centered.shuffle-deck
|
||||||
- highlights.each do |event|
|
- highlights.each do |event|
|
||||||
- speaker = event.speakers_ordered.first
|
- event.speakers_ordered.each do |speaker|
|
||||||
.col-md-3.col-sm-3.col-centered.col-top.highlights
|
.col-md-3.col-sm-3.col-centered.col-top.highlights
|
||||||
= link_to(conference_program_proposal_path(conference_id,
|
= link_to(conference_program_proposal_path(conference_id,
|
||||||
event),
|
event),
|
||||||
class: 'thumbnail') do
|
class: 'thumbnail') do
|
||||||
= image_tag speaker.profile_picture(size: 300),
|
= image_tag speaker.profile_picture(size: 300),
|
||||||
class: ['img-responsive', 'img-circle'],
|
class: ['img-responsive', 'img-circle'],
|
||||||
title: speaker.name
|
title: speaker.name
|
||||||
.caption
|
.caption
|
||||||
%h3.text-center= speaker.name
|
%h3.text-center= speaker.name
|
||||||
%h4.text-center= event.title
|
%h4.text-center= event.title
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue