<%= link_to "<< back to stats", stats_events_path(owner_type: current_owner_type) %>

Detailed Statistics

<% if available_event_sources.first.present? %> <% @sourced_occurrences.keys.each do |source| %> <% @sourced_occurrences[source].keys.reverse.each do |time_period| %> <% end %> <% end %> <% end %> <% @occurrences[params[:event]].keys.reverse.each do |time_period| %> <% end %>
Source overall year month week day
<%= source %><%= @sourced_occurrences[source][time_period] %> <%= relative_occurrences(@sourced_occurrences[source], time_period) %>
All<%= @occurrences[params[:event]][time_period] %> <%= relative_occurrences(@occurrences[params[:event]], time_period)%>

Detailed Statistics for <%= current_year %> per month

<%= form_tag details_events_path, method: :get do %> <%= hidden_field_tag :owner_type, current_owner_type %> <%= hidden_field_tag :event, current_event %> <%= select_tag :year, options_for_select(available_years, selected: current_year), onchange: "submit();", class: "form-control" %> <% end %>
<% month_name_array.each do |month| %> <% end %> <% if available_event_sources? %> <% @event_selected_year_occurrences.keys.reject { |k| k == "All" }.each do |source| %> <% @event_selected_year_occurrences[source].keys.reject.each do |month| %> <% end %> <% end %> <% end %> <% @event_selected_year_occurrences["All"].keys.each do |month| %> <% end %>
Event Source<%= link_to month, monthly_details_events_path(owner_type: current_owner_type, event: current_event, month: month, year: current_year, time_interval: "month") %>
<%= source %><%= @event_selected_year_occurrences[source][month] %>
All<%= @event_selected_year_occurrences["All"][month] %>