mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
36 lines
1.5 KiB
Text
36 lines
1.5 KiB
Text
<h5>
|
|
Faved by <%= @image.faves_count %>
|
|
<%= pluralize("user", "users", @image.faves_count) %>
|
|
</h5>
|
|
<%= for fave <- Enum.sort_by(@image.faves, & String.downcase(&1.user.name)) do %>
|
|
<%= link(fave.user.name, to: ~p"/profiles/#{fave.user}", class: "interaction-user-list-item") %>
|
|
<% end %>
|
|
<%= if @has_votes do %>
|
|
<h5>
|
|
Upvoted by <%= @image.upvotes_count %>
|
|
<%= pluralize("user", "users", @image.upvotes_count) %>
|
|
</h5>
|
|
<%= for upvote <- Enum.sort_by(@image.upvotes, & String.downcase(&1.user.name)) do %>
|
|
<span class="interaction-user-list-item">
|
|
<%= link(upvote.user.name, to: ~p"/profiles/#{upvote.user}") %>
|
|
<%= link("(x)", to: ~p"/images/#{@image}/tamper?#{[user_id: upvote.user_id]}", method: "post") %>
|
|
</span>
|
|
<% end %>
|
|
<h5>
|
|
Downvoted by <%= @image.downvotes_count %>
|
|
<%= pluralize("user", "users", @image.downvotes_count) %>
|
|
</h5>
|
|
<%= for downvote <- Enum.sort_by(@image.downvotes, & String.downcase(&1.user.name)) do %>
|
|
<span class="interaction-user-list-item">
|
|
<%= link(downvote.user.name, to: ~p"/profiles/#{downvote.user}") %>
|
|
<%= link("(x)", to: ~p"/images/#{@image}/tamper?#{[user_id: downvote.user_id]}", method: "post") %>
|
|
</span>
|
|
<% end %>
|
|
<h5>
|
|
Hidden by <%= @image.hides_count %>
|
|
<%= pluralize("user", "users", @image.hides_count) %>
|
|
</h5>
|
|
<%= for hide <- Enum.sort_by(@image.hides, & String.downcase(&1.user.name)) do %>
|
|
<%= link(hide.user.name, to: ~p"/profiles/#{hide.user}", class: "interaction-user-list-item") %>
|
|
<% end %>
|
|
<% end %>
|