Infoscreen-HTML: Immer die nächsten fünf Daten

This commit is contained in:
Daniel Grams 2020-09-30 10:18:41 +02:00
parent b614a8d5c6
commit 917ff0b84f
2 changed files with 6 additions and 6 deletions

6
app.py
View File

@ -2103,9 +2103,9 @@ def widget_event_date(id):
def widget_infoscreen(au_short_name):
admin_unit = AdminUnit.query.filter(AdminUnit.short_name == au_short_name).first_or_404()
in24hours = now + relativedelta(hours=24)
date_filter = and_(EventDate.start >= now, EventDate.start <= in24hours)
dates = get_event_dates_query_for_admin_unit(admin_unit.id, date_filter).paginate()
#in24hours = now + relativedelta(hours=24)
#date_filter = and_(EventDate.start >= now, EventDate.start <= in24hours)
dates = get_event_dates_query_for_admin_unit(admin_unit.id).paginate(max_per_page=5)
return render_template('widget/infoscreen/read.html',
admin_unit=admin_unit,

View File

@ -45,11 +45,11 @@
<div class="carousel-item {%if loop.first %}active{% endif %}">
<div class="container-fluid h-100">
<div class="row">
{% if date.event.photo_id %}
<div class="col-auto h-100" style="padding:1rem">
{% if date.event.photo_id %}
<img src="{{ url_for('image', id=date.event.photo_id) }}" class="img-fluid" style="object-fit: cover; max-width:20vmin;" />
{% endif %}
<img src="{{ url_for('image', id=date.event.photo_id) }}" class="img-fluid" style="object-fit: cover; max-width:20vmin;" />
</div>
{% endif %}
<div class="col" style="padding:1rem">
<h3>{{ date.event.name }}{{ render_event_status_pill(date.event) }}</h3>
<p>{{ date.event.description | truncate(300) }}</p>