mobilizon/lib/web/templates/email/activity/_event_activity_item.text.eex
Thomas Citharel b315e1d7ff
refactor: use Phoenix verified routes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-12-01 11:29:53 +01:00

37 lines
1.9 KiB
Elixir

<%= case @activity.subject do %><% :event_created -> %><%= dgettext("activity", "The event %{event} was created by %{profile}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% :event_updated -> %><%= dgettext("activity", "The event %{event} was updated by %{profile}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% :event_deleted -> %><%= dgettext("activity", "The event %{event} was deleted by %{profile}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<% :comment_posted -> %><%= if @activity.subject_params["comment_reply_to"] do %><%= dgettext("activity", "%{profile} replied to a comment on the event %{event}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} posted a comment on the event %{event}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% end %><% :event_new_participation -> %><%= dgettext("activity", "%{profile} joined your event %{event}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% end %>