Sha256: d9a12f7bd85ff309ecbd35e327d44d001f27d222b4920a7dbe959279861769ae
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
<div class="simple-calendar"> <%= link_to "Previous", url_for(params.merge(start_date: date_range.first - 1.day)) %> Week <%= start_date.strftime("%U").to_i %> <%= link_to "Next", url_for(params.merge(start_date: date_range.last + 1.day)) %> <table class="table table-striped"> <thead> <tr> <% date_range.slice(0, 7).each do |day| %> <th><%= I18n.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 do %> <% block.call day, sorted_events.fetch(day, []) %> <% end %> <% else %> <% block.call day, sorted_events.fetch(day, []) %> <% end %> <% end %> <% end %> </tr> <% end %> </tbody> </table> </div>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_calendar-2.0.6 | app/views/simple_calendar/_week_calendar.html.erb |