From 016f9896b7e238a3c49b24159bacd16b97d245eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?=
Date: Sun, 14 Sep 2025 12:59:15 +0200
Subject: [PATCH] poprawki
---
app.py | 2 +-
templates/admin/receipts.html | 32 ++++++++++++++++++++------------
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/app.py b/app.py
index 0ece649..3d384d1 100644
--- a/app.py
+++ b/app.py
@@ -2847,7 +2847,7 @@ def delete_user(user_id):
return redirect(url_for("list_users"))
-@app.route("/admin/receipts/", defaults={'id': 'all'})
+@app.route("/admin/receipts", defaults={'id': 'all'})
@app.route("/admin/receipts/")
@login_required
@admin_required
diff --git a/templates/admin/receipts.html b/templates/admin/receipts.html
index 4dbdc0e..f45e0ed 100644
--- a/templates/admin/receipts.html
+++ b/templates/admin/receipts.html
@@ -20,21 +20,29 @@
{{ (page_filesize / 1024) | round(1) }} kB
{% endif %}
- |
- Łącznie:
-
- {% if total_filesize >= 1024*1024 %}
- {{ (total_filesize / 1024 / 1024) | round(2) }} MB
- {% else %}
- {{ (total_filesize / 1024) | round(1) }} kB
- {% endif %}
-
+ {% if id != 'all' and (id|string).isdigit() %}
+ {% else %}
+ | Łącznie:
+
+ {% if total_filesize >= 1024*1024 %}
+ {{ (total_filesize / 1024 / 1024) | round(2) }} MB
+ {% else %}
+ {{ (total_filesize / 1024) | round(1) }} kB
+ {% endif %}
+
+ {% endif %}