You are here

workflow-transition.html.twig in Workflow 8

Default theme implementation for comments.

Available variables:

  • author: Comment author. Can be a link or plain text.
  • content: The content-related items for the workflow transition display. Use {{ content }} to print them all, or print a subset such as {{ content.field_example }}. Use the following code to temporarily suppress the printing of a given child element:

  {{ content|without('field_example') }}
  
  • time: Formatted date and time for when the workflow transition was created.
  • from_state: State object, you can display label via from_state.label.
  • to_state: State object, you can display label via to_state.label.
  • user: User object.

File

templates/workflow-transition.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for comments.
  5. *
  6. * Available variables:
  7. * - author: Comment author. Can be a link or plain text.
  8. * - content: The content-related items for the workflow transition display. Use
  9. * {{ content }} to print them all, or print a subset such as
  10. * {{ content.field_example }}. Use the following code to temporarily suppress
  11. * the printing of a given child element:
  12. * @code
  13. * {{ content|without('field_example') }}
  14. * @endcode
  15. * - time: Formatted date and time for when the workflow transition was created.
  16. * - from_state: State object, you can display label via from_state.label.
  17. * - to_state: State object, you can display label via to_state.label.
  18. * - user: User object.
  19. *
  20. * @see template_preprocess_workflow_transition()
  21. *
  22. * @ingroup themeable
  23. */
  24. #}
  25. <article{{ attributes }}>
  26. <div class="status">
  27. {% trans %}From {{ from_state.label }} to {{ to_state.label }} at {{ time }} via {{ user.label }}{% endtrans %}
  28. </div>
  29. {% if comment %}
  30. <div class="comment">
  31. {% trans %}Comment{% endtrans %}: {{ comment }}
  32. </div>
  33. {% endif %}
  34. {% if content %}
  35. {{ content }}
  36. {% endif %}
  37. </article>