Sha256: 5b1740badbf000fa36bccc818b61bef5d633c8440d1386babcb24e1444e47450

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

- @event = Event.new

= form_for @event, url: events_path(calendar_current_params) do |f|
  = f.label :start_time
  = f.datetime_select :start_time
  %br
  = f.label :end_time
  = f.datetime_select :end_time
  %br
  = f.label :title
  = f.text_field :title
  %br
  = f.submit

%br

- switch_params = calendar_current_params
- switch_params[:calendar][:scope] = @calendar[:scope] == CalendarizeHelper::Scopes::DAILY ? CalendarizeHelper::Scopes::WEEKLY : CalendarizeHelper::Scopes::DAILY

= link_to switch_params[:calendar][:scope], request.path + '?' + switch_params.to_query

%br

- if @calendar[:scope] == CalendarizeHelper::Scopes::DAILY
  = daily_calendar @calendar[:date], Event.for_day(@calendar[:date]), verbose: @calendar[:verbose] do |c|
    = l(c.event.start_time, format: :short)
    = ' - '
    = l(c.event.end_time, format: :short)
    = ' : '
    = c.event.title


- elsif @calendar[:scope] == CalendarizeHelper::Scopes::WEEKLY
  = weekly_calendar @calendar[:date], Event.for_week(@calendar[:date]), verbose: @calendar[:verbose] do |c|
    = l(c.event.start_time, format: :short)
    = ' - '
    = l(c.event.end_time, format: :short)
    = ' : '
    = c.event.title

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
calendarize-0.1 test/dummy/app/views/welcome/index.html.haml