node-add-list.html.twig 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {#
  2. /**
  3. * @file
  4. * Theme implementation to list node types available for adding content.
  5. *
  6. * Available variables:
  7. * - types: List of content types. Each content type contains:
  8. * - url: Path to the add content of this type page.
  9. * - label: The title of this type of content.
  10. * - description: Description of this type of content.
  11. *
  12. * @see template_preprocess_node_add_list()
  13. * @see mediteran_preprocess_node_add_list()
  14. */
  15. #}
  16. {% if content %}
  17. <ul class="admin-list">
  18. {% for type in types %}
  19. <li class="clearfix">
  20. <a href="{{ type.url }}" class="title-link"><span class="label">{{ type.label }}</span></a>
  21. {# Don't print empty description wrapper if there is no description #}
  22. {% if type.description %}
  23. <div class="description">{{ type.description }}</div>
  24. {% endif %}
  25. </li>
  26. {% endfor %}
  27. </ul>
  28. {% else %}
  29. <p>
  30. {% set create_content = path('node.type_add') %}
  31. {% trans %}
  32. You have not created any content types yet. Go to the <a href="{{ create_content }}">content type creation page</a> to add a new content type.
  33. {% endtrans %}
  34. </p>
  35. {% endif %}