solution for no image or url present

master
Tezza 2015-02-26 23:38:33 +01:00
parent 18482de154
commit e2cc91cb53
2 changed files with 13 additions and 4 deletions

View File

@ -134,9 +134,12 @@
$event[ 'name' ] = $googleEvent[ 'summary' ];
if ( array_key_exists( 'location' , $googleEvent ) ){
$event[ 'location' ] = $googleEvent[ 'location' ];
$event[ 'location' ] = $googleEvent[ 'location' ];
}
$event[ 'image' ] = false;
$event[ 'url' ] = false;
if ( array_key_exists( 'description' , $googleEvent ) ){
$event[ 'description' ] = $googleEvent[ 'description' ];

View File

@ -17,9 +17,15 @@
<div class="row event well">
<div class="col-sm-4 meta hidden-xs">
{% if event.image is defined %}
{% if event.image %}
<div class="img">
<img src="{{ event.image }}" />
{% if event.url %}
<a href="{{ event.url }}">
<img src="{{ event.image }}" />
</a>
{% else %}
<img src="{{ event.image }}" />
{% endif %}
</div>
{% else %}
<img src="{{ level2.logo }}" />
@ -31,7 +37,7 @@
</div>
<div class="col-sm-8 description">
<h2>
{% if event.url is defined %}
{% if event.url %}
<a href="{{ event.url }}">
{{ event.name }}
</a>