From bea55454b21d0ecffe8cab676a4e1708d2e953a4 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Tue, 1 Jul 2014 23:54:39 +0530 Subject: [PATCH] Conditional rendering for gallery button in the splash --- app/views/conference/show.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index e4dbf6c9..1a0b1d63 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -17,8 +17,9 @@ .row-fluid .col-md-12.lead %p= @conference.description - = link_to 'Gallery', fetch_gallery_photos_conference_path(@conference.id), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true - = render 'gallery' + -unless @conference.photos.blank? + = link_to 'Gallery', fetch_gallery_photos_conference_path(@conference.id), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true + = render 'gallery' - if @conference.include_program_in_splash? %section{ id: 'program' } .pad