You are here

date-recur-default-formatter.html.twig in Recurring Dates Field 8

Default theme implementation to display a recurring dates field.

Available variables:

  • date: A single date (for non-repeating fields).
  • repeatrule: The human readable repeat rule.
  • occurrences: The actual date occurrences.

File

templates/date-recur-default-formatter.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a recurring dates field.
  5. *
  6. * Available variables:
  7. * - date: A single date (for non-repeating fields).
  8. * - repeatrule: The human readable repeat rule.
  9. * - occurrences: The actual date occurrences.
  10. *
  11. * @ingroup themeable
  12. */
  13. #}
  14. {% if date and not isRecurring %}
  15. <div class="date-recur-date">{{ date }}</div>
  16. {% endif %}
  17. {% if repeatrule %}
  18. <div class="date-recur-repeat-rule">{{ repeatrule }}</div>
  19. {% endif %}
  20. {% if occurrences|length > 0 %}
  21. <ul class="date-recur-occurrences {% if occurrences|length > 1 %} date-recur-multiple {% else %} date-recur-single {% endif %}">
  22. {% for item in occurrences %}
  23. <li>{{ item }}</li>
  24. {% endfor %}
  25. </ul>
  26. {% endif %}