v1.4: group folder/photo limits and ad banners
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
<div class="container">
|
||||
<div class="admin-panel folder-create">
|
||||
<h2 class="admin-panel__title">Создать папку</h2>
|
||||
{% if quota and not quota.folders_unlimited and quota.folder_count >= quota.folder_limit %}
|
||||
<p class="form-hint form-hint--warn">Достигнут лимит папок: {{ quota.folder_count }} / {{ quota.folder_limit }}</p>
|
||||
{% else %}
|
||||
<form method="post" action="{{ url_for('folders.create_folder') }}" class="auth-form folder-create__form">
|
||||
<div class="form-group">
|
||||
<label for="name">Название</label>
|
||||
@@ -31,6 +34,14 @@
|
||||
</label>
|
||||
<button type="submit" class="btn btn--primary">Создать папку</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if quota %}
|
||||
<p class="form-hint">
|
||||
Лимит группы «{{ quota.group.name if quota.group else 'Пользователи' }}»:
|
||||
папки {{ quota.folder_count }}{% if not quota.folders_unlimited %} / {{ quota.folder_limit }}{% else %} / без лимита{% endif %},
|
||||
фото {{ quota.photo_count }}{% if not quota.photos_unlimited %} / {{ quota.photo_limit }}{% else %} / без лимита{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<h2 class="section-title">Мои папки</h2>
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
{% include "partials/alerts.html" %}
|
||||
|
||||
{% with banners=site_banners.get('cabinet', []), position='cabinet' %}
|
||||
{% include "partials/banners.html" %}
|
||||
{% endwith %}
|
||||
|
||||
<section class="stats-bar">
|
||||
<div class="container stats">
|
||||
<div class="stat-card">
|
||||
@@ -51,6 +55,36 @@
|
||||
<div class="quota-bar__fill {% if quota.percent > 90 %}quota-bar__fill--warn{% endif %}" style="width: {{ quota.percent }}%"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="quota-bar__limits">
|
||||
<span>
|
||||
Папки:
|
||||
{{ quota.folder_count }}
|
||||
{% if not quota.folders_unlimited %}
|
||||
/ {{ quota.folder_limit }}
|
||||
{% else %}
|
||||
/ без лимита
|
||||
{% endif %}
|
||||
</span>
|
||||
<span>
|
||||
Фото:
|
||||
{{ quota.photo_count }}
|
||||
{% if not quota.photos_unlimited %}
|
||||
/ {{ quota.photo_limit }}
|
||||
{% else %}
|
||||
/ без лимита
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% if not quota.folders_unlimited %}
|
||||
<div class="quota-bar__track quota-bar__track--sm">
|
||||
<div class="quota-bar__fill {% if quota.folders_percent > 90 %}quota-bar__fill--warn{% endif %}" style="width: {{ quota.folders_percent }}%"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not quota.photos_unlimited %}
|
||||
<div class="quota-bar__track quota-bar__track--sm">
|
||||
<div class="quota-bar__fill {% if quota.photos_percent > 90 %}quota-bar__fill--warn{% endif %}" style="width: {{ quota.photos_percent }}%"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user