From ee40ee101cd155629510021d496af9ac1bf07e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Wed, 13 Aug 2025 15:23:40 +0200 Subject: [PATCH] zmiana month na m --- templates/admin/admin_panel.html | 63 ++++++++++++++++---------------- templates/admin/receipts.html | 21 +++++------ 2 files changed, 40 insertions(+), 44 deletions(-) diff --git a/templates/admin/admin_panel.html b/templates/admin/admin_panel.html index 614ee61..ae7e961 100644 --- a/templates/admin/admin_panel.html +++ b/templates/admin/admin_panel.html @@ -133,30 +133,30 @@ {# LEWA STRONA — przyciski ← → TYLKO gdy nie show_all #}
{% if not show_all %} - {% set current_date = now.replace(day=1) %} - {% set prev_month = (current_date - timedelta(days=1)).strftime('%Y-%m') %} - {% set next_month = (current_date + timedelta(days=31)).replace(day=1).strftime('%Y-%m') %} + {% set current_date = now.replace(day=1) %} + {% set prev_month = (current_date - timedelta(days=1)).strftime('%Y-%m') %} + {% set next_month = (current_date + timedelta(days=31)).replace(day=1).strftime('%Y-%m') %} - {% if prev_month in month_options %} - - ← {{ prev_month }} - - {% else %} - - {% endif %} - - {% if next_month in month_options %} - - {{ next_month }} → - - {% else %} - - {% endif %} + {% if prev_month in month_options %} + + ← {{ prev_month }} + {% else %} - {# Tryb wszystkie miesiące — możemy pokazać skrót do bieżącego miesiąca #} - - 📅 Przejdź do bieżącego miesiąca - + + {% endif %} + + {% if next_month in month_options %} + + {{ next_month }} → + + {% else %} + + {% endif %} + {% else %} + {# Tryb wszystkie miesiące — możemy pokazać skrót do bieżącego miesiąca #} + + 📅 Przejdź do bieżącego miesiąca + {% endif %}
@@ -167,10 +167,10 @@ @@ -179,14 +179,14 @@
-

+

📄 Listy zakupowe {% if show_all %} - — wszystkie miesiące + — wszystkie miesiące {% else %} - — {{ month_str|replace('-', ' / ') }} + — {{ month_str|replace('-', ' / ') }} {% endif %} -

+
@@ -264,8 +264,7 @@ diff --git a/templates/admin/receipts.html b/templates/admin/receipts.html index 28ace36..d486f77 100644 --- a/templates/admin/receipts.html +++ b/templates/admin/receipts.html @@ -72,31 +72,30 @@ {# Poprzednia strona #}
  • + href="{{ url_for('admin_receipts', id=id) }}?{{ query_string }}{% if query_string %}&{% endif %}page={{ page-1 }}"> « Poprzednia
  • {# Numery stron #} {% for p in range(1, total_pages + 1) %} -
  • - - {{ p }} - -
  • +
  • + + {{ p }} + +
  • {% endfor %} {# Następna strona #}
  • + href="{{ url_for('admin_receipts', id=id) }}?{{ query_string }}{% if query_string %}&{% endif %}page={{ page+1 }}"> Następna »
  • - - + {% if orphan_files and request.path.endswith('/all') %}
    @@ -146,8 +145,6 @@ - - {% block scripts %}