You are here

message-add-list.html.twig in Message UI 8

Default theme implementation to list message templates available for adding messages.

This list is displayed on the Add message admin page.

Available variables:

  • templates: A list of message templates, each with the following properties:

    • add_link: Link to create a message of this template.
    • description: Description of this template of message.

@todo: add

File

templates/message-add-list.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to list message templates available for adding messages.
  5. *
  6. * This list is displayed on the Add message admin page.
  7. *
  8. * Available variables:
  9. * - templates: A list of message templates, each with the following properties:
  10. * - add_link: Link to create a message of this template.
  11. * - description: Description of this template of message.
  12. *
  13. * @todo: add @see template_preprocess_message_add_list()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {% if templates is not empty %}
  19. <ul class="admin-list">
  20. {% for template in templates %}
  21. <li class="clearfix"><span class="label">{{ template.add_link }}</span><div class="description">{{ template.description }}</div></li>
  22. {% endfor %}
  23. </ul>
  24. {% else %}
  25. <p>
  26. {% set create_message = path('message.template_add') %}
  27. {% trans %}
  28. You have not created any message templates yet. Go to the <a href="{{ create_message }}">message template creation page</a> to add a new message template.
  29. {% endtrans %}
  30. </p>
  31. {% endif %}