index.rhtml
2.02 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
63
64
65
66
67
68
69
<% if profile.enterprise? && !profile.enabled? && !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>
<div id='profile-disabled'>
<%= environment.message_for_disabled_enterprise %>
</div>
<% end %>
<h1><%= profile.name %></h1>
<% if @action %>
<%= render :partial => 'private_profile' %>
<% end %>
<table class='profile'>
<%= render :partial => partial_for_class(profile.class) %>
<% unless @action %>
<% cache_timeout(profile.identifier + '-profile-general-info', 4.hours.from_now) do %>
<tr>
<th colspan='2'>
<%= _('Content') %>
</th>
</tr>
<% profile.blogs.each do |blog| %>
<tr>
<td><%= blog.name + ':' %></td>
<td>
<%= link_to(n_('One post', '%{num} posts', blog.posts.count) % { :num => blog.posts.count }, blog.url) %>
</td>
</tr>
<% end %>
<% profile.image_galleries.each do |gallery| %>
<tr>
<td><%= gallery.name + ':' %></td>
<td>
<%= link_to(n_('One picture', '%{num} pictures', gallery.images.count) % { :num => gallery.images.count }, gallery.url) %>
</td>
</tr>
<% end %>
<tr>
<td><%= _('Events:') %></td>
<td>
<%= link_to profile.events.count, :controller => 'events', :action => 'events' %>
</td>
</tr>
<tr>
<td>
<%= _('Tags:') %>
</td>
<td>
<%= tag_cloud @tags, :id, { :action => 'tag' }, :max_size => 18, :min_size => 10%>
</td>
</tr>
<% if !environment.enabled?('disable_categories') && !profile.interests.empty? %>
<tr>
<th colspan='2'><%= _('Interests') %></th>
</tr>
<% profile.interests.each do |item| %>
<tr>
<td></td>
<td><%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %></td>
</tr>
<% end %>
<% end %>
<% end %>
<% end %>
</table>