Added view meal endpoint

This commit is contained in:
2018-12-02 14:46:00 +01:00
parent cdd6d2f1e3
commit 1e0668ad77
2 changed files with 68 additions and 29 deletions
+2 -2
View File
@@ -39,9 +39,9 @@
<h2>{{meal.meal_friendly_date}}</h2>
{% endif %}
{% if meal.needs_confirmation %}
<div class="flex-card" onclick="location.href='/verify/{{meal.id}}';" style="cursor: pointer; width: 60%; justify-content: space-between;">
<div class="flex-card" onclick="location.href='/verify?meal={{meal.id}}';" style="cursor: pointer; width: 60%; justify-content: space-between;">
{% else %}
<div class="flex-card" onclick="location.href='/meal/{{meal.id}}';" style="cursor: pointer; width: 60%; justify-content: space-between;">
<div class="flex-card" onclick="location.href='/view_meal?meal={{meal.id}}';" style="cursor: pointer; width: 60%; justify-content: space-between;">
{% endif %}
<span{% if meal.needs_confirmation%} style="color: #EE7500;"{% endif %}><b>{{meal.meal_time}}</b></span>
<p style="text-align: left;">{% if meal.needs_confirmation %}Did &nbsp;{% endif %}{% if meal.kuk != "" %}<img class="flex-small-thumb" src="{{url_for('static', filename=meal.kuk + '.png')}}" title="{{meal.kuk}}" align="middle" style="margin: " /> &nbsp; {% if not meal.needs_confirmation %}<b>WILL</b>{% endif %}{% else %}<img class="flex-small-thumb" src="{{url_for('static', filename=meal.candidate + '.png')}}" title="{{meal.kuk}}" align="middle" style="margin: " /> &nbsp; {% if not meal.needs_confirmation %}<b>SHOULD</b>{% endif %}{% endif%} cook for <br>{% for e in meal.eaters %}<img class="flex-small-thumb" src="{{url_for('static', filename=e + '.png')}}" title="{{e}}" align="middle"/>&nbsp; {% endfor %}{% if meal.needs_confirmation %}<b>?</b>{% endif %}</p>