2020-04-30 11:35:22 -07:00
|
|
|
.profile__actions
|
2020-05-10 00:08:58 -07:00
|
|
|
- type ||= :nil
|
|
|
|
- if user_signed_in? && user == current_user
|
2022-06-26 10:46:32 -07:00
|
|
|
%a.btn.btn-dark.btn-block{ href: settings_profile_path } Edit profile
|
2020-05-10 00:08:58 -07:00
|
|
|
- elsif user_signed_in?
|
|
|
|
- if current_user.following? user
|
|
|
|
%button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name } }
|
2022-07-30 10:58:49 -07:00
|
|
|
= t("voc.unfollow")
|
2020-04-30 11:35:22 -07:00
|
|
|
- else
|
2020-05-10 00:08:58 -07:00
|
|
|
%button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name } }
|
2022-07-30 10:58:49 -07:00
|
|
|
= t("voc.follow")
|
2020-05-10 00:08:58 -07:00
|
|
|
.btn-group.btn-block
|
|
|
|
%button.btn.btn-light.btn-block.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
2022-07-30 09:50:46 -07:00
|
|
|
= t(".title")
|
2020-05-10 00:08:58 -07:00
|
|
|
%span.caret
|
|
|
|
.dropdown-menu
|
2020-05-25 09:04:54 -07:00
|
|
|
%a.dropdown-item.d-block.d-sm-none{ href: '#', data: { target: '#modal-list-memberships', toggle: :modal } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-list.fa-fw
|
2022-07-30 11:14:02 -07:00
|
|
|
= t(".list")
|
2022-06-09 14:08:38 -07:00
|
|
|
- if current_user.blocking?(user)
|
|
|
|
%a.dropdown-item{ href: '#', data: { action: :unblock, target: user.screen_name } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-minus-circle.fa-fw
|
2022-07-30 09:50:46 -07:00
|
|
|
%span.pe-none= t("voc.unblock")
|
2022-06-09 14:08:38 -07:00
|
|
|
- else
|
|
|
|
%a.dropdown-item{ href: '#', data: { action: :block, target: user.screen_name } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-minus-circle.fa-fw
|
2022-07-30 09:50:46 -07:00
|
|
|
%span.pe-none= t("voc.block")
|
2022-12-27 18:00:52 -08:00
|
|
|
- if current_user.muting?(user)
|
|
|
|
%a.dropdown-item{ href: '#', data: { action: :unmute, target: user.screen_name } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-volume-off.fa-fw
|
2022-12-27 18:00:52 -08:00
|
|
|
%span.pe-none= t("voc.unmute")
|
|
|
|
- else
|
|
|
|
%a.dropdown-item{ href: '#', data: { action: :mute, target: user.screen_name } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-volume-off.fa-fw
|
2022-12-27 18:00:52 -08:00
|
|
|
%span.pe-none= t("voc.mute")
|
2020-05-10 00:08:58 -07:00
|
|
|
%a.dropdown-item{ href: '#', data: { action: 'report-user', target: user.screen_name } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-exclamation-triangle.fa-fw
|
2022-07-30 09:50:46 -07:00
|
|
|
= t("voc.report")
|
2020-05-10 00:08:58 -07:00
|
|
|
- if current_user.mod?
|
|
|
|
%a.dropdown-item{ href: '#', data: { target: '#modal-privileges', toggle: :modal } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-wrench.fa-fw
|
2022-07-30 09:50:46 -07:00
|
|
|
= raw t(".privilege", user: user.screen_name)
|
2022-12-17 18:21:25 -08:00
|
|
|
- unless user.has_cached_role?(:administrator)
|
2020-05-10 00:08:58 -07:00
|
|
|
%a.dropdown-item{ href: '#', data: { target: '#modal-ban', toggle: :modal } }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-ban.fa-fw
|
2022-07-30 09:50:46 -07:00
|
|
|
= t(".ban")
|
2022-06-19 15:59:47 -07:00
|
|
|
- if current_user.mod? && user != current_user
|
|
|
|
%a.dropdown-item{ href: mod_inbox_index_path(user: user.screen_name) }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-inbox.fa-fw
|
2022-07-30 09:50:46 -07:00
|
|
|
= t(".view_inbox")
|
2022-12-17 18:21:25 -08:00
|
|
|
- if current_user.has_cached_role? :administrator
|
2021-08-06 04:38:24 -07:00
|
|
|
%a.dropdown-item{ href: rails_admin_path_for_resource(user), target: '_blank' }
|
2023-01-03 08:17:24 -08:00
|
|
|
%i.fa.fa-cogs.fa-fw
|
2022-07-30 09:50:46 -07:00
|
|
|
= t("voc.view_in_rails_admin")
|