zmiana month na m
This commit is contained in:
2
app.py
2
app.py
@@ -1268,7 +1268,7 @@ def favicon():
|
||||
def main_page():
|
||||
now = datetime.now(timezone.utc)
|
||||
|
||||
month_param = request.args.get("month", None) # surowy parametr z URL
|
||||
month_param = request.args.get("m", None)
|
||||
start = end = None
|
||||
|
||||
if month_param in (None, ""):
|
||||
|
@@ -39,7 +39,7 @@
|
||||
<label for="monthSelect" class="text-white small mb-0">📅 Wybierz miesiąc:</label>
|
||||
<select id="monthSelect" class="form-select form-select-sm bg-dark text-white border-secondary"
|
||||
style="min-width: 180px;"
|
||||
onchange="window.location.search='?month='+this.value">
|
||||
onchange="window.location.search='?m='+this.value">
|
||||
{% for m in month_options %}
|
||||
{% set year, month = m.split('-') %}
|
||||
<option value="{{ m }}" {% if selected_month == m %}selected{% endif %}>
|
||||
@@ -231,12 +231,12 @@
|
||||
<div class="d-grid gap-2">
|
||||
{% for m in month_options %}
|
||||
{% set year, month = m.split('-') %}
|
||||
<a href="{{ url_for('main_page', month=m) }}"
|
||||
<a href="{{ url_for('main_page', m=m) }}"
|
||||
class="btn btn-outline-light {% if selected_month == m %}active{% endif %}">
|
||||
{{ month_names[month|int - 1] }} {{ year }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
<a href="{{ url_for('main_page', month='all') }}"
|
||||
<a href="{{ url_for('main_page', m='all') }}"
|
||||
class="btn btn-outline-secondary {% if selected_month == 'all' %}active{% endif %}">
|
||||
📋 Wyświetl wszystkie
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user