Better handle datetime

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-10-14 19:29:18 +02:00
parent cc701f8994
commit d93561742a
17 changed files with 168 additions and 48 deletions

View File

@@ -181,6 +181,9 @@ defmodule MobilizonWeb.Schema.EventType do
field(:show_participation_price, :boolean,
description: "Whether or not to show the participation price"
)
field(:show_start_time, :boolean, description: "Show event start time")
field(:show_end_time, :boolean, description: "Show event end time")
end
input_object :event_options_input do
@@ -214,6 +217,9 @@ defmodule MobilizonWeb.Schema.EventType do
field(:show_participation_price, :boolean,
description: "Whether or not to show the participation price"
)
field(:show_start_time, :boolean, description: "Show event start time")
field(:show_end_time, :boolean, description: "Show event end time")
end
object :event_queries do

View File

@@ -76,7 +76,7 @@
</td>
</tr>
<% end %>
<%= if MapSet.member?(@changes, :ends_on) do %>
<%= if MapSet.member?(@changes, :ends_on) && !is_nil(@event.ends_on) do %>
<tr>
<td bgcolor="#ffffff" align="left">
<%= gettext "Ending of event" %>

View File

@@ -12,7 +12,7 @@
<%= gettext "New date and time for start of event: %{begins_on}", begins_on: datetime_to_string(@event.begins_on, @locale) %>
<% end %>
<%= if MapSet.member?(@changes, :ends_on) do %>
<%= if MapSet.member?(@changes, :ends_on) && !is_nil(@event.ends_on) do %>
<%= gettext "New date and time for ending of event: %{ends_on}", ends_on: datetime_to_string(@event.ends_on, @locale) %>
<% end %>