<% avatar = render(PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @user}, class: "avatar--125px") %>
<%= if current?(@user, @conn.assigns.current_user) do %>
<%= link(avatar, to: ~p"/avatar/edit?#{[profile: true]}", title: "Change avatar") %>
<% else %>
<%= avatar %>
<% end %>
<%= render(PhilomenaWeb.UserAttributionView, "_user_title.html", object: %{user: @user}, large: true) %>
<%= if can?(@conn, :edit_description, @user) do %>
<%= link("Edit Personal Title", to: ~p"/profiles/#{@user}/description/edit") %>
<% end %>
Member since
<%= pretty_time(@user.created_at) %>
-
<%= link("Send message", to: ~p"/conversations/new?#{[recipient: @user.name]}") %>
-
<%= link("Our conversations", to: ~p"/conversations?#{[with: @user.id]}") %>
-
<%= link("Report this user", to: ~p"/profiles/#{@user}/reports/new") %>
-
<%= link("Uploads", to: ~p"/search?#{[q: "uploader_id:#{@user.id}"]}") %>
-
<%= link("Comments", to: ~p"/comments?#{[cq: "user_id:#{@user.id}"]}") %>
-
<%= link("Posts", to: ~p"/posts?#{[pq: "user_id:#{@user.id}"]}") %>
<%= if current?(@user, @conn.assigns.current_user) do %>
-
<%= link("My reports", to: ~p"/reports") %>
<% end %>
-
<%= link("Favorites", to: ~p"/search?#{[q: "faved_by_id:#{@user.id}"]}") %>
-
<%= link("Tag changes", to: ~p"/profiles/#{@user}/tag_changes") %>
-
<%= link("Source changes", to: ~p"/profiles/#{@user}/source_changes") %>
<%= if can_index_user?(@conn) do %>
<%= render(PhilomenaWeb.BanView, "_bans.html", bans: @bans, conn: @conn) %>
<% end %>
<%= render(PhilomenaWeb.ProfileView, "_commission.html", user: @user, commission_information: @commission_information, conn: @conn) %>
<%= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do %>
<% else %>
<% end %>
<%= for link <- @user.verified_links, should_see_link?(@conn, @user, link) do %>
<%
watchers =
if link.tag do
@watcher_counts[link.tag.id] || 0
else
0
end
%>
<%= if link.tag do %>
<%= render(PhilomenaWeb.TagView, "_tag.html", tag: link.tag, conn: @conn) %>
<% end %>
<%= link(link.uri, to: link.uri) %>
<%= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do %>
Watched by
<%= watchers %>
<%= pluralize("user", "users", watchers) %>
<% end %>
<%= if manages_links?(@conn, @user) do %>
<%= if link.public do %>
Public
<% else %>
Hidden
<% end %>
•
Edit
•
Reject
<% else %>
<%= unless link.public do %>
Hidden
<% end %>
<% end %>
<% end %>
<%= if manages_awards?(@conn) and not hide_staff_tools?(@conn) do %>
<% else %>
<% end %>
<%= for award <- award_order(@user.awards) do %>
<%= badge_image(award.badge, alt: award.label, width: "32", height: "32") %>
<%= award_title(award) %>
<%= pretty_time(award.awarded_on) %>
<%= if manages_awards?(@conn) do %>
<%= user_abbrv(award.awarded_by) %>
<% end %>
<%= if manages_awards?(@conn) do %>
<% end %>
<% end %>
<%= render(PhilomenaWeb.ProfileView, "_about_me.html", user: @user, about_me: @about_me, conn: @conn) %>
<%= if can_read_mod_notes?(@conn) and not hide_staff_tools?(@conn) do %>
Note
|
Created
|
<%= for {body, mod_note} <- @mod_notes do %>
<%= body %>
|
<%= pretty_time(mod_note.created_at) %>
|
<% end %>
<% end %>
<%= if can_index_user?(@conn) do %>
<% end %>
<%= render(PhilomenaWeb.ProfileView, "_statistics.html", user: @user, statistics: @statistics, conn: @conn) %>
<%= render(PhilomenaWeb.ProfileView, "_recent_images.html", title: "Recent Artwork", images: @recent_artwork, view_all_path: ~p"/search?#{[q: tag_disjunction(@tags)]}", conn: @conn) %>
<%= render(PhilomenaWeb.ProfileView, "_recent_images.html", title: "Recent Uploads", images: @recent_uploads, view_all_path: ~p"/search?#{[q: "uploader_id:#{@user.id}"]}", conn: @conn) %>
<%= render(PhilomenaWeb.ProfileView, "_recent_images.html", title: "Recent Favorites", images: @recent_faves, view_all_path: ~p"/search?#{[q: "faved_by_id:#{@user.id}"]}", conn: @conn) %>
<%= render(PhilomenaWeb.ProfileView, "_recent_galleries.html", galleries: @recent_galleries, user: @user, conn: @conn) %>
<%= render(PhilomenaWeb.ProfileView, "_recent_comments.html", comments: @recent_comments, user: @user, conn: @conn) %>
<%= render(PhilomenaWeb.ProfileView, "_recent_posts.html", posts: @recent_posts, user: @user, conn: @conn) %>