Sha256: 83aaae9d07840d1d10cc1e9231c1aad08810251c4662954ed6dbb95590324ce8

Contents?: true

Size: 810 Bytes

Versions: 3

Compression:

Stored size: 810 Bytes

Contents

module Admin::CalendarsHelper

  def link_to_previous_admin_calendar_month(date, url_for_options)
    date = date.advance(:months => -1)
    calendar = params[:calendar] ? params[:calendar] : nil
    link_to('« Previous Month'.html_safe, admin_list_spud_calendar_events_path(:month => date.month, :year => date.year, :calendar => calendar), :class => 'spud_events_calendar_link previous_calendar btn').html_safe
  end

  def link_to_next_admin_calendar_month(date, url_for_options)
    date = date.advance(:months => 1)
    calendar = params[:calendar] ? params[:calendar] : nil
    link_to('Next Month »'.html_safe, admin_list_spud_calendar_events_path(:month => date.month, :year => date.year, :calendar => calendar), :class => 'spud_events_calendar_link next_calendar btn').html_safe
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_events-1.1.2 app/helpers/admin/calendars_helper.rb
tb_events-1.1.1 app/helpers/admin/calendars_helper.rb
tb_events-1.1.0 app/helpers/admin/calendars_helper.rb