Feature: иконки карандаш и красный крестик вместо надписей Изменить/Удалить в списках

Made-with: Cursor
This commit is contained in:
2026-02-26 16:50:51 +00:00
parent daf93d81b9
commit 7811253056
7 changed files with 57 additions and 15 deletions

View File

@@ -247,6 +247,43 @@ body {
white-space: nowrap;
}
/* Иконки действий в списках: карандаш (редактировать), крестик (удалить) */
.ws-table .ws-btn-icon-edit,
.ws-table .ws-btn-icon-delete {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
margin: 0 2px;
border-radius: 6px;
text-decoration: none;
vertical-align: middle;
}
.ws-table .ws-btn-icon-edit:hover {
background: rgba(13, 173, 187, 0.2);
}
.ws-table .ws-btn-icon-edit svg {
width: 16px;
height: 16px;
fill: var(--ws-accent);
}
.ws-table .ws-btn-icon-edit:hover svg {
fill: var(--ws-accent-hover);
}
.ws-table .ws-btn-icon-delete:hover {
background: rgba(239, 83, 80, 0.2);
}
.ws-table .ws-btn-icon-delete svg {
width: 16px;
height: 16px;
fill: var(--ws-danger);
}
.ws-table .ws-btn-icon-delete:hover svg {
fill: var(--ws-danger-dark);
}
.ws-table .ws-link {
color: var(--ws-accent);
text-decoration: none;

View File

@@ -28,9 +28,8 @@
<td class="ws-num">{{ obj.amount|ws_num:2 }}</td>
<td>{{ obj.supplier_order|default:"—" }}</td>
<td class="ws-actions">
<a href="{% url 'documents:cash_expense_edit' obj.pk %}" class="ws-link">Изменить</a>
<span class="ws-text-muted"> · </span>
<a href="{% url 'documents:cash_expense_delete' obj.pk %}" class="ws-link ws-link-danger">Удалить</a>
<a href="{% url 'documents:cash_expense_edit' obj.pk %}" class="ws-link ws-btn-icon-edit" title="Изменить" aria-label="Изменить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg></a>
<a href="{% url 'documents:cash_expense_delete' obj.pk %}" class="ws-link ws-link-danger ws-btn-icon-delete" title="Удалить" aria-label="Удалить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></a>
</td>
</tr>
{% empty %}

View File

@@ -28,9 +28,8 @@
<td class="ws-num">{{ obj.amount|ws_num:2 }}</td>
<td>{{ obj.customer_order|default:"—" }}</td>
<td class="ws-actions">
<a href="{% url 'documents:cash_inflow_edit' obj.pk %}" class="ws-link">Изменить</a>
<span class="ws-text-muted"> · </span>
<a href="{% url 'documents:cash_inflow_delete' obj.pk %}" class="ws-link ws-link-danger">Удалить</a>
<a href="{% url 'documents:cash_inflow_edit' obj.pk %}" class="ws-link ws-btn-icon-edit" title="Изменить" aria-label="Изменить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg></a>
<a href="{% url 'documents:cash_inflow_delete' obj.pk %}" class="ws-link ws-link-danger ws-btn-icon-delete" title="Удалить" aria-label="Удалить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></a>
</td>
</tr>
{% empty %}

View File

@@ -28,9 +28,8 @@
<td>{{ obj.recipient }}</td>
<td class="ws-num">{{ obj.amount|ws_num:2 }}</td>
<td class="ws-actions">
<a href="{% url 'documents:cash_transfer_edit' obj.pk %}" class="ws-link">Изменить</a>
<span class="ws-text-muted"> · </span>
<a href="{% url 'documents:cash_transfer_delete' obj.pk %}" class="ws-link ws-link-danger">Удалить</a>
<a href="{% url 'documents:cash_transfer_edit' obj.pk %}" class="ws-link ws-btn-icon-edit" title="Изменить" aria-label="Изменить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg></a>
<a href="{% url 'documents:cash_transfer_delete' obj.pk %}" class="ws-link ws-link-danger ws-btn-icon-delete" title="Удалить" aria-label="Удалить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></a>
</td>
</tr>
{% empty %}

View File

@@ -32,9 +32,8 @@
<td>{{ obj.client }}</td>
<td class="ws-num">{{ obj.total_amount|ws_num:2 }}</td>
<td class="ws-actions">
<a href="{% url 'documents:customer_order_edit' obj.pk %}" class="ws-link">Изменить</a>
<span class="ws-text-muted"> · </span>
<a href="{% url 'documents:customer_order_delete' obj.pk %}" class="ws-link ws-link-danger">Удалить</a>
<a href="{% url 'documents:customer_order_edit' obj.pk %}" class="ws-link ws-btn-icon-edit" title="Изменить" aria-label="Изменить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg></a>
<a href="{% url 'documents:customer_order_delete' obj.pk %}" class="ws-link ws-link-danger ws-btn-icon-delete" title="Удалить" aria-label="Удалить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></a>
</td>
</tr>
{% empty %}

View File

@@ -30,9 +30,8 @@
<td class="ws-num">{{ obj.total_in_currency|ws_num:2 }}</td>
<td class="ws-num">{{ obj.total_amount|ws_num:2 }}</td>
<td class="ws-actions">
<a href="{% url 'documents:supplier_order_edit' obj.pk %}" class="ws-link">Изменить</a>
<span class="ws-text-muted"> · </span>
<a href="{% url 'documents:supplier_order_delete' obj.pk %}" class="ws-link ws-link-danger">Удалить</a>
<a href="{% url 'documents:supplier_order_edit' obj.pk %}" class="ws-link ws-btn-icon-edit" title="Изменить" aria-label="Изменить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg></a>
<a href="{% url 'documents:supplier_order_delete' obj.pk %}" class="ws-link ws-link-danger ws-btn-icon-delete" title="Удалить" aria-label="Удалить"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></a>
</td>
</tr>
{% empty %}