This repository has been archived on 2024-12-01. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_rodax_crm/app/views/users/_contact.html.erb
2012-01-03 16:18:32 +00:00

49 lines
1.7 KiB
Plaintext

<% @contact = Contact.visible.find(:first, :conditions => ["#{Contact.table_name}.email LIKE ?", "%#{@user.mail}%" ]) %>
<h3><%= l(:label_contact) %></h3>
<% unless @contact.blank? || !@contact.visible? %>
<div class="contact details">
<table class="subject_header">
<tr>
<td class="avatar"><%= link_to avatar_to(@contact, :size => "50"), contact_url(@contact), :id => "avatar", :title => @contact.name %></td>
<td class="name" style="vertical-align: top;">
<h2 style="margin: 0 0 0 0;"><%= h @contact.name %></h2>
<p>
<%= 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 %>
</p>
<%= render :partial => 'contacts/form_tags' %>
</td>
<% if @contact.phones.any? || @contact.emails.any? %>
<td class="subject_info">
<ul>
<% if @contact.phones.any? %>
<li class="phone icon icon-phone"><%= @contact.phones.first %></li>
<% end %>
<% if @contact.emails.any? %>
<li class="email icon icon-email"><%= mail_to @contact.emails.first %></li>
<% end %>
</ul>
</td>
<% end %>
</tr>
</table>
</div>
<% end %>
<% content_for :header_tags do %>
<%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %>
<%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %>
<% end %>