Adds lodging splash view

Check for venue photo before rendering
This commit is contained in:
Gopesh Tulsyan 2014-06-14 23:37:12 +05:30
parent 01bd45a045
commit 0b6b046016
4 changed files with 38 additions and 8 deletions

View file

@ -25,11 +25,12 @@
= link_to 'Visit Venue Website', @conference.venue.website, target: '_blank'
:javascript
$(document).ready(function(){
var photo = "#{@conference.venue.photo}";
if(photo)
{
$('#location').css('background-image', 'url('+photo+')');
}
});
- unless @conference.venue.photo.blank?
:javascript
$(document).ready(function(){
var photo = "#{@conference.venue.photo}";
if(photo)
{
$('#location').css('background-image', 'url('+photo+')');
}
});