{# The messages of a ticket, oldest first. ``items`` come from tungsten_tickets.views.conversation_items(). #} {% import "tungsten/components/ui.html" as ui %} {% set tones = { 'reply': 'bg-primary-50 ring-primary-600/20 dark:bg-primary-500/10 dark:ring-primary-400/30', 'note': 'bg-warning-50 ring-warning-600/20 dark:bg-warning-500/10 dark:ring-warning-400/30', 'customer': 'bg-white ring-gray-950/10 dark:bg-white/5 dark:ring-white/10', } %} {% set tags = {'reply': ('Team', 'primary'), 'note': ('Internal note', 'warning'), 'customer': ('Customer', 'gray')} %} {% if not items %}

{{ __('No messages yet.') }}

{% else %}
    {% for m in items %} {% if m.kind == 'event' %}
  1. {{ icon('clock', 'h-3.5 w-3.5 shrink-0') }}{{ m.body }}
  2. {% else %}
  3. {{ ui.avatar(m.author) }}
    {{ m.author }} {% set tag = tags.get(m.kind) %}{% if tag and show_tags %}{{ ui.badge(__(tag[0]), tag[1]) }}{% endif %}
    {{ m.body }}
    {% if m.attachments %} {% endif %}
  4. {% endif %} {% endfor %}
{% endif %}