From 75333d7c60ae4997470e2b8c2b511ff6b6b9c063 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Tue, 17 Jun 2014 17:28:48 +0530 Subject: [PATCH 1/2] Tracks aligned based on count --- app/views/conference/_tracks.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/conference/_tracks.html.haml b/app/views/conference/_tracks.html.haml index 45cf6aa0..e2b07f89 100644 --- a/app/views/conference/_tracks.html.haml +++ b/app/views/conference/_tracks.html.haml @@ -1,9 +1,9 @@ -%div.row +%div.row.text-center %div.col-md-12 %h2 Tracks - @conference.tracks.each do |t| - %div.col-md-4 - %h4 + %div{ class: (@conference.tracks.count.to_i <= 2 ? "col-md-#{12/@conference.tracks.count.to_i}" : "col-md-4") } + %h4 = t.name %p - = t.description \ No newline at end of file + = t.description From 41920d9a3a578b23122d64f664f3730293ba5986 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Tue, 17 Jun 2014 19:28:09 +0530 Subject: [PATCH 2/2] Fix program rendering partial --- app/views/conference/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index 5245006c..fbf4f76a 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -3,7 +3,7 @@ - unless @conference.description.blank? %p= @conference.description - %section{ id: 'program' } +%section{ id: 'program' } .pad = render 'program'