36 lines
1.7 KiB
HTML
36 lines
1.7 KiB
HTML
{% extends 'layout/base.html' %}
|
||
{% block title %}Общие ящики (админка){% endblock %}
|
||
{% block topbar_right %}
|
||
<a class="btn btn-primary" href="{{ url_for('shared.admin_new') }}">Новый общий ящик</a>
|
||
{% endblock %}
|
||
{% block body %}
|
||
<div class="content">
|
||
<div class="card">
|
||
<div class="card-head"><div class="card-title">Общие ящики</div></div>
|
||
<table class="tbl">
|
||
<thead><tr><th>Название</th><th>Email</th><th>Доступ у</th><th style="width:160px"></th></tr></thead>
|
||
<tbody>
|
||
{% for sm in shared %}
|
||
<tr>
|
||
<td><strong>{{ sm.name }}</strong></td>
|
||
<td><span class="badge badge-blue">{{ sm.email }}</span></td>
|
||
<td style="color:var(--color-text-secondary);font-size:12px">{{ sm.user_emails|join(', ') }}</td>
|
||
<td style="text-align:right;white-space:nowrap">
|
||
<div style="display:inline-flex;gap:6px;align-items:center;justify-content:flex-end">
|
||
<a class="btn btn-sm" href="{{ url_for('shared.admin_edit', sid=sm.id) }}">Изменить</a>
|
||
<form method="post" action="{{ url_for('shared.admin_delete', sid=sm.id) }}" style="display:inline"
|
||
onsubmit="return confirm('Удалить общий ящик?')">
|
||
<button class="btn btn-sm btn-danger" type="submit">Удалить</button>
|
||
</form>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
{% else %}
|
||
<tr><td colspan="4" style="text-align:center;color:var(--color-text-tertiary);padding:20px">Общих ящиков нет</td></tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
{% endblock %}
|