You are here

calendar-mini.html.twig in Calendar 8

Template to display a view as a mini calendar month.

Available variables:

  • day_names: An array of the day of week names for the table header.
  • rows: An array of data for each day of the week.
  • view: The view.
  • min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
  • max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.

File

templates/calendar-mini.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template to display a view as a mini calendar month.
  5. *
  6. * Available variables:
  7. * - day_names: An array of the day of week names for the table header.
  8. * - rows: An array of data for each day of the week.
  9. * - view: The view.
  10. * - min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
  11. * - max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
  12. *
  13. * @see template_preprocess_calendar_mini()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <div class="calendar-calendar">
  19. <div class="month-view">
  20. {% if options.month_name %}
  21. <div class="date-nav-wrapper clear-block">
  22. <div class="date-nav">
  23. <div class="date-heading">
  24. {{ options.month_name }}
  25. </div>
  26. </div>
  27. </div>
  28. {% endif %}
  29. <table class="mini">
  30. <thead>
  31. <tr>
  32. {% for cell in day_names %}
  33. <th class="{{ cell.class }}">
  34. {{ cell.data }}
  35. </th>
  36. {% endfor %}
  37. </tr>
  38. </thead>
  39. <tbody>
  40. {% for row in rows %}
  41. <tr>
  42. {% for cell in row %}
  43. <td id="{{ cell.id }}" class="{{ cell.class }}">
  44. {{ cell.data }}
  45. </td>
  46. {% endfor %}
  47. </tr>
  48. {% endfor %}
  49. </tbody>
  50. </table>
  51. </div>
  52. </div>