<% max_favorites = 5 %>

<h2 class="spacer-bottom"><%= message('my_profile.favorites.title') -%></h2>
<table class="data js-account-favorites">
  <% current_user.favourites.each_with_index do |f, index | %>
    <tr <% if index >= max_favorites %>class="hidden"<% end %>>
      <td class="thin"><%= link_to_favourite f -%></td>
      <td><%= qualifier_icon f %> <%= link_to_resource f %></td>
    </tr>
  <% end %>
</table>
<% if current_user.favourites.size > max_favorites %>
<div class="spacer-top little-spacer-left">
  <a class="js-show-all-favorites" href="#">Show All</a>
</div>
<% end %>
