forked from potsda.mn/mobilizon
8235f4c7b5
See https://gist.github.com/chrismccord/2ab350f154235ad4a4d0f4de6decba7b#rename-your-htmleex-and-htmlleex-templates-to-htmlheex-optional Signed-off-by: Thomas Citharel <tcit@tcit.fr>
118 lines
5.7 KiB
Plaintext
118 lines
5.7 KiB
Plaintext
<%= case @activity.subject do %>
|
|
<% :resource_created -> %>
|
|
<%= if @activity.subject_params["is_folder"] do %>
|
|
<%=
|
|
dgettext("activity", "%{profile} created the folder %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<a href=\"#{
|
|
Routes.page_url(
|
|
Mobilizon.Web.Endpoint,
|
|
:resource,
|
|
@activity.subject_params["resource_uuid"]
|
|
) |> URI.decode()}\">
|
|
#{@activity.subject_params["resource_title"]}
|
|
</a>"
|
|
}
|
|
) |> raw %>
|
|
<% else %>
|
|
<%=
|
|
dgettext("activity", "%{profile} created the resource %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<a href=\"#{
|
|
Routes.page_url(
|
|
Mobilizon.Web.Endpoint,
|
|
:resource,
|
|
@activity.subject_params["resource_uuid"]
|
|
) |> URI.decode()}\">
|
|
#{@activity.subject_params["resource_title"]}
|
|
</a>"
|
|
}
|
|
) |> raw %>
|
|
<% end %>
|
|
<% :resource_renamed -> %>
|
|
<%= if @activity.subject_params["is_folder"] do %>
|
|
<%=
|
|
dgettext("activity", "%{profile} renamed the folder from %{old_resource_title} to %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<a href=\"#{
|
|
Routes.page_url(
|
|
Mobilizon.Web.Endpoint,
|
|
:resource,
|
|
@activity.subject_params["resource_uuid"]
|
|
) |> URI.decode()}\">
|
|
#{@activity.subject_params["resource_title"]}
|
|
</a>",
|
|
old_resource_title: "<b>#{@activity.subject_params["old_resource_title"]}</b>"
|
|
}
|
|
) |> raw %>
|
|
<% else %>
|
|
<%=
|
|
dgettext("activity", "%{profile} renamed the resource from %{old_resource_title} to %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<a href=\"#{
|
|
Routes.page_url(
|
|
Mobilizon.Web.Endpoint,
|
|
:resource,
|
|
@activity.subject_params["resource_uuid"]
|
|
) |> URI.decode()}\">
|
|
#{@activity.subject_params["resource_title"]}
|
|
</a>",
|
|
old_resource_title: "<b>#{@activity.subject_params["old_resource_title"]}</b>"
|
|
}
|
|
) |> raw %>
|
|
<% end %>
|
|
<% :resource_moved -> %>
|
|
<%= if @activity.subject_params["is_folder"] do %>
|
|
<%=
|
|
dgettext("activity", "%{profile} moved the folder %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<a href=\"#{
|
|
Routes.page_url(
|
|
Mobilizon.Web.Endpoint,
|
|
:resource,
|
|
@activity.subject_params["resource_uuid"]
|
|
) |> URI.decode()}\">
|
|
#{@activity.subject_params["resource_title"]}
|
|
</a>"
|
|
}
|
|
) |> raw %>
|
|
<% else %>
|
|
<%=
|
|
dgettext("activity", "%{profile} moved the resource %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<a href=\"#{
|
|
Routes.page_url(
|
|
Mobilizon.Web.Endpoint,
|
|
:resource,
|
|
@activity.subject_params["resource_uuid"]
|
|
) |> URI.decode()}\">
|
|
#{@activity.subject_params["resource_title"]}
|
|
</a>"
|
|
}
|
|
) |> raw %>
|
|
<% end %>
|
|
<% :resource_deleted -> %>
|
|
<%= if @activity.subject_params["is_folder"] do %>
|
|
<%=
|
|
dgettext("activity", "%{profile} deleted the folder %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<b>#{@activity.subject_params["resource_title"]}</b>"
|
|
}
|
|
) |> raw %>
|
|
<% else %>
|
|
<%=
|
|
dgettext("activity", "%{profile} deleted the resource %{resource}.",
|
|
%{
|
|
profile: "<b>#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}</b>",
|
|
resource: "<b>#{@activity.subject_params["resource_title"]}</b>"
|
|
}
|
|
) |> raw %>
|
|
<% end %>
|
|
<% end %> |