improves styles for follow button

This commit is contained in:
decabeza
2017-12-07 11:12:46 +01:00
parent 39def428b5
commit e9ad4b49fb
5 changed files with 14 additions and 11 deletions

View File

@@ -131,6 +131,9 @@
} %>
<% if current_user %>
<div class="sidebar-divider"></div>
<p class="sidebar-title"><%= t("shared.follow") %></p>
<%= render 'follows/follow_button', follow: find_or_build_follow(current_user, investment) %>
<% end %>

View File

@@ -1,24 +1,19 @@
<span class="js-follow">
<div class="js-follow">
<span class="followable-content">
<% if follow.followable.followed_by?(current_user) %>
<%= link_to t('shared.unfollow'),
<%= link_to t('shared.following'),
follow_path(follow),
method: :delete, remote: true,
title: unfollow_text(follow.followable),
class: 'button hollow' %>
class: 'button expanded' %>
<% else %>
<%= link_to t('shared.follow'),
<%= link_to follow_text(follow.followable),
follows_path(followable_id: follow.followable.id,
followable_type: follow.followable.class.name),
method: :post, remote: true,
title: follow_text(follow.followable),
class: 'button hollow' %>
class: 'button hollow expanded' %>
<% end %>
</span>
</span>
</div>

View File

@@ -182,6 +182,9 @@
} %>
<% if current_user %>
<div class="sidebar-divider"></div>
<p class="sidebar-title"><%= t("shared.follow") %></p>
<%= render 'follows/follow_button', follow: find_or_build_follow(current_user, @proposal) %>
<% end %>

View File

@@ -569,6 +569,7 @@ en:
collective: Collective
flag: Flag as inappropriate
follow: "Follow"
following: "Following"
follow_entity: "Follow %{entity}"
followable:
budget_investment:

View File

@@ -566,6 +566,7 @@ es:
collective: Colectivo
flag: Denunciar como inapropiado
follow: "Seguir"
following: "Siguiendo"
follow_entity: "Seguir %{entity}"
followable:
budget_investment: