mobilizon/lib/web/templates/email/date/event_tz_date_range.html.heex
Thomas Citharel d0835232d6
refactor(backend): change naming of function names to avoid the is_ prefix
Following Credo.Check.Readability.PredicateFunctionNames check

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2024-01-04 13:35:08 +01:00

43 lines
1.3 KiB
Plaintext

<%= cond do %>
<% @end_date == nil -> %>
<%= render("date/event_tz_date.html",
date: @start_date,
event: @event,
timezone: @timezone,
locale: @locale
) %>
<% same_day?(@start_date, @end_date) -> %>
<strong>
<%= gettext("On %{date} from %{start_time} to %{end_time}",
date: datetime_to_date_string(@start_date, @locale),
start_time: datetime_to_time_string(@start_date, @locale),
end_time: datetime_to_time_string(@end_date, @locale)
) %>
</strong>
<br />
<%= if @event.options.timezone != @timezone do %>
<span style="font-size: 13px;">
<%= gettext("🌐 %{timezone} %{offset}",
timezone: @event.options.timezone,
offset: Cldr.DateTime.Formatter.zone_gmt(@start_date)
) %>
</span>
<% end %>
<% true -> %>
<strong>
<%= gettext("From the %{start} to the %{end}",
start: datetime_to_string(@start_date, @locale, :short),
end: datetime_to_string(@end_date, @locale, :short)
) %>
</strong>
<br />
<%= if @event.options.timezone != @timezone do %>
<span style="font-size: 13px;">
<%= gettext("🌐 %{timezone} %{offset}",
timezone: @event.options.timezone,
offset: Cldr.DateTime.Formatter.zone_gmt(@start_date)
) %>
</span>
<% end %>
<% end %>