moderation_note-8.x-1.0-beta3/templates/moderation-note.html.twig
templates/moderation-note.html.twig
{#
/**
* @file
* Default theme implementation for the moderation note entity.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - text: The plain text of the note.
* Using the nl2br Twig filter is recommended as the text may contain "\n".
* - quote: The text that was selected when creating this note.
* - created: The timestamp when this note was created.
* - created_pretty: The created time, formatted to be human-readable.
* - updated: The timestamp when this note was updated.
* - updated_pretty: The updated time, formatted to be human-readable.
* - author_name: The display name of the author.
* - author_link: A link to the author, as rendered by $user->toLink().
* - author_picture: The author's picture as rendered by the compact view mode.
* - assignee_name: The display name of the assignee.
* - assignee_link: A link to the assignee, as rendered by $user->toLink().
* - assignee_picture: The assignee's picture as rendered by the compact view mode.
* - parent: The note's parent, if one exists.
* - moderated_entity_link: A link to the entity this note is related to.
* - actions: An array of buttons which open entity forms.
* - published: Whether or not the note is published.
*
* @ingroup themeable
*/
#}
<div {{ attributes }}>
{% if not published and not parent %}
<div class="moderation-note-publishing-status">{{ 'Resolved' | t }}</div>
{% endif %}
{% if assignee_link %}
<div class="moderation-note-assignee">
{{ "Assigned to" | t }} {{ assignee_link }}
</div>
{% endif %}
{% if not parent %}
<div class="moderation-note-quote-information">
<blockquote>{{ quote }}</blockquote>
<p>{{ "From" | t }} "{{ moderated_entity_link }}"</p>
</div>
{% endif %}
<div class="moderation-note-text">
{{ text | nl2br }}
</div>
<div class="moderation-note-owner">
{{ author_link }} {{ created_pretty }}
</div>
{% if actions %}
<div class="moderation-note-actions">
{{ actions | without('view') }}
</div>
{% endif %}
</div>
