Merge branch 'master' into feature/104/show-map-on-location-page
This commit is contained in:
commit
8e682f0216
4 changed files with 9 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
||||||
<span class="glyphicon glyphicon-home"></span> {{ location.address }} <br/>
|
<span class="glyphicon glyphicon-home"></span> {{ location.address }} <br/>
|
||||||
<span class="glyphicon glyphicon-phone"></span> {{ location.telephone }} <br/>
|
<span class="glyphicon glyphicon-phone"></span> {{ location.telephone }} <br/>
|
||||||
<span class="glyphicon glyphicon-link"></span> <a href="{{ location.website}}">{{ location.website }}</a>
|
<span class="glyphicon glyphicon-link"></span> <a href="{{ location.website}}">{{ location.website }}</a>
|
||||||
|
<a href="{{ url_for("order_bp.orders", location_id=location.id) }}" class="btn btn-primary btn-sm">Create order</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-push-1 col-md-5 padding-top">
|
<div class="col-md-push-1 col-md-5 padding-top">
|
||||||
{% if location.address %}
|
{% if location.address %}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<h3>Locations</h3>
|
<h3>Locations</h3>
|
||||||
<table class="table table-hover table-condensed">
|
<table class="table table-hover table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>Name</th><th>Address</th><th></th></tr>
|
<tr><th>Name</th><th>Address</th><th></th><th></th><th></th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for loc in locations -%}
|
{% for loc in locations -%}
|
||||||
|
@ -17,6 +17,9 @@
|
||||||
<td><a href="{{ url_for('location', id=loc.id) }}">{{ loc.name }}</a></td>
|
<td><a href="{{ url_for('location', id=loc.id) }}">{{ loc.name }}</a></td>
|
||||||
<td>{{ loc.address }}<td>
|
<td>{{ loc.address }}<td>
|
||||||
<td><a href="{{ loc.website}}"><span class="glyphicon glyphicon-link"></span></a></td>
|
<td><a href="{{ loc.website}}"><span class="glyphicon glyphicon-link"></span></a></td>
|
||||||
|
<td>
|
||||||
|
<a href="{{ url_for("order_bp.orders", location_id=loc.id) }}" class="btn btn-primary btn-xs">Create order</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% if not current_user.is_anonymous() %}
|
{% if not current_user.is_anonymous() %}
|
||||||
<div class="col-md-push-4 col-md-6">
|
<div class="col-md-push-4 col-md-6">
|
||||||
<h3>Create new order:</h3>
|
<h3>Edit order:</h3>
|
||||||
<div class="row darker">
|
<div class="row darker">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<form method="post" action="{{ url_for('.order_edit', id=order_id) }}">
|
<form method="post" action="{{ url_for('.order_edit', id=order_id) }}">
|
||||||
|
|
|
@ -17,6 +17,9 @@ order_bp = Blueprint('order_bp', 'order')
|
||||||
def orders(form=None):
|
def orders(form=None):
|
||||||
if form is None and not current_user.is_anonymous():
|
if form is None and not current_user.is_anonymous():
|
||||||
form = OrderForm()
|
form = OrderForm()
|
||||||
|
location_id = request.args.get('location_id')
|
||||||
|
form.location_id.default = location_id
|
||||||
|
form.process()
|
||||||
form.populate()
|
form.populate()
|
||||||
return render_template('orders.html', orders=get_orders(), form=form)
|
return render_template('orders.html', orders=get_orders(), form=form)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue