_person_profile.rhtml 1.54 KB
<table>
  <tr>
    <th colspan='2'><%= _('Basic information')%></th>
  </tr>
  <%= display_field(_('Sex:'), profile, :sex) { |gender| { 'male' => _('Male'), 'female' => _('Female') }[gender] } %>
  <%= display_field(_('Date of birth:'), profile, :birth_date) { |date| show_date(date)  }%>
  <%= display_field(_('Location:'), profile, :location, true) %>

  <%= display_field(_('Type:'), profile, :privacy_setting, true) %>

  <tr>
    <td class='field-name'><%= _('Profile created at:')  %></td>
    <td><%= show_date(profile.created_at) %></td>
  </tr>

  <%= display_contact profile %>

  <% cache_timeout(profile.relationships_cache_key, 4.hours) do %>
    <%= display_work_info profile %>

    <% if !environment.enabled?('disable_asset_enterprises') && !profile.enterprises.empty? %>
      <tr>
        <th colspan='2'><%= __('Enterprises') %></th>
      </tr>
      <% profile.enterprises.includes(:environment,:domains, :preferred_domain).each do |item| %>
        <tr>
          <td></td>
          <td><%= button 'menu-enterprise', item.name, item.url %></td>
        </tr>
      <% end %>
    <% end %>

    <tr>
      <th colspan='2'><%= _('Network')%></th>
    </tr>
    <tr>
      <td><%= __('Friends') + ':' %></td>
      <td><%= link_to  profile.friends.count, { :controller => 'profile', :action => 'friends' } %></td>
    </tr>
    <tr>
      <td><%= __('Communities') + ':' %></td>
      <td><%= link_to profile.communities.count, :controller => "profile", :action => 'communities' %></td>
    </tr>

    <%= render :partial => 'common' %>

  <% end %>
</table>