From: Steve Sutton Date: Thu, 4 Apr 2019 13:31:09 +0000 (-0400) Subject: Fix the date output. X-Git-Tag: v1.7.23^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=93833ee565612f9fad3a46c7c4a96b59ac7798fd;p=WP-Plugins%2Fglm-member-db-events.git Fix the date output. Deal with date output when to show the day of week in the date output. --- diff --git a/views/front/events/detail.html b/views/front/events/detail.html index d10d528..be2f4e8 100755 --- a/views/front/events/detail.html +++ b/views/front/events/detail.html @@ -61,15 +61,29 @@ {$lastDate = ''} {foreach $event.recurrences as $rec} - {$eDate = $rec.from_date.timestamp|date_format:"%A, %B %e, %Y"} + {$showDayOfWeek = true} + {* Don't show the day of week if there's specific_dates or if recurDays has value *} + {if trim($event.recurDays) == '' && count($rec.specific_dates) > 0} + {$showDayOfWeek = false} + {/if} + {* Don't show the day of the week if there's day of week added to end *} + {if $rec.day_of_week.names|@count < 7 && $rec.day_of_week.names|@count > 0} + {$showDayOfWeek = false} + {/if} + + {if $showDayOfWeek} + {$eDate = $rec.from_date.timestamp|date_format:"%A, %B %e, %Y"} + {else} + {$eDate = $rec.from_date.timestamp|date_format:"%B %e, %Y"} + {/if} {if $eDate != $lastDate} {$lastDate = $eDate}
- {if $event.recurrences.0.recurring.value == 1} Occurring {/if} + {if $rec.recurring.value == 1} Occurring {/if} - {$eDate} + {$eDate} {if $rec.from_date.date != $rec.to_date.date} - {$rec.to_date.timestamp|date_format:"%B %e, %Y"} {else if $rec.specific_dates}