community_block.rhtml
2.05 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<div class="community-block">
<div class="community-block-logo">
<%= link_to profile_image(profile, :big), profile.url %>
</div>
<div class="community-block-info">
<h1 class="community-block-title"><%=profile.name%></h1>
<div class="community-block-description"><%= profile.description %></div>
</div>
<div style="clear:both"></div>
<div class="community-block-buttons">
<% if logged_in? %>
<% if profile.members.include?(user) || profile.already_request_membership?(user) %>
<%= button_without_text(
:remove,
__('Leave community'),
profile.leave_url,
:title => _("Leave community"),
:style => 'position: relative;') %>
<% else %>
<%= button_without_text(
:add,
__('Join community'),
profile.join_url,
:title => _("Join community"),
:style => 'position: relative;') %>
<% end %>
<% if profile.enable_contact? %>
<%= button_without_text(
:'menu-mail',
__('Send an e-mail'),
{ :profile => profile.identifier,
:controller => 'contact',
:action => 'new' },
:title => _('Send an e-mail to the administrators'),
:stle => 'position: relative;') %>
<% end %>
<%= report_abuse(profile, :button_without_text) %>
<% if !user.nil? && user.has_permission?('edit_profile', profile) %>
<%= button_without_text(
:'menu-ctrl-panel',
__('Control Panel'),
profile.admin_url,
:title => _('Configure this community'),
:style => 'position: relative;') %>
<% end %>
<% else %>
<%= button_without_text(
:add,
__('Join community'),
profile.join_not_logged_url,
:title => _("Join community"),
:style => 'position: relative;') %>
<% end %>
</div>
</div>