You are here

private-message-thread.html.twig in Open Social 8.6

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.

File

themes/socialbase/templates/private_message/private-message-thread.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a private message thread.
  5. *
  6. * Available variables:
  7. * - private_message_thread: The private message thread entity
  8. * with limited access to object properties and methods.
  9. * - content: All private message thread items. Use {{ content }} to print them all,
  10. * or print a subset such as {{ content.field_example }}. Use
  11. * {{ content|without('field_example') }} to temporarily suppress the printing
  12. * of a given child element.
  13. * - last_update: Themed display of the last update time for the thread
  14. * - url: Direct URL of the current private message thread.
  15. * - view_mode: View mode; for example, "teaser" or "full".
  16. * - logged_in: Flag for authenticated user status. Will be true when the
  17. * current user is a logged-in member.
  18. *
  19. * @see template_preprocess_private_message()
  20. *
  21. * @ingroup themeable
  22. */
  23. #}
  24. {{ attach_library('socialbase/message') }}
  25. {% if view_mode == 'inbox' %}
  26. <a href="{{ url }}" title="{{ 'View thread'|t }}" class="card message">
  27. <div class="card__block">
  28. <div class="media-wrapper">
  29. <div class="media">
  30. <div class="media-left avatar">
  31. {{ content.members }}
  32. </div>
  33. <div class="media-body message__inbox-body">
  34. {{ content.membernames }} <span class="read-indicator"></span>
  35. {{ content.last_message }}
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </a>
  41. {% else %}
  42. <div class="card card--message-thread">
  43. <div class="card__block">
  44. <div class="media-wrapper">
  45. <div class="media message__heading">
  46. <div class="message__back-btn">
  47. <a href="{{ content.back_to_inbox }}" class="btn btn-icon-toggle">
  48. <svg class="btn-icon icon-gray">
  49. <use xlink:href="#icon-navigate_before"></use>
  50. </svg>
  51. </a>
  52. </div>
  53. {{ content.members }}
  54. <div class="message__thread-actions btn-group">
  55. <button type="button" data-toggle="dropdown" aria-expanded="false" aria-haspopup="true" class="btn btn-icon-toggle dropdown-toggle">
  56. <svg class="btn-icon icon-gray">
  57. <use xlink:href="#icon-expand_more"></use>
  58. </svg>
  59. </button>
  60. <ul class="dropdown-menu dropdown-menu-right">
  61. <li>{{ content.delete_link }}</li>
  62. </ul>
  63. </div>
  64. </div>
  65. </div>
  66. {{ content.private_messages }}
  67. {% if content.private_message_form %}
  68. <div class="card__nested-section">
  69. {{ content.private_message_form }}
  70. </div>
  71. {% endif %}
  72. </div>
  73. </div>
  74. {% endif %}