Sha256: 8ddbee6e73b695aaacc7754eac065b3a81659ba2871950219ee78b0b4f93a277

Contents?: true

Size: 1.03 KB

Versions: 61

Compression:

Stored size: 1.03 KB

Contents

module CalendarHelper
  include EventCalendar::CalendarHelper
  def month_link(month_date)
    link_to(I18n.localize(month_date, :format => "%B"), {:month => month_date.month, :year => month_date.year})
  end
 
  # custom options for this calendar
  def event_calendar_opts
    { 
      :year => @year,
      :month => @month,
      :event_strips => @event_strips,
      :month_name_text => I18n.localize(@shown_month, :format => "%B %Y"),
      :previous_month_text => "<< " + month_link(@shown_month.prev_month),
      :next_month_text => month_link(@shown_month.next_month) + " >>",
      :use_all_day => true,
      :link_to_day_action => 'show'
    }
  end

  def event_calendar
    # args is an argument hash containing :event, :day, and :options
    calendar event_calendar_opts do |args|
      event, day = args[:event], args[:day]
      html = %(<a href="#{event_path(event)}" title="#{h(event.display_name.localize)}">)
      html << display_event_time(event, day)
      html << %(#{h(event.display_name.localize)}</a>)
      html
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
enju_event-0.1.17.pre21 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre20 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre19 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre18 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre17 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre16 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre15 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre14 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre13 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre12 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre11 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre10 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre9 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre8 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre7 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre6 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre5 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre4 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre3 app/helpers/calendar_helper.rb
enju_event-0.1.17.pre2 app/helpers/calendar_helper.rb