:ruby
  events_view ||= params[:view] || cookies[:events_view] || 'list'


- content_for :sidebar do
  #sidebar-welcome.sidebar-box= render 'site/welcome'
  #sidebar-event-details.sidebar-box
  #sidebar-filters.sidebar-box= render 'events/filters'
  #sidebar-exports.sidebar-box= render 'events/exports'

.view-switcher
  %ul
    %li= link_to t('.switcher.calendar'), params.merge(:view => 'calendar'), :class => (events_view == 'calendar' ? 'selected' : ''), :data => { :view => 'calendar' }
    %li= link_to t('.switcher.list'), params.merge(:view => 'list'), :class => (events_view == 'list' ? 'selected' : ''), :data => { :view => 'list' }

%h2.main-title= t('.title')

- cache_if(@perform_caching, CacheObserver.daily_key_for('events-index', request)) do
  .events-list{:class => events_view}= render 'events/calendar', :events => @events, :start_date => @start_date, :end_date => @end_date

:ruby
  events_view ||= params[:view] || cookies[:events_view] || 'calendar'


- content_for :sidebar do
  #sidebar-welcome.sidebar-box= render 'site/welcome'
  #sidebar-event-details.sidebar-box
  #sidebar-filters.sidebar-box= render 'events/filters'
  #sidebar-exports.sidebar-box= render 'events/exports'

.view-switcher
  %ul
    %li= link_to t('.switcher.calendar'), params.merge(:view => 'calendar'), :class => (events_view == 'calendar' ? 'selected' : ''), :data => { :view => 'calendar' }
    %li= link_to t('.switcher.list'), params.merge(:view => 'list'), :class => (events_view == 'list' ? 'selected' : ''), :data => { :view => 'list' }

%h2.main-title= t('.title')

.events-list{:class => events_view}
  - cache_if(@perform_caching, CacheObserver.daily_key_for('events-index', request)) do
    = render 'events/calendar', :events => @events, :start_date => @start_date, :end_date => @end_date

Fix caching w/ list vs. cal on event index page, default to cal for now
Fix caching w/ list vs. cal on event index page, default to cal for now
