socialbase-1.1.0/templates/private_message/private-message-thread.html.twig
templates/private_message/private-message-thread.html.twig
{#
/**
* @file
* Default theme implementation to display a private message thread.
*
* Available variables:
* - private_message_thread: The private message thread entity
* with limited access to object properties and methods.
* - content: All private message thread items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing
* of a given child element.
* - last_update: Themed display of the last update time for the thread
* - url: Direct URL of the current private message thread.
* - view_mode: View mode; for example, "teaser" or "full".
* - logged_in: Flag for authenticated user status. Will be true when the
* current user is a logged-in member.
*
* @see template_preprocess_private_message()
*
* @ingroup themeable
*/
#}
{{ attach_library('socialbase/message') }}
{% if view_mode == 'inbox' %}
<div class="card message">
<div class="card__block">
<div class="media-wrapper">
<div class="media">
<div class="media-left avatar">
<a href="{{ url }}" title="{{ 'View thread'|t }}">
{{ content.members }}
</a>
</div>
<a href="{{ url }}" title="{{ 'View thread'|t }}" class="media-body message__inbox-body">
{{ content.membernames }} <span class="read-indicator"></span>
{{ content.last_message }}
</a>
</div>
</div>
</div>
</div>
{% else %}
<div class="card card--message-thread">
<div class="card__block">
<div class="media-wrapper">
<div class="media message__heading">
<div class="message__back-btn">
<a href="{{ content.back_to_inbox }}" class="btn btn-icon-toggle" title="{{ 'Go back to your inbox'|t }}">
<svg class="btn-icon icon-gray" aria-hidden="true">
<title>{% trans %}Go back to your inbox{% endtrans %}</title>
<use xlink:href="#icon-navigate_before"></use>
</svg>
</a>
</div>
{{ content.members }}
{% if content.delete_link %}
<div class="message__thread-actions btn-group">
<button type="button" data-toggle="dropdown" aria-expanded="false" aria-haspopup="true" class="btn btn-icon-toggle dropdown-toggle" title="{% trans %}Actions for this thread{% endtrans %}">
<svg class="btn-icon icon-gray" aria-hidden="true">
<title>{% trans %}Actions for this thread{% endtrans %}</title>
<use xlink:href="#icon-expand_more"></use>
</svg>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>{{ content.delete_link }}</li>
</ul>
</div>
{% endif %}
</div>
</div>
{{ content.private_messages }}
{% if content.private_message_form %}
<div class="card__nested-section">
{{ content.private_message_form }}
</div>
{% endif %}
</div>
</div>
{% endif %}
