<%= title l(:label_tax) %>
<%= render partial: "wkcrmenumeration/render_settings_tabs" %>

<% name =session[controller_name].try(:[], :name) %>

 <%= form_tag({:controller => 'wktax', :action => 'index'}, :method => :get, :id => 'query_form') do %>
	<%= hidden_field_tag "searchlist", controller_name %>
	<fieldset>
		<div style="float:right">
			<%= link_to l(:label_new_tax), url_for(:controller => controller_name, :action => 'edit'), :class => 'icon icon-add' %>
		</div>
		<table>
			<tr>
				<%= hidden_field_tag "tab", "wktax" %>
				<th><label for='name'><%= l(:label_taxname) %></label></th>
					<td><%= text_field_tag 'name', name, :size => 30 %></td>
				<td><%= submit_tag l(:button_apply), :class => "small", :name => nil %></td>
				<td><%= link_to l(:button_clear), {tab: controller_name, clear: true}, :class => 'icon icon-reload' %></td>
			</tr>
		</table>
	</fieldset>
 <% end %>

<%= hidden_field_tag 'back_url', url_for(:controller => params[:controller], :action => params[:action]) %>

<% if @tax_entries.present? %>
	<%= render :partial => 'wktax/tax_list' %>
	<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
	<% other_formats_links do |f| %>
		<%= f.link_to_with_query_parameters 'CSV', {} %>
	<% end %>
<% else %>
	<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>