Files
nairobi/app/views/users/_following.html.erb
Javi Martín 3cd4f3827e Hide what users are following unless they allow it
It could be argued that seeing which proposals a user follows is a good
indicator of which proposals a user has supported, since we're
automatically creating follows for supported proposals since commit
74fbde09f. So now, we're extending the `public_interests` funcionality,
so it only shows elements users are following if they've enabled it.

This is an improvement over using the `public_activity` attribute in two
ways:

* The `public_interests` attribute is disabled by default, so by default
  other users won't be able to see what a user is following
* Who has created proposals/debates/investments/comments is public
  information, while who is following which elements is not; so enabling
  `public_activity` shouldn't imply potentially private information should
  be displayed as well

We've considered removing the `public_interests` attribute completely
and just hiding the "following" page for everyone except its owner, but
keeping it provides more compatibility with existing installations.
2021-10-05 14:43:09 +02:00

28 lines
975 B
Plaintext

<div class="row following margin-top" data-equalizer data-equalize-on="medium">
<div class="small-12 medium-8 column" data-equalizer-watch>
<ul class="menu simple clear">
<% follows.each do |followable_type, follows| %>
<li><%= link_to followable_type_title(followable_type), "##{followable_type_title(followable_type).parameterize.underscore}" %></li>
<% end %>
</ul>
<% follows.each do |followable_type, follows| %>
<h3 id="<%= followable_type_title(followable_type).parameterize.underscore %>">
<span class="icon-<%= followable_icon(followable_type) %>"></span>
<%= followable_type_title(followable_type) %>
</h3>
<ul class="follow-list">
<% follows.each do |follow| %>
<%= render_follow(follow) %>
<% end %>
</ul>
<% end %>
</div>
<div class="small-12 medium-4 column interests" data-equalizer-watch>
<%= render "interests", user: user %>
</div>
</div>