<%= stylesheet_link_tag 'wk-time', :plugin => "redmine_wktime" %>
<div class="autoscroll">
<table class="list time-entries">
  <thead>
         <tr>
				<th class="lbl-txt-align"><%= l(:field_name)   %></th>
				<th class="lbl-txt-align"><%=  l(:label_account_name) %></th>
				<th class="lbl-txt-align"><%=  l(:field_title)  %></th>
				<th class="lbl-txt-align"><%=  l(:field_mail)  %></th>
				<th class="lbl-txt-align"><%=  l(:label_work_phone)   %></th>
				<th class="lbl-txt-align"><%=  l(:field_assigned_to)  %></th>
				<th class="lbl-txt-align"><%= l(:label_modified).capitalize %></th>
				<th></th>
         </tr>
  </thead>
   <tbody>
	<% contacts.each do |entry| %>
		<tr>
		    <td class="lbl-txt-align"><%=h entry.name  %></td>
			<td class="lbl-txt-align"><%=h entry.account.name unless entry.account.blank?  %></td>
			<td class="lbl-txt-align"><%=h entry.title unless entry.title.blank?  %></td>
			<td class="lbl-txt-align"><%=h entry.address.email unless entry.address.blank? %></td>
			<td class="lbl-txt-align"><%=h entry.address.work_phone unless entry.address.blank? %></td>
			<td class="lbl-txt-align"><%=h entry.assigned_user.name(:firstname_lastname) unless  entry.assigned_user.blank? %></td>
			<td class="lbl-txt-align"><%=h entry.updated_at.localtime.strftime("%Y-%m-%d") %></td>
			<td class="lbl-txt-align"><%= link_to image_tag('edit.png'), {:controller => controller_name, :action => 'edit', :contact_id => entry.id, :tab => controller_name}, :title => l(:button_edit) %>
							<%= link_to image_tag('delete.png'), {:controller => controller_name, :action => 'destroy', :contact_id => entry.id, :tab => controller_name},  :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %></td>
		</tr>
	<% end %>
   </tbody>
</table>
</div>