entity-add-list.html.twig 903 B

123456789101112131415161718192021222324252627
  1. {#
  2. /**
  3. * @file
  4. * Theme override to to present a list of available bundles.
  5. *
  6. * Available variables:
  7. * - bundles: A list of bundles, each with the following properties:
  8. * - label: Bundle label.
  9. * - description: Bundle description.
  10. * - add_link: Link to create an entity of this bundle.
  11. * - add_bundle_message: The message shown when there are no bundles. Only
  12. * available if the entity type uses bundle entities.
  13. *
  14. * @see template_preprocess_entity_add_list()
  15. */
  16. #}
  17. {% if bundles is not empty %}
  18. <ul class="admin-list">
  19. {% for bundle in bundles %}
  20. <li class="clearfix"><a href="{{ bundle.add_link.url }}"><span class="label">{{ bundle.label }}</span><div class="description">{{ bundle.description }}</div></a></li>
  21. {% endfor %}
  22. </ul>
  23. {% elseif add_bundle_message is not empty %}
  24. <p>
  25. {{ add_bundle_message }}
  26. </p>
  27. {% endif %}