only showing icons if the event has the relevant information in the reg detail page
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 27 Dec 2017 14:25:55 +0000 (09:25 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 27 Dec 2017 14:25:55 +0000 (09:25 -0500)
icons were showing up even if there was no data next to the event info

views/front/registrations/registration.html

index edac800..5cf315a 100644 (file)
             <h1 id="glm-reg-event-name"><%= event_name %></h1>
             <div class="row">
                 {/literal}
-<!--                 <pre>{$regEvent|@print_r}</pre>-->
                 {if $regEvent.image}
                 <div class="small-12 medium-6 large-7 columns glm-reg-image-container">
                     <img src="{$imgBaseUrl}/medium/{$regEvent.image}"/>
                 </div>
                 {/if}
                 <div class="small-12 medium-6 large-5 columns glm-reg-event-profile-details-container">
-
                     <div class="row">
-                        <div class="small-12 columns glm-reg-event-profile-details glm-reg-date glm-reg-has-icon"> {$regEvent.first_datetime.timestamp|date_format:"%A, %B %e, %Y"}</div>
+                        {if $regEvent.first_datetime.timestamp}
+                            <div class="small-12 columns glm-reg-event-profile-details glm-reg-date glm-reg-has-icon"> {$regEvent.first_datetime.timestamp|date_format:"%A, %B %e, %Y"}</div>
 
-                        {if $first_date.timestamp != $last_date.timestamp && !$time_specific}
-                            <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$first_date.timestamp|date_format:"%l:%M %p"} - {$last_date.timestamp|date_format:"%l:%M %p"}</div>
-                        {else}
-                             <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"}</div>
-                        {/if}
-                       
-                        {if $regEvent.eventCost}
-                            <div class="small-12 columns glm-reg-event-profile-details glm-reg-cost glm-reg-has-icon"> {$regEvent.eventCost}</div>
+                            {if $first_date.timestamp != $last_date.timestamp && !$time_specific}
+                                <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$first_date.timestamp|date_format:"%l:%M %p"} - {$last_date.timestamp|date_format:"%l:%M %p"}</div>
+                            {else}
+                                 <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"}</div>
+                            {/if}
+
+                            {if $regEvent.eventCost}
+                                <div class="small-12 columns glm-reg-event-profile-details glm-reg-cost glm-reg-has-icon"> {$regEvent.eventCost}</div>
+                            {/if}
                         {/if}
-                        
            
                         {if $regEvent.locations.name || $regEvent.locations.address}
                             <div class="small-12 columns glm-reg-event-profile-details glm-reg-location glm-reg-has-icon">