<% # Copyright (C) 2011 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <%# cache expires at the top of the next hour %> <% cache(['mini_calendar_render', current.to_s, first_day.to_s].cache_key, :expires_in => (3600 - (Time.now.to_i % 3600)).seconds) do %>
<%= I18n.t('date.month_names')[current.month] %> <%= current.year %>
<%= current.month %>
<% today = Time.zone.today %> <% day = first_day %> <% 7.times do |day_number| %> <% end %> <% 6.times do %> <% 7.times do %> <% day = day.next %> <% end %> <% end %>
<%= I18n.t 'Calendar' %>
<%= I18n.t('date.day_names')[day_number] %>
" class="mini_calendar_day day <%= day.month == current.month ? 'current_month' : "other_month #{day.month == (current.month + 1) % 12 ? 'next_month' : 'previous_month'}" %><%= day == today ? ' today' : '' %> <%= day.strftime("date_%m_%d_%Y") %>">
<%= day.strftime("%e %B %Y") %> <%= I18n.t 'Previous month' %> <%= I18n.t 'Next month' %> <%= I18n.t 'Today' %> <%= I18n.t 'Click to view event details' %>
<% end %>