removing occurring text from agenda list and detail view if there is only one date
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 12 May 2017 17:05:49 +0000 (13:05 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 12 May 2017 17:05:49 +0000 (13:05 -0400)
if an event isn't recurring then removing the occuring text from the list view and the
detail view

views/front/events/agenda.html
views/front/events/detail.html

index 759ade9..4e14d15 100644 (file)
@@ -41,7 +41,8 @@
                                                         {if $rec.name && $rec.name != 'Imported' && $rec.name != 'Imported Event Schedule' }
                                                             {$rec.name}
                                                         {/if}
-                                                        ( Occurring {$rec.from_date.date} <span class="agenda-event-recur-dates">
+                                                        ( {if $event.times|@count > 1} Occurring {/if} 
+                                                        {$rec.from_date.date} <span class="agenda-event-recur-dates">
                                                           {if $rec.from_date.date != $rec.to_date.date}
                                                             - {$rec.to_date.date}
                                                            {else if $rec.specific_dates}
index 5af2606..71067bb 100644 (file)
                                     {if $rec.name && $rec.name != 'Imported' && $rec.name != 'Imported Event Schedule' }
                                         {$rec.name}
                                     {/if}
-                                    ( Occurring
+                                    
+                                    ( {if $event.recurrences.0.recurring.value == 1} Occurring {/if}
+                                    
+                                    
                                     {$rec.from_date.timestamp|date_format:"%m/%d/%Y"}
                                       {if $rec.from_date.date != $rec.to_date.date}
                                         - {$rec.to_date.timestamp|date_format:"%m/%d/%Y"}