<% javascript 'event_filter.js' %> <% content_for :subnav_items do %> <%= render 'subnav_item', link_text: 'Events', destination_path: events_path %> <%= render 'subnav_item', link_text: 'Calendar', destination_path: events_calendar_path(year: params[:year], month: params[:month], date: params[:date]) %> <% end %>

Calendar

<%= render 'filter' %> <%= link_to 'Create Event', '#', { data: { toggle: 'modal', target: '#modal-interface-picker' }, class: 'btn btn-primary new-record' } %>
<% if @market_context_ids.present? %> <%= link_to events_calendar_path(destination_date_params(@date_string)), class: 'clear-filter-params' do %> Clear Filter Parameters <% end %> <% end %>
<%= link_to '<', events_calendar_path(destination_date_params(@week_range[0] - 1.week).merge(market_context_ids: @market_context_ids)), class: "week-increment btn btn-primary" %> <%= link_to '>', events_calendar_path(destination_date_params(@week_range[0] + 1.week).merge(market_context_ids: @market_context_ids)), class: "week-increment btn btn-primary" %> <%= "Week of #{ @week_range[0].strftime("%B #{ @week_range[0].day.ordinalize }, %Y") }" %>
<% ["12am", "1am", "2am", "3am", "4am", "5am", "6am", "7am", "8am", "9am", "10am", "11am", "12pm", "1pm", "2pm", "3pm", "4pm", "5pm", "6pm", "7pm", "8pm", "9pm", "10pm", "11pm"].each do |hour| %>
<%= hour %>
<% end %>
<% @array_of_dates_in_week_range.each do |date| %>
"> <%= "#{ date.strftime("%a %-m/%-d") }" %> <% @events_by_day_of_week[date.strftime("%A")].each do |event_package| %> <%= render partial: 'calendar_event', locals: { user_time_zone: @time_zone, event: event_package[:event], meta_styles: event_package[:meta_styles] } %> <% end %>
<% end %>
<%= render 'modal_event_interface_picker' %>