index.rhtml
1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<div id="memberships-index">
<h1><%= _('Manage my groups') %></h1>
<% button_bar do %>
<%= button(:add, __('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
<%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %>
<%= button :back, _('Go back'), :controller => 'profile_editor' %>
<% end %>
<ul>
<% for membership in @memberships %>
<li>
<div class='common-profile-list-block'>
<%= profile_image_link(membership, :portrait, 'div') %>
</div>
<span class='profile-details'>
<strong><%= membership.name %></strong><br/>
<%= _('Role: %s') % rolename_for(profile, membership) %> <br/>
<%= _('Type: %s') % getterm(membership.class.identification) %> <br/>
<%= _('Description: %s') % membership.description + '<br/>' if membership.community? %>
<%= _('Members: %s') % membership.members_count.to_s %> <br/>
<%= _('Created at: %s') % show_date(membership.created_at) unless membership.enterprise? %> <br/>
<% button_bar do %>
<%= button 'menu-ctrl-panel', _('Control panel of this group'), membership.admin_url %>
<%= button 'menu-logout', _('Leave community'), 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 %>
</span>
<br class="may-clear" />
</li>
<% end %>
</ul>
</div>