check for address or location name before output of the location div
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 19 May 2016 20:10:59 +0000 (16:10 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 19 May 2016 20:10:59 +0000 (16:10 -0400)
views/front/events/detail.html

index 3927c4d..4cd3775 100644 (file)
                                 {/if}
                             </div>
                             {if $event.hide_address.name == 'No'}
-                                <div id="glm-event-detail-location">
-                                {if !$event.use_member_location.value && $event.locations}
+                                {if !$event.use_member_location.value && ($event.locations.name || $event.locations.address)}
+                                    <div id="glm-event-detail-location">
                                     {if $event.locations.name}{$event.locations.name}<br>{/if}
                                     {if $event.locations.address}
                                         {$event.locations.address}<br>
                                         {$event.locations.city.name}, {$event.locations.state.value} {$event.locations.zip}
                                     {/if}
+                                    </div>
                                 {elseif $event.use_member_location.value}
+                                    <div id="glm-event-detail-location">
                                     {$event.member.member}<br>
                                     {$event.member.addr1}<br>
                                     {$event.member.city}, {$event.member.state.value} {$event.member.zip} 
+                                    </div>
                                 {/if}
-                                </div>
                             {/if}
                             {if $event.cost && !$event.free.value}
                             <div id="glm-event-detail-cost"><strong>Cost: </strong>{$event.cost}</div>