2022-08-23 13:00:54 -07:00
|
|
|
<div class="text-center">
|
|
|
|
|
<%= first_day.strftime("%b") %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex flex-col w-full">
|
|
|
|
|
<% (first_day..first_day.end_of_month).each do |day| %>
|
2022-08-23 14:51:20 -07:00
|
|
|
<% todays_events = days_events(events, day) %>
|
2022-08-23 13:00:54 -07:00
|
|
|
<div class="relative border-t w-full flex h-6 <%= 'bg-gray-200' if day.on_weekend? %>">
|
|
|
|
|
<div class="text-xs font-bold <%= 'border-red-600 border-b-4' if day.today? %>"
|
|
|
|
|
<%= raw('data-toggle="tooltip" title="Today"') if day.today? %> <%= raw("data-toggle='tooltip' title='#{day.strftime('%a, %m/%d/%y')}'") unless day.today? %> data-placement="right" >
|
|
|
|
|
<%= day.strftime('%d') %>
|
|
|
|
|
</div>
|
2022-08-23 14:51:20 -07:00
|
|
|
<div class="w-full flex-grow flex justify-end">
|
|
|
|
|
<% todays_events.each do |event| %>
|
|
|
|
|
<div class="w-2 bg-red-700 cursor-pointer" title="test" data-toggle="tooltip" data-placement="right"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2022-08-23 13:00:54 -07:00
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|