<h2><%= l(:label_models) %></h2>
<%= stylesheet_link_tag 'wk-time', :plugin => "redmine_wktime" %>
 <div class="wk-contextual">
        <%= link_to l(:label_new_model), url_for(:controller => controller_name, :action => 'edit_product_model', :brand_id => brand.id), :class => 'icon icon-add' %>
 </div>
<% unless @productModelEntries.blank? %>
	<div class="autoscroll">
	<table class="list time-entries">
	  <thead>
			 <tr>
					<th class="lbl-txt-align">#</th>
					<th class="lbl-txt-align"><%= l(:field_name) %></th>
					<th class="lbl-txt-align"><%= l(:label_product) %></th>
					<th class="lbl-txt-align"><%= l(:field_description) %></th>
					<th></th>
			 </tr>
	  </thead>
	  <tbody>
		<% @productModelEntries.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.product.name  %></td>
				<td class="lbl-txt-align"><%=h entry.description %></td>
				<td align="center">
				 <%= link_to image_tag('edit.png'), {:controller => controller.controller_name, :action => 'edit_product_model', :product_model_id => entry.id, :brand_id => entry.brand_id, id: entry.id}, :title => l(:button_edit) %>
				 <% if controller.hasDeletePermission %>
					<%= link_to image_tag('delete.png'), {:controller => controller.controller_name, :action => 'destroyProductModel', :product_model_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>
<% else %>
	<label><b><%= l(:label_no_data) %></b></label>
<% end %>

