From 75333d7c60ae4997470e2b8c2b511ff6b6b9c063 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Tue, 17 Jun 2014 17:28:48 +0530 Subject: [PATCH] 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