<%= title l(:label_public_holiday) %>
<div class="contextual">
	<%= render :partial => 'wkattendance/sidebar' %>
</div>
<%= render partial: "wkattendance/render_hr_tabs" %>

<%= form_tag({:controller => controller_name, :action => 'index'},  :method => :get, :id => 'query_form') do %>
	<%=h hidden_field_tag('tab', "#{controller_name}") %>
	<%= hidden_field_tag "searchlist", "#{controller_name}" %>
	<% locId = controller.getSession(:location_id).blank? ? @locationId : controller.getSession(:location_id) %>

	<fieldset>
		<legend><%= l(:label_filter_plural) %></legend>
		<label><%= l(:field_location) %></label>&nbsp;
		<%=h select_tag("location_id", selectLocation(WkLocation ,locId)) %>&nbsp;
		<%= label_tag('month', l(:label_month)) %>&nbsp;
		<%= select_month(controller.getSession(:month).to_i, :prefix => "month", :include_blank => true, :discard_type => true ) %>&nbsp;
		<%= label_tag('year', l(:label_year)) %>&nbsp;
		<%= select_year(controller.getSession(:year).to_i, :prefix => "year", :discard_type => true ) %>&nbsp;
		<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>&nbsp;
		<%= link_to l(:button_clear), { project_id: @project, set_filter: 1, clear: true }, class: 'icon icon-reload' %>
		<% if @month > 0 %>
			<div style="float:right">
				<%= link_to_previous_month(@year, @month, :accesskey => accesskey(:previous)) %> | <%= link_to_next_month(@year, @month,
					:accesskey => accesskey(:next)) %>
			</div>
		<% end %>
	</fieldset>
<% end %>

<%= render :partial => 'wkpublicholiday/ph_index'%>
<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
<% other_formats_links do |f| %>
	<%= f.link_to_with_query_parameters 'CSV', {} %>
<% end %>