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

7 lines
2.7 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-groups">
<section class="operations-hero"><div><p class="eyebrow">سازمان‌دهی دفترچه</p><h1>گروه‌های مخاطبان</h1><p>مخاطبان را برای ارسال‌های هدفمند و ایزوله، در گروه‌های متعلق به هر واحد سازمان‌دهی کنید.</p></div><div class="operations-hero-actions"><a class="button button-secondary" href="{% url 'staff_tickets:contacts' %}">بازگشت به مخاطبان</a></div></section>
<section class="operations-kpis compact"><article><span class="kpi-icon">#</span><div><b>{{ group_metrics.total }}</b><small>کل گروه‌ها</small></div></article><article><span class="kpi-icon is-blue">✓</span><div><b>{{ group_metrics.active }}</b><small>گروه فعال</small></div></article><article><span class="kpi-icon is-violet">♙</span><div><b>{{ group_metrics.memberships }}</b><small>مجموع عضویت‌ها</small></div></article></section>
<div class="operations-split"><section class="operations-panel"><header class="panel-heading"><div><small>گروه‌های قابل دسترس</small><h2>فهرست گروه‌ها</h2></div><span>{{ groups|length }} مورد</span></header><div class="group-card-list">{% for group in groups %}<article class="group-card"><span class="group-symbol">{{ group.name|slice:':1' }}</span><div><h3>{{ group.name }}</h3><p>{{ group.description|default:'بدون توضیح'|truncatechars:85 }}</p><small>{{ group.unit }} · {{ group.contact_count }} عضو</small></div><span class="status-pill {% if group.is_active %}is-success{% else %}is-muted{% endif %}">{% if group.is_active %}فعال{% else %}غیرفعال{% endif %}</span>{% if can_edit %}<a href="{% url 'staff_tickets:group_edit' group.pk %}">ویرایش</a>{% endif %}</article>{% empty %}<div class="empty-state">هنوز گروهی ثبت نشده است.</div>{% endfor %}</div></section>{% if can_edit %}<aside class="operations-form-side"><header><span>+</span><div><small>{% if form.instance.pk %}ویرایش اطلاعات{% else %}ساخت گروه{% endif %}</small><h2>{% if form.instance.pk %}{{ form.instance.name }}{% else %}گروه جدید{% endif %}</h2></div></header><form method="post" class="operations-form">{% csrf_token %}{% for field in form %}<label><span>{{ field.label }}</span>{{ field }}{{ field.errors }}</label>{% endfor %}<button type="submit">ذخیره گروه</button>{% if form.instance.pk %}<a href="{% url 'staff_tickets:groups' %}">انصراف از ویرایش</a>{% endif %}</form></aside>{% endif %}</div></div>{% endblock %}