- if user_signed_in? - type ||= :nil - if user == current_user %a.btn.btn-default.btn-block.profile--follow-btn{href: edit_user_profile_path} Edit profile - else - if current_user.following? user %button#editprofile.btn.btn-default.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name }} Unfollow - else %button#editprofile.btn.btn-primary.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name }} Follow - unless user == current_user .btn-group.btn-block %button.btn.btn-default.btn-block.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }} Actions %span.caret %ul.dropdown-menu / %li %a{href: '#', name: 'user-action', data: { action: :block, type: type, target: user.screen_name }} %i.fa.fa-minus-circle Block %li %a{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }} %i.fa.fa-users Manage group memberships %li %a{href: '#', data: { action: 'report-user', target: user.screen_name }} %i.fa.fa-exclamation-triangle Report - if current_user.mod? %li %a{href: '#', data: { target: "#modal-privileges", toggle: :modal }} %i.fa.fa-wrench Check = succeed "'s" do = user.screen_name privileges %li %a{href: '#', data: { target: "#modal-ban", toggle: :modal }} %i.fa.fa-wrench - if user.banned? Unban or extend ban duration - else Ban = user.screen_name