<div class="autoscroll">
<table class="list time-entries">
  <thead>
         <tr>
				<th class="lbl-txt-align">#</th>
				<%= sort_header_tag('product_name', :caption => l(:field_name), class: "lbl-txt-align") %>
				<%= sort_header_tag('category', :caption => l(:field_category), class: "lbl-txt-align") %>
				<%= sort_header_tag('uom', :caption => l(:label_uom), class: "lbl-txt-align") %>
				<th></th>
         </tr>
  </thead>
  <tbody>
     <% @productEntries.each do |entry| %>
          <tr>
			  <td class="lbl-txt-align"><%=h entry.id %></td>
			  <td class="lbl-txt-align"><%=h entry.name  %></td>
		      <td class="lbl-txt-align"><%=h entry.category.name %></td>
			  <td class="lbl-txt-align"><%=h entry.uom.short_desc unless entry.uom.blank? %></td>
			  <td align="center">
                 <%= link_to image_tag('edit.png'), {:controller => controller.controller_name, :action => 'edit', :product_id => entry.id, id: entry.id}, :title => l(:button_edit) %>
				 <% if controller.hasDeletePermission %>
				<%= link_to image_tag('delete.png'), {:controller => controller.controller_name, :action => 'destroy', :product_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>

