2019-11-12 02:27:09 +01:00
|
|
|
.profile-top
|
|
|
|
.profile-top__avatar
|
2024-05-01 00:10:05 +02:00
|
|
|
- avatar = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @user}, class: "avatar--large"
|
2020-06-28 21:49:34 +02:00
|
|
|
= if current?(@user, @conn.assigns.current_user) do
|
|
|
|
= link avatar, to: Routes.avatar_path(@conn, :edit, profile: true), title: "Change avatar"
|
|
|
|
- else
|
|
|
|
= avatar
|
2019-11-12 02:27:09 +01:00
|
|
|
.profile-top__name-and-links
|
|
|
|
div
|
|
|
|
h1.profile-top__name-header
|
|
|
|
= @user.name
|
|
|
|
| 's profile
|
2019-12-06 01:36:45 +01:00
|
|
|
= render PhilomenaWeb.UserAttributionView, "_user_title.html", object: %{user: @user}, large: true
|
|
|
|
br
|
|
|
|
|
|
|
|
= if can?(@conn, :edit_description, @user) do
|
|
|
|
= link "Edit Personal Title", to: Routes.profile_description_path(@conn, :edit, @user)
|
|
|
|
br
|
|
|
|
|
2019-11-12 02:27:09 +01:00
|
|
|
span
|
|
|
|
' Member since
|
|
|
|
= pretty_time(@user.created_at)
|
|
|
|
|
|
|
|
.profile-top__options
|
|
|
|
ul.profile-top__options__column
|
2019-12-04 14:25:10 +01:00
|
|
|
li = link("Send message", to: Routes.conversation_path(@conn, :new, recipient: @user.name))
|
|
|
|
li = link("Our conversations", to: Routes.conversation_path(@conn, :index, with: @user.id))
|
|
|
|
li = link("Report this user", to: Routes.profile_report_path(@conn, :new, @user))
|
2019-11-12 02:27:09 +01:00
|
|
|
|
|
|
|
ul.profile-top__options__column
|
|
|
|
li = link("Uploads", to: Routes.search_path(@conn, :index, q: "uploader_id:#{@user.id}"))
|
2019-12-01 03:29:46 +01:00
|
|
|
li = link("Comments", to: Routes.comment_path(@conn, :index, cq: "user_id:#{@user.id}"))
|
|
|
|
li = link("Posts", to: Routes.post_path(@conn, :index, pq: "user_id:#{@user.id}"))
|
2019-12-05 19:32:53 +01:00
|
|
|
= if current?(@user, @conn.assigns.current_user) do
|
|
|
|
li = link "My reports", to: Routes.report_path(@conn, :index)
|
2019-11-12 02:27:09 +01:00
|
|
|
|
|
|
|
ul.profile-top__options__column
|
|
|
|
li = link("Favorites", to: Routes.search_path(@conn, :index, q: "faved_by_id:#{@user.id}"))
|
2019-12-04 23:10:35 +01:00
|
|
|
li = link("Tag changes", to: Routes.profile_tag_change_path(@conn, :index, @user))
|
2019-12-04 23:56:13 +01:00
|
|
|
li = link("Source changes", to: Routes.profile_source_change_path(@conn, :index, @user))
|
2019-11-12 02:27:09 +01:00
|
|
|
|
2019-12-17 06:44:24 +01:00
|
|
|
= if can_index_user?(@conn) do
|
2019-12-20 23:35:46 +01:00
|
|
|
.js-staff-action
|
|
|
|
= render PhilomenaWeb.ProfileView, "_admin_block.html", assigns
|
2019-12-17 06:44:24 +01:00
|
|
|
|
2020-07-06 09:43:12 +02:00
|
|
|
= if @forced && (current?(@user, @conn.assigns.current_user) or can_index_user?(@conn)) do
|
|
|
|
.block
|
|
|
|
i.fa.fa-fw.fa-filter>
|
|
|
|
strong.comment_deleted> Forced Filter:
|
|
|
|
= link @forced.name, to: Routes.filter_path(@conn, :show, @forced)
|
|
|
|
|
2019-12-20 01:00:09 +01:00
|
|
|
= if (current?(@user, @conn.assigns.current_user) or can?(@conn, :index, Philomena.Bans.User)) and Enum.any?(@bans) do
|
2023-11-23 17:07:49 +01:00
|
|
|
.block.block--warning
|
|
|
|
.block__header
|
|
|
|
i.fa.fa-ban
|
|
|
|
| Ban History
|
2019-12-08 21:32:54 +01:00
|
|
|
.block__content
|
|
|
|
= render PhilomenaWeb.BanView, "_bans.html", bans: @bans, conn: @conn
|
|
|
|
|
2019-11-12 02:27:09 +01:00
|
|
|
.column-layout
|
|
|
|
.column-layout__left
|
2019-12-06 00:11:15 +01:00
|
|
|
.block
|
|
|
|
.block__header
|
2023-11-23 17:07:49 +01:00
|
|
|
i.fa.fa-briefcase
|
|
|
|
| Commissions
|
2019-12-06 00:11:15 +01:00
|
|
|
= render PhilomenaWeb.ProfileView, "_commission.html", user: @user, commission_information: @commission_information, conn: @conn
|
|
|
|
|
2019-11-12 02:27:09 +01:00
|
|
|
.block
|
2023-11-23 17:07:49 +01:00
|
|
|
.block__header
|
|
|
|
i.fa.fa-link
|
|
|
|
| Artist Links
|
|
|
|
|
2020-08-27 23:47:07 +02:00
|
|
|
= for link <- @user.verified_links, should_see_link?(@conn, @user, link) do
|
2019-12-11 03:58:16 +01:00
|
|
|
- watchers = if link.tag, do: @watcher_counts[link.tag.id] || 0, else: 0
|
2019-12-11 01:59:43 +01:00
|
|
|
|
2020-08-27 23:47:07 +02:00
|
|
|
.block__content.alternating-color.break-word class=link_block_class(link)
|
2019-11-12 02:27:09 +01:00
|
|
|
.center
|
|
|
|
= if link.tag do
|
2019-12-06 18:12:55 +01:00
|
|
|
.tag_list = render PhilomenaWeb.TagView, "_tag.html", tag: link.tag, conn: @conn
|
2019-11-12 02:27:09 +01:00
|
|
|
= link(link.uri, to: link.uri)
|
|
|
|
|
2020-08-27 23:47:07 +02:00
|
|
|
= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do
|
2019-12-11 01:59:43 +01:00
|
|
|
br
|
|
|
|
' Watched by
|
|
|
|
=> watchers
|
|
|
|
= pluralize("user", "users", watchers)
|
|
|
|
|
2019-12-21 15:54:13 +01:00
|
|
|
= if manages_links?(@conn, @user) do
|
|
|
|
br
|
2019-12-31 00:56:29 +01:00
|
|
|
=> if link.public do
|
|
|
|
' Public
|
|
|
|
- else
|
|
|
|
' Hidden
|
|
|
|
' •
|
2020-11-26 21:21:24 +01:00
|
|
|
a href=Routes.profile_artist_link_path(@conn, :edit, @user, link)
|
2019-12-21 15:54:13 +01:00
|
|
|
' Edit
|
2020-09-28 16:36:27 +02:00
|
|
|
' •
|
2020-11-26 21:21:24 +01:00
|
|
|
a href=Routes.admin_artist_link_reject_path(@conn, :create, link) data-method="post"
|
2020-09-28 16:36:27 +02:00
|
|
|
' Reject
|
2020-08-27 23:47:07 +02:00
|
|
|
- else
|
|
|
|
=> unless link.public do
|
|
|
|
br
|
|
|
|
' Hidden
|
2019-12-21 15:54:13 +01:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do
|
|
|
|
.block__content.alternating-color.break-word
|
|
|
|
a.button href=Routes.profile_artist_link_path(@conn, :new, @user)
|
|
|
|
i.fa.fa-link>
|
|
|
|
| Create an Artist Link
|
2019-11-12 02:27:09 +01:00
|
|
|
.block
|
2023-11-23 17:07:49 +01:00
|
|
|
.block__header
|
|
|
|
i.fa.fa-award
|
|
|
|
| Badges
|
2019-11-12 02:27:09 +01:00
|
|
|
= for award <- award_order(@user.awards) do
|
|
|
|
.block__content.flex.flex--centered.flex--center-distributed.alternating-color.no-overflow title=award.label
|
|
|
|
.flex__grow.center
|
2019-11-12 02:37:11 +01:00
|
|
|
.badge = badge_image(award.badge, alt: award.label, width: "32", height: "32")
|
2019-11-12 02:27:09 +01:00
|
|
|
br
|
2019-11-12 02:41:26 +01:00
|
|
|
= award_title(award)
|
2019-11-12 02:27:09 +01:00
|
|
|
.flex__grow.center
|
2019-12-25 22:10:56 +01:00
|
|
|
=> pretty_time(award.awarded_on)
|
|
|
|
= if manages_awards?(@conn) do
|
|
|
|
= user_abbrv(@conn, award.awarded_by)
|
2019-11-12 02:27:09 +01:00
|
|
|
|
2019-12-15 21:02:13 +01:00
|
|
|
= if manages_awards?(@conn) do
|
|
|
|
.flex__grow.center
|
|
|
|
a href=Routes.profile_award_path(@conn, :delete, @user, award) data-method="delete" data-confirm="Are you really, really sure?"
|
|
|
|
' Remove
|
|
|
|
br
|
|
|
|
a href=Routes.profile_award_path(@conn, :edit, @user, award)
|
|
|
|
' Edit
|
2023-11-23 17:07:49 +01:00
|
|
|
= if manages_awards?(@conn) and not hide_staff_tools?(@conn) do
|
|
|
|
.block__content.alternating-color.no-overflow
|
|
|
|
a.button href=Routes.profile_award_path(@conn, :new, @user)
|
|
|
|
i.fa.fa-trophy>
|
|
|
|
| Award a badge
|
2019-12-15 21:02:13 +01:00
|
|
|
|
2019-12-05 19:35:44 +01:00
|
|
|
.block
|
|
|
|
.block__header
|
2023-11-23 17:07:49 +01:00
|
|
|
i.fa.fa-question
|
|
|
|
| About Me
|
2019-12-06 01:36:45 +01:00
|
|
|
|
2019-12-05 19:35:44 +01:00
|
|
|
= render PhilomenaWeb.ProfileView, "_about_me.html", user: @user, about_me: @about_me, conn: @conn
|
|
|
|
|
2019-12-20 23:35:46 +01:00
|
|
|
= if can_read_mod_notes?(@conn) and not hide_staff_tools?(@conn) do
|
2023-11-23 17:07:49 +01:00
|
|
|
.block.block--warning
|
|
|
|
.block__header
|
|
|
|
i.fa.fa-sticky-note
|
|
|
|
| Mod Notes
|
2019-12-17 18:29:18 +01:00
|
|
|
table.table
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th Note
|
|
|
|
th Created
|
|
|
|
tbody
|
|
|
|
= for {body, mod_note} <- @mod_notes do
|
|
|
|
tr
|
2024-05-04 05:15:14 +02:00
|
|
|
td = body
|
2019-12-17 18:29:18 +01:00
|
|
|
td = pretty_time(mod_note.created_at)
|
2023-11-23 17:07:49 +01:00
|
|
|
.block__content
|
|
|
|
a.button href=Routes.profile_detail_path(@conn, :index, @user)
|
|
|
|
i.fa.fa-plus>
|
|
|
|
| Edit mod notes
|
2019-12-22 23:17:20 +01:00
|
|
|
= if can_index_user?(@conn) do
|
2023-11-23 17:07:49 +01:00
|
|
|
.block.block--warning
|
|
|
|
.block__header
|
|
|
|
i.fa.fa-clipboard
|
|
|
|
| Moderation Scratchpad
|
2019-12-22 23:17:20 +01:00
|
|
|
.block__content.profile-about
|
2024-05-04 05:15:14 +02:00
|
|
|
= @scratchpad
|
2023-11-23 17:07:49 +01:00
|
|
|
.block__content
|
|
|
|
a.button href=Routes.profile_scratchpad_path(@conn, :edit, @user)
|
|
|
|
i.fa.fa-edit>
|
|
|
|
| Edit
|
2019-12-17 18:29:18 +01:00
|
|
|
|
2019-11-12 02:27:09 +01:00
|
|
|
.column-layout__main
|
2019-12-05 14:55:49 +01:00
|
|
|
= render PhilomenaWeb.ProfileView, "_statistics.html", user: @user, statistics: @statistics, conn: @conn
|
2019-12-07 23:07:53 +01:00
|
|
|
= render PhilomenaWeb.ProfileView, "_recent_images.html", title: "Recent Artwork", images: @recent_artwork, view_all_path: Routes.search_path(@conn, :index, q: tag_disjunction(@tags)), conn: @conn
|
2019-11-18 14:10:17 +01:00
|
|
|
= render PhilomenaWeb.ProfileView, "_recent_images.html", title: "Recent Uploads", images: @recent_uploads, view_all_path: Routes.search_path(@conn, :index, q: "uploader_id:#{@user.id}"), conn: @conn
|
2019-12-05 05:53:56 +01:00
|
|
|
= render PhilomenaWeb.ProfileView, "_recent_images.html", title: "Recent Favorites", images: @recent_faves, view_all_path: Routes.search_path(@conn, :index, 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
|
2019-12-13 20:26:43 +01:00
|
|
|
= render PhilomenaWeb.ProfileView, "_recent_posts.html", posts: @recent_posts, user: @user, conn: @conn
|