Handle address is invalid while rendering event preview

Closes #996

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-04-01 13:54:16 +02:00
parent a99d66b68f
commit 2bdce8b2fc
7 changed files with 27 additions and 8 deletions

View File

@@ -1,2 +1,2 @@
<%= gettext("Date:") %> <%= render("date/event_tz_date_range.text", event: @event, start_date: datetime_tz_convert(@event.begins_on, @event.options.timezone), end_date: datetime_tz_convert(@event.ends_on, @event.options.timezone), timezone: @timezone, locale: @locale) %>
<%= gettext("Address:") %> <%= if @event.physical_address do %><%= render_address(@event.physical_address) %><% end %><%= if @event.options.is_online do %><%= gettext "Online event" %><% end %>
<%= gettext("Address:") %> <%= if not is_nil(@event.physical_address) and not is_nil(render_address(@event.physical_address)) do %><%= render_address(@event.physical_address) %><% end %><%= if @event.options.is_online do %><%= gettext "Online event" %><% end %>