<%= render "navigation", referrer: "stats" %>

Statistics

<% @occurrences.keys.each do |key| %> <% end %>
Event overall year month week day
<%= link_to key, details_events_path(event: key, owner_type: current_owner_type) %> <%= @occurrences[key][:overall] %> <%= @occurrences[key][:yearly] %> <%= @occurrences[key][:monthly] %> <%= @occurrences[key][:weekly] %> <%= @occurrences[key][:daily] %>
Total <%= @this_year_totals[:overall] %> <%= @this_year_totals[:yearly] %> <%= @this_year_totals[:monthly] %> <%= @this_year_totals[:weekly] %> <%= @this_year_totals[:daily] %>

Statistics for <%= current_year %> per month

<%= form_tag stats_events_path, method: :get do %> <%= hidden_field_tag :owner_type, current_owner_type %> <%= select_tag :year, options_for_select(available_years, selected: current_year), onchange: "submit();", class: "form-control" %> <% end %>
<% month_name_array.each do |month| %> <% end %> <% @selected_year_occurrences.keys.each do |event| %> <% @selected_year_occurrences[event].keys.each do |month| %> <% end %> <% end %> <% @selected_year_totals.keys.each do |month| %> <% end %>
Event<%= month %>
<%= event %><%= @selected_year_occurrences[event][month] %>
Total<%= @selected_year_totals[month] %>