profile_info.rhtml
1.65 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
<div class="vcard">
<h2 class="<%= profile.class == Person ? 'fn' : 'org' %>"><%= h block.owner.short_name %></h2>
<div class="profile-info-picture">
<div class="profile-info-picture-inner1">
<span class="profile-info-picture-inner2">
<%=
profile_image(block.owner, :thumb) +"\n"+
profile_sex_icon( profile ) +
profile_cat_icons( profile )
%>
</span>
</div>
</div>
<ul class="profile-info-data" id="profile-info-data-<%= block.id %>">
<li><%= link_to __('Homepage'), block.owner.url, :class => 'url' %></li>
<li><%= link_to _('View profile'), block.owner.public_profile_url %></li>
<% if block.owner.enterprise? && !block.owner.environment.enabled?('disable_products_for_enterprises') %>
<li><%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) %></li>
<% end %>
<li id="profile-admin-url-<%= block.id %>"></li>
<% if profile.person? %>
<li><%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %></li>
<% end %>
</ul>
<% if profile.respond_to? :city %>
<div class="adr">
<%=
[ [ profile.city, 'locality' ],
[ profile.state, 'region' ],
[ profile.country_name, 'country-name' ]
].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
%>
</div>
<% end %>
<div class="profile-info-options" id="profile-info-options-<%= block.id %>"></div>
</div><!-- end class="vcard" -->
<script type="text/javascript">
<%= remote_function :url => { :controller => 'profile', :profile => profile.identifier, :action => 'profile_info', :block_id => block.id } %>
</script>