diff --git a/app/views/profile/_person.rhtml b/app/views/profile/_person.rhtml index 0769e58..767262c 100644 --- a/app/views/profile/_person.rhtml +++ b/app/views/profile/_person.rhtml @@ -4,62 +4,62 @@ <%= display_field(_('Name:'), profile, :name) { |name| link_to name, profile.url } %> <%= 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) %> - - <%= _('Contact')%> - <% if profile == user || profile.friends.include?(user) %> + + <%= _('Contact')%> + <%= display_field(_('Address:'), profile, :address) %> <%= display_field(_('ZIP code:'), profile, :zip_code) %> <%= display_field(_('Contact phone:'), profile, :contact_phone) %> <%= display_field(_('e-Mail:'), profile, :email) { |email| link_to_email(email) } %> <% end %> -<%= display_field(_('Location:'), profile, :location) %> -<% if !(profile.organization.blank? && profile.organization_website.blank?) %> - - <%= _('Work')%> - -<% end %> -<%= display_field(_('Organization:'), profile, :organization) %> -<%= display_field(_('Organization website:'), profile, :organization_website) { |url| link_to(url, url) }%> - - -<% if !profile.enterprises.empty? %> - - <%= __('Enterprises') %> - - <% profile.enterprises.each do |item| %> +<% cache_timeout(profile.identifier + '-profile-relationships', 4.hours.from_now) do %> + <% if !(profile.organization.blank? && profile.organization_website.blank?) %> - - <%= button 'menu-enterprise', item.name, item.url %> + <%= _('Work')%> <% end %> -<% end %> + <%= display_field(_('Organization:'), profile, :organization) %> + <%= display_field(_('Organization website:'), profile, :organization_website) { |url| link_to(url, url) }%> - - <%= _('Network')%> - - - - <%= link_to __('Friends') + (' (%d)' % profile.friends.count), { :controller => 'profile', :action => 'friends' } %> - - - <%= link_to __('Communities') + (' (%d)' % profile.communities.count), :controller => "profile", :action => 'communities' %> - - - + <% if !profile.enterprises.empty? %> + + <%= __('Enterprises') %> + + <% profile.enterprises.each do |item| %> + + + <%= button 'menu-enterprise', item.name, item.url %> + + <% end %> + <% end %> -<% if !environment.enabled?('disable_categories') && !profile.interests.empty? %> - <%= _('Interests') %> + <%= _('Network')%> + + + + <%= link_to __('Friends') + (' (%d)' % profile.friends.count), { :controller => 'profile', :action => 'friends' } %> - <% profile.interests.each do |item| %> + + + <%= link_to __('Communities') + (' (%d)' % profile.communities.count), :controller => "profile", :action => 'communities' %> + + + <% if !environment.enabled?('disable_categories') && !profile.interests.empty? %> - - <%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %> + <%= _('Interests') %> + <% profile.interests.each do |item| %> + + + <%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %> + + <% end %> <% end %> + <% end %> diff --git a/app/views/profile/index.rhtml b/app/views/profile/index.rhtml index cf95000..481b494 100644 --- a/app/views/profile/index.rhtml +++ b/app/views/profile/index.rhtml @@ -4,31 +4,31 @@ <% end %> -<% cache_timeout(profile.identifier + '-profile', 30.minutes.from_now) do %>

<%= _("%s's profile") % profile.name %>

<%= render :partial => partial_for_class(profile.class) %> - - - - - - - - - - - + <% cache_timeout(profile.identifier + '-profile-general-info', 4.hours.from_now) do %> + + + + + + + + + + + + <% end %>
- <%= _('Content') %> -
- <%= _('Content published:') %> - - <%= link_to _('Site map'), :controller => 'profile', :action => 'sitemap' %> -
- <%= _('Tags:') %> - - <%= tag_cloud @tags, :id, { :action => 'tag' }, :max_size => 18, :min_size => 10%> -
+ <%= _('Content') %> +
+ <%= _('Content published:') %> + + <%= link_to _('Site map'), :controller => 'profile', :action => 'sitemap' %> +
+ <%= _('Tags:') %> + + <%= tag_cloud @tags, :id, { :action => 'tag' }, :max_size => 18, :min_size => 10%> +
-<% end %> -- libgit2 0.21.2