Добавлен столбец Заметки в список клиентов
- Новый столбец Notes в таблице клиентов - Текст обрезается до 10 слов (truncatewords) - Максимальная ширина 300px с ellipsis - При наведении показывается полный текст через title - Если заметок нет, отображается тире (—)
This commit is contained in:
@@ -63,6 +63,7 @@
|
|||||||
<th>Имя</th>
|
<th>Имя</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
<th>Телефон</th>
|
<th>Телефон</th>
|
||||||
|
<th>Заметки</th>
|
||||||
<th class="text-end">Действия</th>
|
<th class="text-end">Действия</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -75,6 +76,16 @@
|
|||||||
<td class="fw-semibold">{{ customer.full_name }}</td>
|
<td class="fw-semibold">{{ customer.full_name }}</td>
|
||||||
<td>{{ customer.email|default:'—' }}</td>
|
<td>{{ customer.email|default:'—' }}</td>
|
||||||
<td>{{ customer.phone|default:'—' }}</td>
|
<td>{{ customer.phone|default:'—' }}</td>
|
||||||
|
<td>
|
||||||
|
{% if customer.notes %}
|
||||||
|
<div style="max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"
|
||||||
|
title="{{ customer.notes }}">
|
||||||
|
{{ customer.notes|truncatewords:10 }}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
—
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
|
||||||
<td class="text-end" onclick="event.stopPropagation();">
|
<td class="text-end" onclick="event.stopPropagation();">
|
||||||
<a href="{% url 'customers:customer-detail' customer.pk %}"
|
<a href="{% url 'customers:customer-detail' customer.pk %}"
|
||||||
|
|||||||
Reference in New Issue
Block a user