{% extends "base.html" %} {% block title %}Quick Replies{% endblock %} {% block content %}

Quick Replies

Manage predefined reply templates for tickets.

{# ── Category filter chips ── #}
{% for cat in categories %} {% endfor %}
{# ── Grouped message list ── #}
{# Build groups: categories with messages first, then uncategorized #} {% set ns = namespace(uncategorized=[]) %} {% for cat in categories %} {% set cat_messages = messages | selectattr('category_id', 'equalto', cat.id) | list %} {% if cat_messages %}

{{ cat.name }}

{{ cat_messages | length }}
{% for m in cat_messages %} {{ _message_row(m) }} {% endfor %}
{% endif %} {% endfor %} {# Uncategorized section #} {% set uncategorized = messages | selectattr('category_id', 'none') | list %} {% if uncategorized %}

Uncategorized

{{ uncategorized | length }}
{% for m in uncategorized %} {{ _message_row(m) }} {% endfor %}
{% endif %} {% if not messages %}
No predefined messages yet. Click "New Message" to create one, or Sync to import from Addons.
{% endif %}
{# ── Message row macro ── #} {% macro _message_row(m) %}
{{ m.title }}
{{ m.body[:80] }}{% if m.body|length > 80 %}…{% endif %}
{% if m.source == 'addons' %} Addons {% else %} Local {% endif %} {% if m.is_global %} Global {% elif m.product_names %} {{ m.product_names | join(', ') | truncate(40) }} {% else %} - {% endif %} {{ m.iso_lang or '-' }} {{ m.updated_at.strftime('%Y-%m-%d') if m.updated_at else '-' }} {% if m.source == 'local' %}
{% else %} Synced {% endif %} {% endmacro %} {# ── Create Modal ── #} {# ── Edit Modal ── #} {# ── Manage Categories Modal ── #} {% endblock %}