2019-12-20 18:26:38 +01:00
|
|
|
h5
|
|
|
|
' Faved by
|
|
|
|
=> @image.faves_count
|
|
|
|
= pluralize("user", "users", @image.faves_count)
|
|
|
|
|
2022-03-03 22:04:45 +01:00
|
|
|
= for fave <- Enum.sort_by(@image.faves, & String.downcase(&1.user.name)) do
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link fave.user.name, to: ~p"/profiles/#{fave.user}", class: "interaction-user-list-item"
|
2019-12-20 18:26:38 +01:00
|
|
|
|
|
|
|
= if @has_votes do
|
|
|
|
h5
|
|
|
|
' Upvoted by
|
|
|
|
=> @image.upvotes_count
|
2019-12-30 13:50:02 +01:00
|
|
|
= pluralize("user", "users", @image.upvotes_count)
|
2019-12-20 18:26:38 +01:00
|
|
|
|
2022-03-03 22:04:45 +01:00
|
|
|
= for upvote <- Enum.sort_by(@image.upvotes, & String.downcase(&1.user.name)) do
|
2019-12-30 13:50:02 +01:00
|
|
|
span.interaction-user-list-item
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link upvote.user.name, to: ~p"/profiles/#{upvote.user}"
|
|
|
|
=> link "(x)", to: ~p"/images/#{@image}/tamper?#{[user_id: upvote.user_id]}", method: "post"
|
2019-12-20 18:26:38 +01:00
|
|
|
|
|
|
|
h5
|
|
|
|
' Downvoted by
|
|
|
|
=> @image.downvotes_count
|
|
|
|
= pluralize("user", "users", @image.downvotes_count)
|
|
|
|
|
2022-03-03 22:04:45 +01:00
|
|
|
= for downvote <- Enum.sort_by(@image.downvotes, & String.downcase(&1.user.name)) do
|
2019-12-30 13:50:02 +01:00
|
|
|
span.interaction-user-list-item
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link downvote.user.name, to: ~p"/profiles/#{downvote.user}"
|
|
|
|
=> link "(x)", to: ~p"/images/#{@image}/tamper?#{[user_id: downvote.user_id]}", method: "post"
|
2019-12-30 13:50:02 +01:00
|
|
|
|
|
|
|
h5
|
|
|
|
' Hidden by
|
|
|
|
=> @image.hides_count
|
|
|
|
= pluralize("user", "users", @image.hides_count)
|
|
|
|
|
2022-03-03 22:04:45 +01:00
|
|
|
= for hide <- Enum.sort_by(@image.hides, & String.downcase(&1.user.name)) do
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link hide.user.name, to: ~p"/profiles/#{hide.user}", class: "interaction-user-list-item"
|