Sha256: 96f9297395f3dd51ffa19cca8fc6da9079aa520d5d60111e1b7bd768a3f5122e

Contents?: true

Size: 725 Bytes

Versions: 5

Compression:

Stored size: 725 Bytes

Contents

= schedule.form_group :day_of_week, label: { text: :day_and_week.l } do
  %table.table.table-striped.table-bordered
    %tr
      %th= :week_number.l
      - DateBook.weekdays.each do |day|
        %th= day.name
    - 5.times do |i|
      :ruby
        week_num = (i == 4) ? -1 : i + 1
      %tr
        %th
          - if week_num == -1
            = :last.l
          - else
            = week_num.ordinalize
        - DateBook.weekdays.each do |day|
          %td
            = schedule.fields_for :day_of_week do |day_fields|
              = day_fields.check_box_without_bootstrap day.name.downcase, { multiple: true, checked: @event.schedule.day_of_week[day.name.downcase]&.include?(week_num.to_s) }, week_num.to_s, nil

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
date_book-0.0.6 app/views/date_book/events/fields/_day_of_week.html.haml
date_book-0.0.5 app/views/date_book/events/fields/_day_of_week.html.haml
date_book-0.0.3 app/views/date_book/events/fields/_day_of_week.html.haml
date_book-0.0.2 app/views/date_book/events/fields/_day_of_week.html.haml
date_book-0.0.1 app/views/date_book/events/fields/_day_of_week.html.haml