Adapted view meal page to newer backend

Davide Bongiovanni 6 years ago
parent 1e0668ad77
commit 3853c6aeb3

@ -1,7 +1,7 @@
<!DOCTYPE html>
<title>Meal planned for {{meal_date}} - KUKAPP</title>
<title>Meal planned for {{meal.meal_friendly_date}} - KUKAPP</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
<script src="{{ url_for('static', filename='script.js') }}"></script>
<link href="" rel="stylesheet">
@ -29,34 +29,34 @@
{% endfor %}
<div class="right-pane">
<h1>When: {{date}}</h1>
<h1>When: {{meal.meal_friendly_date}}</h1>
<div class="flex-card">
{% if cook.confirmed == "no" %}
{% if meal.kuk == "" %}
<img src="{{url_for('static', filename='question.png')}}">
<p>If nobody volunteers,<br><img class="flex-small-thumb" src="{{url_for('static', + '.png')}}" title="{{}}" align="middle"> will cook.</p>
<p>If nobody volunteers,<br><img class="flex-small-thumb" src="{{url_for('static', filename=meal.kuk + '.png')}}" title="{{}}" align="middle"> will cook.</p>
<div class="rect-button" onclick="location.href='/volunteer';" style="background-color: #EE7500;">VOLUNTEER</div>
{% else %}
<img src="{{url_for('static', filename= + '.png')}}">
<span>{{ }}</span>
<img src="{{url_for('static', filename=meal.kuk + '.png')}}">
<span class="username">{{ meal.kuk }}</span>
<div class="rect-button" style="background-color: #8faf38; cursor: default;">CONFIRMED</div>
{% endif %}
{% for eater in eaters %}
{% for eater in meal.eaters %}
<div class="flex-card">
<img src="{{url_for('static', filename=eater + '.png')}}">
<span>{{ eater }}</span>
<span class="username">{{ eater }}</span>
{% endfor %}
{% if not in eaters %}
{% if not in eaters and != meal.kuk %}
<div class="flex-card" style="background: none; box-shadow: none">
<div class="round-button" onclick="location.href='/addme';"><i class="fa fa-plus" aria-hidden="true"></i></div>
<div class="round-button" onclick="location.href='/addme?meal={{}}';"><i class="fa fa-plus" aria-hidden="true"></i></div>
<span>Add me</span>
{% else %}
<div class="flex-card" style="background: none; box-shadow: none">
<div class="round-button" onclick="location.href='/removeme';"><i class="fa fa-minus" aria-hidden="true"></i></div>
<div class="round-button" onclick="location.href='/removeme?meal={{}}';"><i class="fa fa-minus" aria-hidden="true"></i></div>
<span>Remove me</span>
{% endif %}