adding location data and cleaning up the list view, adding year only they are differe...
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 14 Dec 2017 20:09:04 +0000 (15:09 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 14 Dec 2017 20:09:04 +0000 (15:09 -0500)
views/front/registrations/list.html
views/front/registrations/registration.html

index 35da1c4..9b1df37 100644 (file)
@@ -25,7 +25,8 @@
                             {$lastDate = ''}
                             {foreach $event.recurrences as $rec}
 
-                                {$eDate = $rec.from_date.timestamp|date_format:"%A, %B %e, %Y"}
+                                {$eDate = $rec.from_date.timestamp|date_format:"%B %e"}
+                                
                                 {if $eDate != $lastDate}
                                     {$lastDate = $eDate}
                                     <div>
 
                                     {$eDate}
                                         {if $rec.from_date.date != $rec.to_date.date}
-                                            - {$rec.to_date.timestamp|date_format:"%B %e, %Y"}
+                                            {if $rec.from_date.timestamp|date_format:"%Y" != $rec.to_date.date.timestamp|date_format:"%Y"}
+                                                - {$rec.to_date.timestamp|date_format:"%B %e"},
+                                            {else}
+                                                - {$rec.to_date.timestamp|date_format:"%B %e"}
+                                            {/if}
                                         {else if $rec.specific_dates}
-                                            - {$rec.specific_dates|@end|date_format:"%B %e, %Y"}
+                                            {if $rec.from_date.timestamp|date_format:"%Y" != $rec.specific_dates|@end|date_format:"%Y"}
+                                                - {$rec.specific_dates|@end|date_format:"%B %e"},
+                                            {else}
+                                                - {$rec.specific_dates|@end|date_format:"%B %e"}
+                                            {/if}
+                                        {else}
+                                        ,
                                         {/if}
-
+                                        {$rec.from_date.timestamp|date_format:"%Y"}
 
                                         {if $rec.day_of_week.names|@count < 7 && $rec.day_of_week.names|@count > 0 }
                                             on
index 1657da0..b40bad9 100644 (file)
@@ -9,6 +9,13 @@
     <a id="accountLogout">Logout</a>
 </script>
 {/literal}
+
+{assign var=first value = $regEvent.reg_time|@key}
+{assign var=first_date value = $regEvent.reg_time.$first.start_datetime}
+{assign var=last value = $regEvent.reg_time|@end}
+{assign var=last_date value = $last.end_datetime}
+{assign var=time_specific value = $regEvent.time_specific.value}
+
 {* Template for the regEvent *}{literal}
 <script type="text/template" id="regEvent-template">
     <div class="row">
                 {/if}
                 <div class="small-12 medium-4 columns glm-reg-event-profile-details-container">
                 
-                    <div class="row"> 
-                        <div class="small-12 columns glm-reg-event-profile-details glm-reg-date"> {$regEvent.last_datetime.timestamp|date_format:"%A, %B %e, %Y"}</div>
-                        {if $regEvent.first_datetime.timestamp != $regEvent.last_datetime.timestamp}
-                            <div class="small-12 columns glm-reg-event-profile-details glm-reg-time"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"} - {$regEvent.last_datetime.timestamp|date_format:"%l:%M %p"}</div>
+                    <div class="row">
+                        <div class="small-12 columns glm-reg-event-profile-details glm-reg-date"> {$regEvent.first_datetime.timestamp|date_format:"%A, %B %e, %Y"}</div>
+<!--                        <pre>{$regEvent|@print_r}</pre>-->
+                        {if $first_date.timestamp != $last_date.timestamp && !$time_specific}
+                            <div class="small-12 columns glm-reg-event-profile-details glm-reg-time"> {$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"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"}</div>
                         {/if}
-                        <div class="small-12 columns glm-reg-event-profile-details glm-reg-location"> {$regEvent.locations.name}</div>
+                        {if $regEvent.locations.name || $regEvent.locations.address}
+                            <div class="small-12 columns glm-reg-event-profile-details glm-reg-location"> {$regEvent.locations.name}<br>{$regEvent.locations.address}<br> {$regEvent.locations.city.name},{$regEvent.locations.state.name} {$regEvent.locations.zip}</div>
+                        {/if}
                     </div>
                 </div>
                 <div class="small-12 columns">