cirandas.net

ref: master

app/views/shared/_list_groups.html.erb


    <% for group in groups %>
  • <%= profile_image_link(group, :portrait, 'div') %>
    <%= group.name %>
    <%= raw _('Role: %s') % rolename_for(profile, group) + '
    ' if profile.role_assignments.find_by(resource_id: group.id) %> <%= _('Type: %s') % _(group.class.identification) %>
    <%= raw _('Description: %s') % group.description + '
    ' if group.community? %> <%= _('Members: %s') % group.members_count.to_s %>
    <%= _('Created at: %s') % show_date(group.created_at) unless group.enterprise? %>
    <%= button_bar do %> <% if user.has_permission?(:edit_profile, group) %> <%= button 'menu-ctrl-panel', _('Control panel of this group'), group.admin_url %> <% end %> <%= button 'menu-logout', _('Leave community'), group.leave_url(true), :class => 'leave-community' %> <% if (user.has_permission?(:destroy_profile, group) && !environment.enabled?('forbid_destroy_profile')) || user.is_admin?(environment) %> <%= button 'delete', _('Remove'), { :controller => 'profile_editor', :action => 'destroy_profile', :profile => group.identifier } %> <% end %> <% end %>

  • <% end %>