Files
customerTicket/templates/tickets/staff_sms_templates.html
T
2026-09-10 11:34:19 +03:30

8 lines
2.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'base.html' %}
{% block title %}{{ page_title }}{% endblock %}
{% block content %}<div class="operations-page operations-templates">
<section class="operations-hero"><div><p class="eyebrow">پیام‌رسانی استاندارد</p><h1>الگوهای پیامک واحدها</h1><p>متن‌های تاییدشده دیتابیس را برای هر رویداد مدیریت و با متغیرهای امن شخصی‌سازی کنید.</p></div><div class="template-guide"><span>✦</span><div><b>متغیرهای کنترل‌شده</b><small>از ورود تگ نامعتبر جلوگیری می‌شود</small></div></div></section>
<div class="template-layout"><section class="operations-panel"><header class="panel-heading"><div><small>کتابخانه واحدهای شما و fallback سیستم</small><h2>الگوهای موجود در دیتابیس</h2></div><span>{{ templates|length }} الگو</span></header><div class="template-card-list">{% for item in templates %}<article class="template-card"><span class="template-icon">✉</span><div><h3>{{ item.title }}</h3><p>{{ item.get_event_type_display }}</p><small>{% if item.unit %}{{ item.unit }}{% else %}الگوی عمومی سیستم{% endif %} · بروزرسانی {{ item.updated_at|date:'Y/m/d' }}</small></div><span class="status-pill {% if item.is_active %}is-success{% else %}is-muted{% endif %}">{% if item.is_active %}فعال{% else %}غیرفعال{% endif %}</span>{% if item.unit %}<a href="{% url 'staff_tickets:sms_template_edit' item.pk %}">ویرایش</a>{% else %}<span class="status-pill is-muted">Fallback</span>{% endif %}</article>{% empty %}<div class="empty-state"><span>✉</span><h3>هیچ الگویی در دیتابیس وجود ندارد</h3><p>migration داده‌های پیش‌فرض را ایجاد می‌کند؛ وضعیت migration را بررسی کنید.</p></div>{% endfor %}</div></section>
<aside class="operations-form-side template-editor"><header><span>{% if form.instance.pk %}✎{% else %}+{% endif %}</span><div><small>{% if form.instance.pk %}ویرایش الگو{% else %}ساخت الگو{% endif %}</small><h2>{% if form.instance.pk %}{{ form.instance.title }}{% else %}الگوی اختصاصی جدید{% endif %}</h2></div></header><form method="post" class="operations-form">{% csrf_token %}{% if form.non_field_errors %}<div class="create-form-errors">{{ form.non_field_errors }}</div>{% endif %}{% for field in form %}<label><span>{{ field.label }}</span>{{ field }}{{ field.errors }}</label>{% endfor %}<div class="variable-box"><b>متغیرهای قابل استفاده</b><div dir="ltr">{% for tag in allowed_tags %}<code>{% templatetag openvariable %}{{ tag }}{% templatetag closevariable %}</code>{% endfor %}</div></div><button type="submit">ذخیره الگوی پیامک</button>{% if form.instance.pk %}<a href="{% url 'staff_tickets:sms_templates' %}">انصراف از ویرایش</a>{% endif %}</form></aside></div>
</div>{% endblock %}