Fix #72 - add follow/unfollow button to public profiles

This commit is contained in:
Eugen Rochko
2016-10-06 21:27:58 +02:00
parent 87ba52ad3f
commit 3554d638b3
7 changed files with 33 additions and 1 deletions

View File

@ -1,4 +1,11 @@
.card{ style: "background-image: url(#{@account.header.url(:medium)})" }
- if user_signed_in? && current_account.id != @account.id
.controls
- if current_account.following?(@account)
= link_to 'Unfollow', unfollow_account_path(@account), data: { method: :post }, class: 'button'
- else
= link_to 'Follow', follow_account_path(@account), data: { method: :post }, class: 'button'
.avatar= image_tag @account.avatar.url(:large)
%h1.name
= display_name(@account)