<%= profile_image_link(membership, :portrait, 'div') %>
<%= membership.name %>
<%= _('Role: %s') % rolename_for(profile, membership) %>
<%= _('Type: %s') % getterm(membership.class.name) %>
<%= _('Description: %s') % membership.description + '
' if membership.community? %>
<%= _('Members: %s') % membership.members.size.to_s %>
<%= _('Created at: %s') % show_date(membership.created_at) unless membership.enterprise? %>
<% button_bar do %>
<%= button 'menu-ctrl-panel', _('Control panel of this group'), membership.admin_url %>
<%= button 'menu-logout', _('Leave'), membership.leave_url(true), :class => 'leave-community' %>
<% if (membership.community? && user.has_permission?(:destroy_profile, membership)) %>
<%= button 'delete', _('Remove'), { :controller => 'profile_editor', :action => 'destroy_profile', :profile => membership.identifier } %>
<% end %>
<% end %>
<% end %>