2021-03-23 15:18:03 +01:00
|
|
|
<%= @subject %>
|
|
|
|
|
|
|
|
==
|
2021-06-26 15:23:22 +02:00
|
|
|
<%= case @recap do %><% :one_day -> %><% dgettext("activity", "Here's your daily activity recap") %>
|
|
|
|
<% :one_week -> %><% dgettext("activity", "Here's your weekly activity recap") %>
|
|
|
|
<% :one_hour -> %><%= dngettext("activity", "There has been an activity!", "There has been some activity!", @total_number_activities) %>
|
|
|
|
<% false -> %><%= dngettext("activity", "There has been an activity!", "There has been some activity!", @total_number_activities) %>
|
|
|
|
<% end %>
|
2021-03-23 15:18:03 +01:00
|
|
|
|
|
|
|
<%= for {_, group_activities} <- @activities do %>
|
|
|
|
|
|
|
|
==
|
2021-06-01 18:08:03 +02:00
|
|
|
<%= if hd(group_activities).group do %>
|
2021-03-23 15:18:03 +01:00
|
|
|
<%= hd(group_activities).group.name || "@#{Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)}" %>
|
2021-06-01 18:08:03 +02:00
|
|
|
<% end %>
|
2021-03-23 15:18:03 +01:00
|
|
|
|
|
|
|
<%= for activity <- Enum.take(group_activities, 5) do %>
|
2023-10-17 16:41:31 +02:00
|
|
|
* <%= case activity.type do %><% :discussion -> %><%= render("activity/_discussion_activity_item.text", activity: activity) %><% :conversation -> %><%= render("activity/_conversation_activity_item.text", activity: activity) %><% :event -> %><%= render("activity/_event_activity_item.text", activity: activity) %><% :group -> %><%= render("activity/_group_activity_item.text", activity: activity) %>
|
2021-03-23 15:18:03 +01:00
|
|
|
<% :member -> %><%= render("activity/_member_activity_item.text", activity: activity) %><% :post -> %><%= render("activity/_post_activity_item.text", activity: activity) %><% :resource -> %><%= render("activity/_resource_activity_item.text", activity: activity) %><% :comment -> %><%= render("activity/_comment_activity_item.text", activity: activity) %><% end %>
|
2021-06-26 15:23:22 +02:00
|
|
|
<%= unless @single_activity do %><%= datetime_to_string(activity.inserted_at, @locale, :short) %><% end %>
|
2021-03-23 15:18:03 +01:00
|
|
|
<% end %>
|
|
|
|
<%= if length(group_activities) > 5 do %>
|
|
|
|
<%= dngettext "activity", "View one more activity", "View %{count} more activities", length(group_activities) - 5, %{count: length(group_activities) - 5} %>
|
2023-12-01 09:49:54 +01:00
|
|
|
<%= ~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)}" |> url() |> URI.decode() %>/timeline
|
2021-03-23 15:18:03 +01:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2021-06-26 15:23:22 +02:00
|
|
|
<%= dgettext("activity", "Don't want to receive activity notifications? You may change frequency or disable them in your settings.") %>
|
|
|
|
<% "#{Mobilizon.Web.Endpoint.url()}/settings/notifications" %>
|