Noosfero/noosfero

View on GitHub
app/views/profile/friends.html.erb

Summary

Maintainability
Test Coverage
<div class="common-profile-list-block">

<h1><%= _("%s's friends") % profile.name %></h1>

<% cache_timeout(profile.friends_cache_key(params), 4.hours) do %>
  <ul class='profile-list'>
    <% @friends.each do |friend| %>
      <%= profile_image_link(friend) %>
    <% end%>
  </ul>

  <div id='pagination-profiles'>
    <%= pagination_links @friends, :param_name => 'npage' %>
  </div>
<% end %>

</div><!-- fim class="common-profile-list-block" -->

<%= button_bar do %>
  <%= button :back, _('Go back'), { :controller => 'profile' } %>
  <% if user == profile %>
    <%= button :edit, _('Manage my friends'), :controller => 'friends', :action => 'index', :profile => profile.identifier %>
    <%= button(:add_user, _('Invite people'), :controller => 'invite', :action => 'invite_friends') %>
  <% end %>
<% end %>