<%= fields_for "date_pick" do |f| %> <%= f.datetime_picker :start_year_month, {:picker_type=>"date",:format=>"yyyy/MM",:label=>t("ruling_timer.start_year_month"), :value => @start_year_month} %><%= f.datetime_picker :end_year_month, {:picker_type=>"date",:format=>"yyyy/MM",:label=>t("ruling_timer.end_year_month"), :value => @end_year_month} %> <%= f.hidden_field_tag :type, "statistic" %> <%= f.submit t('submit'), class: 'btn btn-primary' %> <% end %>
<% all_count = @all_year_months_data.count %> <% @all_year_months_data.each_with_index do |(year_month,total_seconds,all_infos), i| %>

<%= year_month %>

<%= t("ruling_timer.total") %>: <%= RulingTimerTemp.transform_second_to_time(total_seconds) %>
<% all_infos.each do |info| %> <% end %>
<%= t("ruling_timer.date") %> <%= t("ruling_timer.work_time") %>
<%= info[:date] %> <%= info[:work_time_str] %>
<% if i < all_count - 1 %>
<% end %> <% end %>