You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
<!-- templates/results.html --> |
|
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<title>Resultat - Vad säger de i Riksdagen?</title> |
|
</head> |
|
<body> |
|
<h1>Resultat för "{{ query }}"</h1> |
|
|
|
<!-- Filters --> |
|
<form method="get" action="{{ url_for('results') }}"> |
|
<!-- Parties Filter --> |
|
<h3>Filter by Parties:</h3> |
|
{% for party in parties %} |
|
<input type="checkbox" name="parties" value="{{ party }}" {% if party in selected_parties %}checked{% endif %}> {{ party }} |
|
{% endfor %} |
|
|
|
<!-- Years Filter --> |
|
<h3>Filter by Years:</h3> |
|
From: <select name="from_year"> |
|
{% for year in years %} |
|
<option value="{{ year }}" {% if year == from_year %}selected{% endif %}>{{ year }}</option> |
|
{% endfor %} |
|
</select> |
|
To: <select name="to_year"> |
|
{% for year in years %} |
|
<option value="{{ year }}" {% if year == to_year %}selected{% endif %}>{{ year }}</option> |
|
{% endfor %} |
|
</select> |
|
|
|
<input type="hidden" name="query" value="{{ query }}"> |
|
<button type="submit">Apply Filters</button> |
|
</form> |
|
|
|
<!-- Display Results --> |
|
{% for row in data %} |
|
<div> |
|
<h3>{{ row['Talare'] }} - {{ row['Datum'] }}</h3> |
|
<p>{{ row['Utdrag'] }}</p> |
|
<a href="{{ row['url_session'] }}">Read more</a> |
|
</div> |
|
{% endfor %} |
|
</body> |
|
</html> |