Agenda_new view adjust event card size if no image
authorLaury GvR <laury@gaslightmedia.com>
Mon, 1 Apr 2019 21:46:11 +0000 (17:46 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 1 Apr 2019 21:46:11 +0000 (17:46 -0400)
Event cards in the new agenda view would always get a large-8 class
applied to its info, to accommodate the large-4 taken up by an
image, even if that event has no image. Now a check is performed
to determine whether to display that image's area or not.

views/front/events/agenda_new.html

index 8f2b942..3c05997 100644 (file)
@@ -57,8 +57,7 @@
                                 {$showTime = true}
 
                                 <div class="glma-row glm-event-day-event{if $settings.sort_by_featured_in_agenda && $event.featured.value} glm-event-featured{/if}" data-url="{$siteBaseUrl}{$pageSlug}/{if !$customPage}{$event.name_slug}/{else}?eventId={$event.id}{/if}">
-                                    <div class="glma-small-12 glma-large-8 glma-columns">
-
+                                    <div class="glma-small-12 {if $event.image}glma-large-8 {/if}glma-columns">
                                         <a class="glm-link" href="{$siteBaseUrl}{$pageSlug}/{if !$customPage}{$event.name_slug}/{else}?eventId={$event.id}{/if}">
                                             <h2 class="agenda-event-name">{$event.name}</h2>
                                         </a>
 
                                         </div>
                                     </div>
+                                    {if $event.image}
                                     <div class="glma-small-12 glma-large-4 glma-columns glm-events-agenda-image">
-                                        {if $event.image}<img class="" style="float:none;" src="{$imgUrl}{$event.image}">{/if}
+                                        <img class="" style="float:none;" src="{$imgUrl}{$event.image}">
                                     </div>
+                                    {/if}
                                 </div>
                             {/foreach}
                         {/foreach}