PaperParser/app/blueprints/api/collections/templates/collections/card.j2

30 lines
1.3 KiB
Django/Jinja

<div data-collection-id="{{ collection.id }}" class="col mb-3">
<div class="card">
<div class="card-header"><h5>{{ collection.name }}</h5></div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Кол-во пользрвателей: {{ collection.users|length }}</li>
</ul>
<div class="card-footer px-2 pt-2">
<div class="d-flex gap-2" role="group">
<form action="/api/collections/{{ collection.id }}" method="DELETE">
<button
type="submit"
hx-delete="/api/collections/{{ collection.id }}"
hx-swap="outerHTML"
hx-target='[data-collection-id="{{ collection.id }}"]'
hx-confirm="Вы уверены, что хотите удалить коллекцию?"
class="btn btn-outline-danger"
>
Удалить
</button>
</form>
<a
href="/api/collections/{{ collection.id }}/csv"
class="btn btn-outline-success"
>
Экспорт
</a>
</div>
</div>
</div>
</div>