2023-11-23 17:07:49 +01:00
.block.block--danger
.block__header
i.fa.fa-tools
| Admin
.block__content
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-calendar>
2023-11-23 17:07:49 +01:00
' Account created
= @user.created_at
br
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-filter>
2023-11-23 17:07:49 +01:00
' Current Filter:
= if @filter do
2024-06-06 22:28:35 +02:00
= link @filter.name, to: ~p"/filters/#{@filter}"
2023-11-23 17:07:49 +01:00
- else
em
' (none)
br
2024-05-20 22:30:41 +02:00
i.far.icon--padded.small.fa-clock>
2023-11-23 17:07:49 +01:00
' Last seen
= if @last_ip do
=> pretty_time(@last_ip.updated_at)
' from
=> link_to_ip(@conn, @last_ip.ip)
= if @last_fp do
=> link_to_fingerprint(@conn, @last_fp.fingerprint)
- else
em
' (never)
br
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-key>
2023-11-23 17:07:49 +01:00
' Two factor auth:
strong = enabled_text(@user.otp_required_for_login)
br
= if @user.locked_at do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-lock>
2023-11-23 17:07:49 +01:00
strong.comment_deleted>
' Account locked,
=> @user.failed_attempts
' failed login attempts
- else
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-unlock>
2023-11-23 17:07:49 +01:00
' Not currently locked
2024-04-17 16:52:50 +02:00
hr.separator.separator--danger
2023-11-23 17:07:49 +01:00
2024-04-17 16:52:50 +02:00
a.button.button--danger href="#" data-click-toggle=".js-admin__options__toggle" title="Toggle Controls"
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-bars
2023-11-23 17:07:49 +01:00
span Toggle Controls
2019-12-17 06:44:24 +01:00
.profile-top__options.js-admin__options__toggle.hidden
ul.profile-admin__options__column
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/profiles/#{@user}/details" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-eye
2019-12-17 06:44:24 +01:00
span.admin__button View Details
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/search?#{[q: "upvoted_by_id:#{@user.id}"]}" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-arrow-up
2019-12-17 06:44:24 +01:00
span.admin__button Upvotes
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/search?#{[q: "downvoted_by_id:#{@user.id}"]}" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-arrow-down
2019-12-17 06:44:24 +01:00
span.admin__button Downvotes
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/search?#{[q: "hidden_by_id:#{@user.id}"]}" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-eye-slash
2019-12-17 06:44:24 +01:00
span.admin__button Hidden Images
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/reports?#{[rq: "user_id:#{@user.id}"]}" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-exclamation
2019-12-17 06:44:24 +01:00
span.admin__button Reports
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/profiles/#{@user}/ip_history" do
2024-05-20 22:30:41 +02:00
i.fab.icon--padded.small.fa-internet-explorer
2019-12-17 06:44:24 +01:00
span.admin__button IP History
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/profiles/#{@user}/fp_history" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-desktop
2019-12-17 06:44:24 +01:00
span.admin__button FP History
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/profiles/#{@user}/aliases" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-users
2019-12-17 06:44:24 +01:00
span.admin__button Potential Aliases
2022-05-04 03:24:23 +02:00
= if can?(@conn, :index, %Philomena.Donations.Donation{}) do
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/donations/user/#{@user}" do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-dollar-sign
2022-05-04 03:24:23 +02:00
span.admin__button Donations
2019-12-17 06:44:24 +01:00
ul.profile-admin__options__column
2019-12-20 01:00:09 +01:00
= if can?(@conn, :edit, @user) do
2020-07-06 09:43:12 +02:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/edit" do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-edit
2019-12-20 01:00:09 +01:00
span.admin__button Edit User
2020-06-07 03:03:17 +02:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/force_filter/new" do
2020-06-07 03:03:17 +02:00
i.fas.faw-fw.fa-filter
span.admin__button Force Filter
= if @forced do
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/profiles/#{@user}/details" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-eye
2023-11-23 17:07:49 +01:00
span.admin__button View Details
2019-12-20 01:00:09 +01:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/search?#{[q: "upvoted_by_id:#{@user.id}"]}" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-arrow-up
2023-11-23 17:07:49 +01:00
span.admin__button Upvotes
2019-12-20 01:00:09 +01:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/search?#{[q: "downvoted_by_id:#{@user.id}"]}" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-arrow-down
2023-11-23 17:07:49 +01:00
span.admin__button Downvotes
2020-09-06 04:53:55 +02:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/unlock", data: [method: "post"] do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-unlock
2020-09-06 04:53:55 +02:00
span.admin__button Unlock Account
2020-07-06 09:43:12 +02:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/wipe", data: [confirm: "This is irreversible, destroying all identifying information including email. Are you sure?", method: "post"] do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-eraser
2019-12-20 01:00:09 +01:00
span.admin__button Wipe PII
2020-07-06 09:43:12 +02:00
2020-11-26 21:21:24 +01:00
= if can?(@conn, :edit, %Philomena.ArtistLinks.ArtistLink{}) do
2020-07-06 09:43:12 +02:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/profiles/#{@user}/artist_links/new" do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-link
2020-11-24 22:23:35 +01:00
span.admin__button Add Artist Link
2019-12-20 01:00:09 +01:00
2023-11-23 17:07:49 +01:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/force_filter/new" do
2023-11-23 17:07:49 +01:00
i.fas.faw-fw.fa-filter
span.admin__button Force Filter
2019-12-20 01:00:09 +01:00
2022-03-21 19:08:06 +01:00
ul.profile-admin__options__column
2019-12-20 01:00:09 +01:00
= if can?(@conn, :index, Philomena.Users.User) do
2019-12-17 06:44:24 +01:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/api_key", data: [confirm: "Are you really, really sure?", method: "delete"] do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-key
2019-12-20 01:00:09 +01:00
span.admin__button Reset API key
2022-03-21 19:08:06 +01:00
li
= if @user.verified do
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/verification", data: [confirm: "Are you really, really sure?", method: "delete"] do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-user-times
2022-03-21 19:08:06 +01:00
span.admin__button Revoke Verification
- else
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/verification", data: [confirm: "Are you really, really sure?", method: "create"] do
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-user-check
2022-03-21 19:08:06 +01:00
span.admin__button Grant Verification
2022-05-04 03:24:23 +02:00
ul.profile-admin__options__column
= if can?(@conn, :index, Philomena.Users.User) do
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/votes", data: [confirm: "Are you really, really sure?", method: "delete"] do
2024-05-20 22:30:41 +02:00
i.far.icon--padded.small.fa-file-excel
2022-05-04 03:24:23 +02:00
span.admin__button Remove All Votes/Faves
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/admin/users/#{@user}/downvotes", data: [confirm: "Are you really, really sure?", method: "delete"] do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-arrow-down
2022-05-04 03:24:23 +02:00
span.admin__button Remove All Downvotes
2022-05-11 22:41:53 +02:00
= if @user.role == "user" and can?(@conn, :revert, Philomena.TagChanges.TagChange) do
2022-05-04 03:24:23 +02:00
li
2024-06-06 22:28:35 +02:00
= link to: ~p"/tag_changes/full_revert?#{[user_id: @user.id]}", data: [confirm: "Are you really, really sure?", method: "create"] do
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-tag
2022-05-04 03:24:23 +02:00
span.admin__button Revert All Tag Changes