diff --git a/templates/admin/admin_panel.html b/templates/admin/admin_panel.html index 048252f..f7eec0c 100644 --- a/templates/admin/admin_panel.html +++ b/templates/admin/admin_panel.html @@ -128,41 +128,38 @@ {% 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') %} + {# Ustal bieżący miesiąc jako początek #} + {% 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') %} + +
+
+ {# Poprzedni miesiąc #} + {% if prev_month in month_options %} + + ← {{ prev_month }} + + {% else %} + + {% endif %} + + {# Następny miesiąc #} + {% if next_month in month_options %} + + {{ next_month }} → + + {% else %} + + {% endif %} +
+
{% endif %} -
-
- {% if not show_all %} - - {# Poprzedni miesiąc #} - {% if prev_month in month_options %} - - ← {{ prev_month }} - - {% else %} - - {% endif %} - - {# Następny miesiąc #} - {% if next_month in month_options %} - - {{ next_month }} → - - {% else %} - - {% endif %} - - {% endif %} -
-
-