56 lines
2.8 KiB
Plaintext
56 lines
2.8 KiB
Plaintext
.profile__actions
|
|
- type ||= :nil
|
|
- own_followings ||= nil
|
|
- own_blocks ||= nil
|
|
- own_mutes ||= nil
|
|
- if user_signed_in? && user == current_user
|
|
.d-grid
|
|
%a.btn.btn-dark{ href: settings_profile_path } Edit profile
|
|
- elsif user_signed_in?
|
|
.d-grid.gap-2
|
|
- if own_followings&.include?(user.id) || current_user.following?(user)
|
|
= render "relationships/destroy", type: "follow", screen_name: user.screen_name
|
|
- else
|
|
= render "relationships/create", type: "follow", screen_name: user.screen_name
|
|
.btn-group
|
|
%button.btn.btn-light.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
|
|
= t(".title")
|
|
%span.caret
|
|
.dropdown-menu
|
|
%a.dropdown-item.d-block.d-sm-none{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } }
|
|
%i.fa.fa-list.fa-fw
|
|
= t(".list")
|
|
- if own_blocks&.include?(user.id) || current_user.blocking?(user)
|
|
= render "relationships/destroy", type: "block", screen_name: user.screen_name
|
|
- else
|
|
= render "relationships/create", type: "block", screen_name: user.screen_name
|
|
- if own_mutes&.include?(user.id) || current_user.muting?(user)
|
|
= render "relationships/destroy", type: "mute", screen_name: user.screen_name
|
|
- else
|
|
= render "relationships/create", type: "mute", screen_name: user.screen_name
|
|
%a.dropdown-item{ href: '#', data: { action: 'report-user', target: user.screen_name } }
|
|
%i.fa.fa-exclamation-triangle.fa-fw
|
|
= t("voc.report")
|
|
- if current_user.mod?
|
|
%a.dropdown-item{ href: moderation_reports_path(user: user.screen_name) }
|
|
%i.far.fa-flag.fa-fw
|
|
= t(".reports_from", user: user.screen_name)
|
|
%a.dropdown-item{ href: moderation_reports_path(target_user: user.screen_name) }
|
|
%i.fas.fa-flag.fa-fw
|
|
= t(".reports_of", user: user.screen_name)
|
|
%a.dropdown-item{ href: '#', data: { bs_target: '#modal-privileges', bs_toggle: :modal } }
|
|
%i.fa.fa-wrench.fa-fw
|
|
= t(".privilege", user: user.screen_name)
|
|
- unless user.has_cached_role?(:administrator)
|
|
%a.dropdown-item{ href: '#', data: { bs_target: '#modal-ban', bs_toggle: :modal } }
|
|
%i.fa.fa-ban.fa-fw
|
|
= t(".ban")
|
|
- if current_user.mod? && user != current_user
|
|
%a.dropdown-item{ href: mod_inbox_index_path(user: user.screen_name) }
|
|
%i.fa.fa-inbox.fa-fw
|
|
= t(".view_inbox")
|
|
- if current_user.has_cached_role? :administrator
|
|
%a.dropdown-item{ href: rails_admin_path_for_resource(user), target: '_blank' }
|
|
%i.fa.fa-cogs.fa-fw
|
|
= t("voc.view_in_rails_admin")
|