<div class="autoscroll">
	<table class="list time-entries">
		<thead>
			<tr>
			  <%= sort_header_tag('acc_number', :caption => l(:label_account_number), :class => "lbl-txt-align") %>
			  <%= sort_header_tag('acc_name', :caption => l(:field_name), :class => "lbl-txt-align") %>
				<%= sort_header_tag('location_name', :caption => l(:field_location), :class => "lbl-txt-align") %>
				<th class="lbl-txt-align"><%= l(:label_address) %></th>
				<th class="lbl-txt-align"><%= l(:label_work_phone) %></th>
				<%= sort_header_tag('country', :caption => l(:label_country), :class => "lbl-txt-align") %>
				<%= sort_header_tag('city', :caption => l(:label_city), :class => "lbl-txt-align") %>
				<th></th>
			</tr>
		</thead>
		<tbody>
			<% @account_entries.each do |entry| %>
				<tr>
					  <td class="lbl-txt-align"><%=h entry.account_number %></td>
					  <td class="lbl-txt-align"><%=h entry.name %></td>
					  <td class="lbl-txt-align"><%=h entry.location_id.blank? ? "" : entry.location.name %></td>
					  <td class="lbl-txt-align"><%=h entry.address.blank? ? "" : entry.address.address1 %></td>
					  <td class="lbl-txt-align"><%=h entry.address.blank? ? "" : entry.address.work_phone %></td>
					<!--  <td class="lbl-txt-align"><%=h entry.address.blank? ? "" : entry.address.email %></td> -->
					  <td class="lbl-txt-align"><%=h entry.address.blank? ? "" : entry.address.country %></td>
					  <td class="lbl-txt-align"><%=h entry.address.blank? ? "" : entry.address.city %></td>
					  <td align="center">
						  <%= link_to image_tag('edit.png'), {:action => 'edit', :account_id => entry.id, :address_id => entry&.address&.id, id: entry.id}, :title => l(:button_edit) %>
						  <% if controller.deletePermission %>
							<%= link_to image_tag('delete.png'), {:action => 'destroy', :id => entry.id, :tab => controller.controller_name, id: entry.id}, :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
						   <% end %>
					  </td>
				</tr>
			<% end %>
		</tbody>
	</table>
</div>
<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>