<% @contact = Contact.visible.find(:first, :conditions => ["#{Contact.table_name}.email LIKE ?", "%#{@user.mail}%" ]) %>

<%= l(:label_contact) %>

<% unless @contact.blank? || !@contact.visible? %>
<% if @contact.phones.any? || @contact.emails.any? %> <% end %>
<%= link_to avatar_to(@contact, :size => "50"), contact_url(@contact), :id => "avatar", :title => @contact.name %>

<%= h @contact.name %>

<%= h @contact.job_title %> <% if !@contact.is_company %> <%= " #{l(:label_at_company)} " unless (@contact.job_title.blank? or @contact.company.blank?) %> <% if @contact.contact_company %> <%= link_to @contact.contact_company.name, {:controller => 'contacts', :action => 'show', :project_id => @contact.contact_company.project(@project), :id => @contact.contact_company.id } %> <% else %> <%= h @contact.company %> <% end %> <% end %>

<%= render :partial => 'contacts/form_tags' %>
    <% if @contact.phones.any? %>
  • <%= @contact.phones.first %>
  • <% end %> <% if @contact.emails.any? %> <% end %>
<% end %> <% content_for :header_tags do %> <%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %> <%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %> <% end %>