2016-08-01 23:40:04 +02:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% set active_page = "locations" -%}
|
|
|
|
|
|
|
|
{% import "utils.html" as util %}
|
|
|
|
|
|
|
|
{% block container %}
|
2019-12-05 19:39:35 +01:00
|
|
|
<div class="row location_data" xmlns="http://www.w3.org/1999/html">
|
2020-02-29 17:23:20 +01:00
|
|
|
<div class="col-md-push-1 col-md-5 darker">
|
|
|
|
<h3>{{ location.name }}</h3>
|
2021-07-17 20:33:07 +02:00
|
|
|
{% if location.address %}<span class="glyphicon glyphicon-home"></span>{{ location.address }}<br/>{% endif %}
|
|
|
|
{% if location.telephone %}<span class="glyphicon glyphicon-phone"></span><a href="tel:{{ location.telephone }}">{{ location.telephone }}</a><br/>{% endif %}
|
2020-02-29 17:23:20 +01:00
|
|
|
{% if location.website %}<span class="glyphicon glyphicon-link"></span> <a href="{{ location.website}}">{{ location.website }}</a> <br/>{% endif %}
|
|
|
|
{% if location.osm %}<span class="glyphicon glyphicon-map-marker"></span> <a href="{{ location.osm}}">{{ location.osm }}</a> <br/>{% endif %}
|
|
|
|
{% if not current_user.is_anonymous() %}
|
|
|
|
<a href="{{ url_for("order_bp.orders", location_id=location.id) }}" class="btn btn-primary btn-sm">Create order</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col-md-push-1 col-md-5 padding-top sm-no-side-padding md-no-right-padding">
|
|
|
|
{% if location.address %}
|
|
|
|
<div class="small-map" id="mapid"></div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2019-05-30 08:29:08 +02:00
|
|
|
</div>
|
2019-12-05 19:39:35 +01:00
|
|
|
<div class="row location_products">
|
2020-02-29 17:23:20 +01:00
|
|
|
<div class="col-md-push-1 col-md-10 darker">
|
|
|
|
<h3 id="order-title">Products</h3>
|
|
|
|
<table class="table table-hover table-condensed">
|
|
|
|
<thead>
|
|
|
|
<tr><th style="min-width: 20%">Name</th><th>Description</th><th>Price</th></tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for dish in location.dishes -%}
|
|
|
|
<tr>
|
|
|
|
<td>{{ dish.name or dish.id }}</td>
|
2020-02-29 22:26:00 +01:00
|
|
|
<td>
|
|
|
|
{{ dish.description or "" }}
|
|
|
|
{% if dish.choices %}
|
2020-08-15 17:46:51 +02:00
|
|
|
<details class="dish-choices">
|
|
|
|
<summary>
|
2020-02-29 22:26:00 +01:00
|
|
|
{% set comma = joiner(",") %}
|
|
|
|
{% for choice in dish.choices %}{{ comma() }}
|
|
|
|
{{ choice[1].name }}{% endfor %}
|
2020-08-15 17:46:51 +02:00
|
|
|
</summary>
|
|
|
|
<ul>
|
|
|
|
{% for type, choice in dish.choices %}
|
|
|
|
<li><strong>{{ choice.name }}</strong>{{
|
|
|
|
choice.description if choice.description
|
|
|
|
}}{{
|
|
|
|
" (choose one)" if type == "single_choice"
|
|
|
|
}}
|
|
|
|
<ul>
|
|
|
|
{% for option in choice.options %}
|
|
|
|
<li>{{ option.name }}{% if option.description %}:
|
|
|
|
{{ option.description}}{% endif %}{% if option.price %}:
|
|
|
|
{{ option.price | euro }}{% endif %}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</details>
|
2020-02-29 22:26:00 +01:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
2020-02-29 21:56:04 +01:00
|
|
|
<td style="white-space: nowrap;">{{ dish.price_range()|price_range(true) }}<td>
|
2020-02-29 17:23:20 +01:00
|
|
|
</tr>
|
|
|
|
{%- endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2016-08-01 23:40:04 +02:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2019-05-30 08:29:08 +02:00
|
|
|
|
|
|
|
{% block styles %}
|
|
|
|
{{ super() }}
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{url_for('static', filename='css/map.css')}}">
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block scripts %}
|
2020-02-29 17:23:20 +01:00
|
|
|
{{ super() }}
|
2019-05-30 08:29:08 +02:00
|
|
|
|
|
|
|
{% if location.address %}
|
2020-02-29 17:23:20 +01:00
|
|
|
<script src="{{ url_for('static', filename='js/leaflet.js')}}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/map.js' ) }}"></script>
|
|
|
|
<script>
|
|
|
|
let locations = [{
|
|
|
|
"address": "{{location.address}}",
|
|
|
|
"name": "{{location.name}}",
|
|
|
|
"url": "{{location.website}}",
|
|
|
|
"center": true,
|
|
|
|
}];
|
|
|
|
loadmap(locations);
|
|
|
|
</script>
|
2019-05-30 08:29:08 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|