You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.7 KiB
HTML

{% extends 'base.html' %}
{% block title %}Flensburg{% endblock %}
{% block header %}<h1>Mensen in Flensburg</h1>{% endblock %}
{% block content %}
<form class="filter-form" action="{% url 'mensaviewer:flensburg' %}" method="get">
<input type="hidden" name="filterform" value="filter">
<div class="type-filter">
{% for name, id in types %}
<label>
{{ name }}
<input type="checkbox" name="type" value={{ id }} {% if id in checked_types %} checked{% endif %}>
</label>
{% endfor %}
</div>
<hr>
<div class="status-filter">
{% for status_value in status_values %}
<label>
{{ status_value }}
<input type="radio" name="status" value="{{ status_value }}" {% if status == status_value %} checked{% endif %}>
</label>
{% endfor %}
</div>
<button type="submit">Filter</button>
</form>
<div class="container">
{% for day, menus in menu_data.items %}
<div class="column">
<h2>{{ day }}</h2>
{% for menu in menus %}
<div class="menu {% if menu.location.mensa_id == '1' %}a-mensa{% elif menu.location.mensa_id == '6' %}b-mensa{% endif %}">
<p>{{ menu.art }} - <a href="{% url 'mensaviewer:location_detail' menu.location.pk %}">{{ menu.location.name }}</a></p>
<hr>
<h4><a href="{% url 'mensaviewer:menu_detail' menu.pk %}">{{ menu.name }}</a></h4>
<h5>{{ menu.price }}</h5>
<p>{{ menu.types }}</p>
<p>{{ menu.allergens }}</p>
<hr>
<p>Rating: {{ menu.likes }}</p>
<p>
<a href="{% url 'mensaviewer:like' menu.pk %}?next={{ request.path }}">Like</a> |
<a href="{% url 'mensaviewer:dislike' menu.pk %}?next={{ request.path }}">Dislike</a>
</p>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endblock %}