display current events based on track
This commit is contained in:
parent
e82a3e1727
commit
514a88e0be
10 changed files with 56 additions and 39 deletions
|
|
@ -90,3 +90,20 @@ p.comment-body {
|
|||
.changeset{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#conference-header{
|
||||
margin: auto;
|
||||
width: 304px;
|
||||
.conference-heading{
|
||||
float: left;
|
||||
width: 150px;
|
||||
}
|
||||
.conference-logo{
|
||||
float: left;
|
||||
width: 150px;
|
||||
img{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,8 +176,8 @@ module Admin
|
|||
def conference_info
|
||||
# To display sponsors in the conference wide information page
|
||||
@sponsors = @conference.sponsors
|
||||
@current_event_schedules = @program.selected_schedule.event_schedules.current
|
||||
@tweets = twitter_client.search_tweets(15, @conference.contact.social_tag)
|
||||
@current_event_schedules = @program.selected_schedule.event_schedules.current.group_by{|es| es.event.track.name}
|
||||
|
||||
respond_to do |format|
|
||||
format.html{render layout: 'conference_info'}
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
%h2 Current Events
|
||||
- @current_event_schedules.each do |es|
|
||||
%div
|
||||
%h3
|
||||
= es.event.title
|
||||
%h4
|
||||
presented by
|
||||
= es.event.speaker_names
|
||||
in
|
||||
= es.event.room.name
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
- if @conference.present?
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
%h1
|
||||
= @conference.title
|
||||
- if @conference.description.present?
|
||||
%h3
|
||||
= @conference.description
|
||||
- if @current_event_schedules.present?
|
||||
.row#current-events
|
||||
= render 'current_events'
|
||||
- if @conference.contact.social_tag.present? && @tweets.any?
|
||||
.row#conference-tweets
|
||||
= render 'conference_tweets'
|
||||
- if @sponsors.any?
|
||||
= render 'sponsors'
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
.row
|
||||
.col-md-12.text-center
|
||||
%h2
|
||||
= "#" + @conference.contact.social_tag + " Tweets"
|
||||
= "##{@conference.contact.social_tag} Tweets"
|
||||
%div#tweet-container
|
||||
- @tweets.each do |tweet|
|
||||
%div#tweet
|
||||
|
|
@ -11,4 +11,3 @@
|
|||
= tweet.text
|
||||
= link_to "— @" + tweet.user.name, "http://www.twitter.com/#{tweet.user.name}", target: "_blank"
|
||||
= link_to tweet.url, tweet.url.to_s
|
||||
|
||||
14
app/views/admin/conferences/_current_events.html.haml
Normal file
14
app/views/admin/conferences/_current_events.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.container
|
||||
.row.row-centered
|
||||
- @current_event_schedules.each do |track, event_schedules|
|
||||
.col-md-4.col-sm-4.col-centered
|
||||
%h2.text-center
|
||||
= track
|
||||
- event_schedules.each do |event_schedule|
|
||||
%h3.text-center
|
||||
= event_schedule.event.title
|
||||
%h4.text-center
|
||||
presented by
|
||||
= event_schedule.event.speaker_names
|
||||
in
|
||||
= event_schedule.event.room.name
|
||||
23
app/views/admin/conferences/conference_info.html.haml
Normal file
23
app/views/admin/conferences/conference_info.html.haml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
.container
|
||||
- if @conference.present?
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
%div#conference-header
|
||||
%div.conference-logo
|
||||
= image_tag(@conference.picture_url, class: 'img-responsive') if @conference.picture?
|
||||
%div.conference-heading
|
||||
%h1
|
||||
= @conference.title
|
||||
%span
|
||||
= @conference.short_title
|
||||
- if @conference.description.present?
|
||||
%h3
|
||||
= @conference.description
|
||||
- if @current_event_schedules.present?
|
||||
.row#current-events
|
||||
= render 'current_events'
|
||||
- if @conference.contact.social_tag.present? && @tweets.any?
|
||||
.row#conference-tweets
|
||||
= render 'conference_tweets'
|
||||
- if @sponsors.any?
|
||||
= render 'sponsors'
|
||||
|
|
@ -54,13 +54,6 @@ production:
|
|||
facebook_key: ''
|
||||
facebook_secret: ''
|
||||
|
||||
# Register your application with Twitter from
|
||||
# https://apps.twitter.com/
|
||||
twitter_consumer_key: ''
|
||||
twitter_consumer_secret: ''
|
||||
twitter_access_token: ''
|
||||
twitter_access_token_secret: ''
|
||||
|
||||
# Developers do not need to register their application for suse account to
|
||||
# work. You must, however, add some sample value to the variables, for the
|
||||
# login option to appear. For example:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue