39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
.contain
|
|
%h1
|
|
= @profile.name
|
|
- if policy(@profile).edit?
|
|
= link_to 'Edit', edit_profile_path(@profile)
|
|
= render 'shared/follow_form' if current_user.signed_in?
|
|
%p
|
|
= @profile.summary
|
|
|
|
.social-links
|
|
- @profile.social_links.each do |social_link|
|
|
.social-link
|
|
- if policy(social_link).destroy?
|
|
.controls
|
|
= link_to '📝', edit_social_link_path(social_link)
|
|
= link_to '❌', social_link, method: :delete, data: { confirm: 'Are you sure?' }
|
|
= link_to social_link.to_icon.html_safe, social_link.to_url
|
|
- if policy(@profile).edit?
|
|
%br= link_to '+ Add Social Link', new_social_link_path(profile_id: @profile.id)
|
|
|
|
.about
|
|
.contain
|
|
%h2 About #{@profile.name}
|
|
%p= @profile.about
|
|
|
|
.stats
|
|
%p #{@profile.followers.count} Followers
|
|
|
|
- if @profile.user == current_user
|
|
%section.micropost_form
|
|
= render 'shared/micropost_form'
|
|
|
|
- if @profile.microposts.any?
|
|
%section.microposts
|
|
%h3 Posts #{@microposts.count}
|
|
%ol.microposts
|
|
= render @microposts
|
|
= will_paginate @microposts
|