_profile.rhtml
1.82 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
<li class="search-profile-item">
<% if @empty_query or multiple_search? or !profile.enterprise? %>
<%= profile_image_link profile, :portrait, 'div',
@filter == 'more_recent' ? profile.send(@filter + '_label') + show_date(profile.created_at) : profile.send(@filter + '_label') %>
<% else %>
<div class="search-enterprise-item">
<div class="search-enterprise-item-column-left">
<%= profile_image_link profile, :portrait, 'div' %>
</div>
<div class="search-enterprise-item-column-right">
<%= link_to_homepage(profile.name, profile.identifier, :class => "search-result-title") %>
<div class="search-enterprise-description">
<% if profile.description %>
<% body_stripped = strip_tags(profile.description) %>
<% elsif profile.home_page and profile.home_page.body %>
<% body_stripped = strip_tags(profile.home_page.body) %>
<% end %>
<%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %>
</div>
<div class="search-enterprise-region">
<span class="search-enterprise-region-label"><%= _("City") %></span>
<% if profile.region %>
<span class="search-enterprise-region-name"><%= city_with_state(profile.region) %></span>
<% end %>
</div>
<div class="search-enterprise-categorization">
<% profile.top_level_categorization.each do |parent, children| %>
<div class="search-enterprise-category-<%=parent.id%> search-enterprise-category">
<span class="search-enterprise-categorization-parent"><%= parent.name %></span>
<span class="search-enterprise-categorization-children">
<%= children.collect(&:name).join(', ') %>
</span>
</div>
<% end %>
</div>
</div>
<hr class="clearfix" />
</div>
<% end %>
</li>