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.
61 lines
1.8 KiB
HTML
61 lines
1.8 KiB
HTML
2 years ago
|
{% extends 'base.html' %}
|
||
|
|
||
|
{% block title %}Custom Locations{% endblock %}
|
||
|
|
||
|
{% block header %}<h1>Show menus for custom location selection</h1>{% endblock %}
|
||
|
|
||
|
{% block content %}
|
||
|
|
||
|
<form class="filter-form" action="{% url 'mensaviewer:custom' %}" 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>
|
||
|
<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>
|
||
|
<div class="location-filter">
|
||
|
{% for location in locations %}
|
||
|
<label>
|
||
|
{{ location.name }}
|
||
|
<input type="checkbox" name="location" value="{{ location.mensa_id }}" {% if location.mensa_id in selected_locations %} 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.mensa_id == 1 %}a-mensa{% elif menu.mensa_id == 6 %}b-mensa{% endif %}">
|
||
|
<a href="{% url 'mensaviewer:menu_detail' menu.pk %}">{{ menu.name }}</a>
|
||
|
<p>{{ menu.art }}</p>
|
||
|
<p>{{ menu.price }}</p>
|
||
|
<p>{{ menu.types }}</p>
|
||
|
<p>{{ menu.allergens }}</p>
|
||
|
<p>{{ menu.likes }}</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>
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
|
||
|
{% endblock %}
|