Do not show flaggable and followable buttons on budgets_investment and proposals pages when user is not logged.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
0ffa213a65
commit
97ee107157
@@ -1,37 +1,39 @@
|
||||
<span class="followable-content">
|
||||
<span class="js-follow">
|
||||
<span class="followable-content">
|
||||
|
||||
<% if show_follow_action? followable %>
|
||||
<%= link_to "##{follow_link_wrapper_id(followable)}",
|
||||
id: follow_link_wrapper_id(followable),
|
||||
title: follow_entity_text(followable),
|
||||
data: { toggle: follow_drop_id(followable) } do %>
|
||||
<%= t('shared.follow') %>
|
||||
<% if show_follow_action? followable %>
|
||||
<%= link_to "##{follow_link_wrapper_id(followable)}",
|
||||
id: follow_link_wrapper_id(followable),
|
||||
title: follow_entity_text(followable),
|
||||
data: { toggle: follow_drop_id(followable) } do %>
|
||||
<%= t('shared.follow') %>
|
||||
<% end %>
|
||||
<div class="dropdown-pane" id="<%= follow_drop_id(followable) %>"
|
||||
data-dropdown data-auto-focus="true">
|
||||
<%= link_to follow_entity_text(followable),
|
||||
follows_path(followable_id: followable.id,
|
||||
followable_type: followable.class.name),
|
||||
method: :post, remote: true,
|
||||
id: follow_link_id(followable) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="dropdown-pane" id="<%= follow_drop_id(followable) %>"
|
||||
data-dropdown data-auto-focus="true">
|
||||
<%= link_to follow_entity_text(followable),
|
||||
follows_path(followable_id: followable.id,
|
||||
followable_type: followable.class.name),
|
||||
method: :post, remote: true,
|
||||
id: follow_link_id(followable) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if show_unfollow_action? followable %>
|
||||
<% follow = followable.follows.where(user: current_user).first %>
|
||||
<%= link_to "##{unfollow_link_wrapper_id(followable)}",
|
||||
id: unfollow_link_wrapper_id(followable),
|
||||
title: unfollow_entity_text(followable),
|
||||
data: { toggle: unfollow_drop_id(followable) } do %>
|
||||
<%= t('shared.unfollow') %>
|
||||
<% if show_unfollow_action? followable %>
|
||||
<% follow = followable.follows.where(user: current_user).first %>
|
||||
<%= link_to "##{unfollow_link_wrapper_id(followable)}",
|
||||
id: unfollow_link_wrapper_id(followable),
|
||||
title: unfollow_entity_text(followable),
|
||||
data: { toggle: unfollow_drop_id(followable) } do %>
|
||||
<%= t('shared.unfollow') %>
|
||||
<% end %>
|
||||
<div class="dropdown-pane" id="<%= unfollow_drop_id(followable) %>"
|
||||
data-dropdown data-auto-focus="true">
|
||||
<%= link_to unfollow_entity_text(followable),
|
||||
follow_path(follow),
|
||||
method: :delete, remote: true,
|
||||
id: unfollow_link_id(followable) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="dropdown-pane" id="<%= unfollow_drop_id(followable) %>"
|
||||
data-dropdown data-auto-focus="true">
|
||||
<%= link_to unfollow_entity_text(followable),
|
||||
follow_path(follow),
|
||||
method: :delete, remote: true,
|
||||
id: unfollow_link_id(followable) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
Reference in New Issue
Block a user