Sha256: a832ff6c20baa5cadb213b726c00f1f34e58ba02ac25e3c5d94a18531f9d833f

Contents?: true

Size: 1.14 KB

Versions: 18

Compression:

Stored size: 1.14 KB

Contents

<div class="simple-calendar">
  <div class="calendar-heading">
    <%= link_to t('simple_calendar.previous', default: 'Previous'), calendar.url_for_previous_view %>
    <span class="calendar-title"><%= t('date.month_names')[start_date.month] %> <%= start_date.year %></span>
    <%= link_to t('simple_calendar.next', default: 'Next'), calendar.url_for_next_view %>
  </div>

  <table class="table table-striped">
    <thead>
      <tr>
        <% date_range.slice(0, 7).each do |day| %>
          <th><%= t('date.abbr_day_names')[day.wday] %></th>
        <% end %>
      </tr>
    </thead>

    <tbody>
      <% date_range.each_slice(7) do |week| %>
        <tr>
          <% week.each do |day| %>
            <%= content_tag :td, class: calendar.td_classes_for(day) do %>
              <% if defined?(Haml) && respond_to?(:block_is_haml?) && block_is_haml?(block) %>
                <% capture_haml(day, sorted_events.fetch(day, []), &block) %>
              <% else %>
                <% block.call day, sorted_events.fetch(day, []) %>
              <% end %>
            <% end %>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>

Version data entries

18 entries across 10 versions & 1 rubygems

Version Path
simple_calendar-2.3.0 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.7 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.6 app/views/simple_calendar/_calendar.html.erb
simple_calendar-2.2.6 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.5 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.5 app/views/simple_calendar/_calendar.html.erb
simple_calendar-2.2.4 app/views/simple_calendar/_calendar.html.erb
simple_calendar-2.2.4 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.3 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.3 app/views/simple_calendar/_calendar.html.erb
simple_calendar-2.2.2 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.2 app/views/simple_calendar/_calendar.html.erb
simple_calendar-2.2.1 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.2.1 app/views/simple_calendar/_calendar.html.erb
simple_calendar-2.2.0 app/views/simple_calendar/_calendar.html.erb
simple_calendar-2.2.0 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.1.5 app/views/simple_calendar/_month_calendar.html.erb
simple_calendar-2.1.5 app/views/simple_calendar/_calendar.html.erb