display current events based on track

This commit is contained in:
AnithaPal 2016-09-26 14:46:46 -04:00
parent e82a3e1727
commit 514a88e0be
10 changed files with 56 additions and 39 deletions

View file

@ -90,3 +90,20 @@ p.comment-body {
.changeset{ .changeset{
display: none; 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;
}
}
}

View file

@ -176,8 +176,8 @@ module Admin
def conference_info def conference_info
# To display sponsors in the conference wide information page # To display sponsors in the conference wide information page
@sponsors = @conference.sponsors @sponsors = @conference.sponsors
@current_event_schedules = @program.selected_schedule.event_schedules.current
@tweets = twitter_client.search_tweets(15, @conference.contact.social_tag) @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| respond_to do |format|
format.html{render layout: 'conference_info'} format.html{render layout: 'conference_info'}

View file

@ -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

View file

@ -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'

View file

@ -2,7 +2,7 @@
.row .row
.col-md-12.text-center .col-md-12.text-center
%h2 %h2
= "#" + @conference.contact.social_tag + " Tweets" = "##{@conference.contact.social_tag} Tweets"
%div#tweet-container %div#tweet-container
- @tweets.each do |tweet| - @tweets.each do |tweet|
%div#tweet %div#tweet
@ -11,4 +11,3 @@
= tweet.text = tweet.text
= link_to "— @" + tweet.user.name, "http://www.twitter.com/#{tweet.user.name}", target: "_blank" = link_to "— @" + tweet.user.name, "http://www.twitter.com/#{tweet.user.name}", target: "_blank"
= link_to tweet.url, tweet.url.to_s = link_to tweet.url, tweet.url.to_s

View 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

View 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'

View file

@ -54,13 +54,6 @@ production:
facebook_key: '' facebook_key: ''
facebook_secret: '' 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 # 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 # work. You must, however, add some sample value to the variables, for the
# login option to appear. For example: # login option to appear. For example: