Retrospring/app/views/user/_actions.html.haml

30 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-11-30 06:28:58 -08:00
- if user_signed_in?
- type ||= :nil
2014-12-08 08:10:09 -08:00
- if user == current_user
2014-12-26 04:48:20 -08:00
%a.btn.btn-default.btn-block.profile--follow-btn{href: edit_user_profile_path} Edit profile
2014-11-30 06:28:58 -08:00
- else
2014-12-08 08:10:09 -08:00
- if current_user.following? user
2014-12-26 04:48:20 -08:00
%button#editprofile.btn.btn-default.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name }}
2014-11-30 06:28:58 -08:00
Unfollow
- else
2014-12-26 04:48:20 -08:00
%button#editprofile.btn.btn-primary.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name }}
2014-12-27 09:07:25 -08:00
Follow
- unless user == current_user
2014-12-27 09:10:04 -08:00
.btn-group.btn-block
2014-12-27 09:07:25 -08:00
%button.btn.btn-default.btn-block.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
Actions
%span.caret
2014-12-27 09:14:31 -08:00
%ul.dropdown-menu
/
%li
%a{href: '#', name: 'user-action', data: { action: :block, type: type, target: user.screen_name }}
%i.fa.fa-minus-circle
Block
2015-01-13 22:07:40 -08:00
%li
%a{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
2015-01-13 22:32:43 -08:00
%i.fa.fa-users
2015-01-13 22:07:40 -08:00
Manage group memberships
2014-12-27 09:07:25 -08:00
%li
2014-12-28 16:47:04 -08:00
%a{href: '#', data: { action: 'report-user', target: user.screen_name }}
2014-12-27 09:07:25 -08:00
%i.fa.fa-exclamation-triangle
Report