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">
|
2019-05-30 08:29:08 +02:00
|
|
|
<div class="col-md-push-1 col-md-5 darker">
|
|
|
|
<h3>{{ location.name }}</h3>
|
2020-01-27 00:57:51 +01:00
|
|
|
{% if location.address %}<span class="glyphicon glyphicon-home"></span> {{ location.address }}<br/>{% endif %}
|
|
|
|
{% if location.telephone %}<span class="glyphicon glyphicon-phone"></span>{{ location.telephone }}<br/>{% endif %}
|
|
|
|
{% 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 %}
|
2019-05-30 23:27:44 +02:00
|
|
|
{% 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 %}
|
2016-08-01 23:40:04 +02:00
|
|
|
</div>
|
2019-05-31 19:05:40 +02:00
|
|
|
<div class="col-md-push-1 col-md-5 padding-top sm-no-side-padding md-no-right-padding">
|
2019-05-30 08:29:08 +02:00
|
|
|
{% if location.address %}
|
|
|
|
<div class="small-map" id="mapid"></div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-05 19:39:35 +01:00
|
|
|
<div class="row location_products">
|
2016-08-01 23:40:04 +02: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>Name</th><th>Price</th></tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-01-27 00:57:51 +01:00
|
|
|
{% for dish in location.dishes -%}
|
2016-08-01 23:40:04 +02:00
|
|
|
<tr>
|
2020-01-27 00:57:51 +01:00
|
|
|
<td>{{ dish.name }}{% if dish.description %} <span class="description">({{dish.description}})</span>{% endif %}</td>
|
|
|
|
<td>{{ dish.price|euro }}<td>
|
2016-08-01 23:40:04 +02:00
|
|
|
</tr>
|
|
|
|
{%- endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</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 %}
|
|
|
|
{{super()}}
|
|
|
|
|
|
|
|
{% if location.address %}
|
|
|
|
<script src="{{ url_for('static', filename='js/leaflet.js')}}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/map.js' ) }}"></script>
|
|
|
|
<script>
|
|
|
|
let locations = [];
|
|
|
|
|
|
|
|
loc = {
|
|
|
|
"address": "{{location.address}}",
|
|
|
|
"name": "{{location.name}}",
|
2019-05-30 08:46:28 +02:00
|
|
|
"url": "{{location.website}}",
|
2019-05-30 08:29:08 +02:00
|
|
|
"center": true,
|
|
|
|
};
|
|
|
|
locations.push(loc);
|
|
|
|
|
|
|
|
loadmap(locations);
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|