You are here

paragraphs-add-dialog--categorized.html.twig in Paragraphs Editor Enhancements 8

Theme override of modal add paragraph dialog template.

File

templates/paragraphs-add-dialog--categorized.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override of modal add paragraph dialog template.
  5. *
  6. * @ingroup themeable
  7. */
  8. #}
  9. {{ add }}
  10. <div {{ attributes }}>
  11. <div class="dialog-header clearfix">
  12. <div class="filter js-hide" role="search">
  13. <input type="search" class="item-filter" placeholder="{{ filter_placeholder }}" aria-label="{{ filter_placeholder }}" />
  14. <div class="search-description">
  15. <label title="{{ "Include description when searching"|t }}"><input type="checkbox" name="search_description" value="1" aria-label="{{ "Include description when searching"|t }}" />{{ "Include description when searching"|t }}</label>
  16. </div>
  17. </div>
  18. <button type="button" class="display-toggle style-list" title="{{ "Display Paragraphs as list"|t }}">list</button>
  19. <button type="button" class="display-toggle style-tiles" title="{{ "Display Paragraphs as tiles"|t }}">tiles</button>
  20. </div>
  21. {% if (add_mode|default('modal') != 'off_canvas') %}
  22. {% for category_id, group in groups %}
  23. <div class="button-group clearfix" role="group"{% if categories[category_id].id %} aria-labelledby="{{ categories[category_id].id }}--label" aria-describedby="{{- categories[category_id].id -}}--description"{% endif %}>
  24. <div{% if categories[category_id].id %} id="{{- categories[category_id].id -}}--label"{% endif %} class="category-title">{{ categories[category_id].title }}</div>
  25. {% if categories[category_id].description|length %}
  26. <summary{% if categories[category_id].id %} id="{{- categories[category_id].id -}}--description"{% endif %} class="summary">{{ categories[category_id].description }}</summary>
  27. {% endif %}
  28. <ul class="paragraphs-add-dialog-list">
  29. {% for button in group %}
  30. <li class="paragraphs-add-dialog-row"{% if button['#easy_access'] %} data-easy-access-weight="{{ button['#weight'] }}"{% endif %}>
  31. {{ button }}
  32. </li>
  33. {% endfor %}
  34. </ul>
  35. </div>
  36. {% endfor %}
  37. {% endif %}
  38. </div>