mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:09:52 +01:00
added user/actions partial
This commit is contained in:
parent
d4c1ce83de
commit
81c4f14a62
1 changed files with 10 additions and 0 deletions
10
app/views/user/_actions.html.haml
Normal file
10
app/views/user/_actions.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
- if user_signed_in?
|
||||
- if @user == current_user
|
||||
%a.btn.btn-default.btn-block{href: edit_user_profile_path} Edit profile
|
||||
- else
|
||||
- if current_user.following? @user
|
||||
%button#editprofile.btn.btn-default.btn-block{type: :button, name: 'user-action', 'data-action' => :unfollow, 'data-target' => @user.screen_name}
|
||||
Unfollow
|
||||
- else
|
||||
%button#editprofile.btn.btn-primary.btn-block{type: :button, name: 'user-action', 'data-action' => :follow, 'data-target' => @user.screen_name}
|
||||
Follow
|
Loading…
Reference in a new issue