calendar-month.blade.php
38 lines
| 1 | <div class="<?php echo esc_attr($month->month_class()); ?>" data-month="<?php echo esc_attr($month->date_string()); ?>"> |
| 2 | <div class="iawp-calendar-heading"> |
| 3 | <button class="iawp-prev-month-nav iawp-month-nav" |
| 4 | data-month="<?php echo esc_attr($month->date_string()); ?>" |
| 5 | data-direction="prev" |
| 6 | tabindex="-1"> |
| 7 | <span class="dashicons dashicons-arrow-left-alt2"></span> |
| 8 | </button> |
| 9 | <span class="iawp-month-name"><?php echo esc_html($month->name()); ?></span> |
| 10 | <button class="iawp-next-month-nav iawp-month-nav" |
| 11 | data-month="<?php echo esc_attr($month->date_string()); ?>" |
| 12 | data-direction="next" |
| 13 | tabindex="-1"> |
| 14 | <span class="dashicons dashicons-arrow-right-alt2"></span> |
| 15 | </button> |
| 16 | </div> |
| 17 | <div class="iawp-day-names"> |
| 18 | <?php echo \IAWP\Utils\Security::span_tags_only($month->days_of_week()); ?> |
| 19 | </div> |
| 20 | <div class="iawp-days"><?php |
| 21 | for ($i = 0; $i < $month->extra_cells(); $i++) { |
| 22 | echo '<span class="iawp-cell empty"></span>'; |
| 23 | } |
| 24 | foreach($month->days() as $day) : |
| 25 | $day->setTime(0, 0, 0, 0); |
| 26 | $class = $month->day_class($day, $first_data, $start_date, $end_date); ?> |
| 27 | <span class="<?php echo esc_attr($class); ?>" |
| 28 | data-date="<?php echo esc_attr($day->format('Y-m-d')); ?>" |
| 29 | data-display-date="<?php echo esc_attr(iawp()->date_i18n($user_format, $day)); ?>" |
| 30 | aria-label="<?php echo esc_attr($day->format('F j')); ?>"> |
| 31 | <?php echo esc_html($day->format('j')); ?> |
| 32 | <?php if ($day->format('Y-m-d') == $first_data) : ?> |
| 33 | <span class="first-data-note"><?php esc_html_e('First view recorded', 'independent-analytics'); ?></span> |
| 34 | <?php endif; ?> |
| 35 | </span> |
| 36 | <?php endforeach; ?> |
| 37 | </div> |
| 38 | </div> |