Fix some bugs (closes #8)

This commit is contained in:
Feliciaan De Palmenaer 2015-03-29 11:46:08 +02:00
parent 7f8c18dbbe
commit b9a1a62a81
3 changed files with 4 additions and 5 deletions

View file

@ -28,7 +28,7 @@
</div>
<div class="row">
<div class="col-md-push-1 col-md-4 darker">
<h3>Orders</h3>
<h3>Items</h3>
{% for item in order.items %}
{{ item.get_name() }} - {{ item.product.name }} - {{ item.product.price|euro }}
{% if item.can_delete(order.id, current_user.id, session.get('anon_name', '')) -%}<a href="{{ url_for('.delete_item', order_id=order.id, item_id=item.id) }}"><span class="glyphicon glyphicon-remove"></span></a>{%- endif %}<br/>

View file

@ -6,7 +6,7 @@
<b>Orders:</b> {{ order.items.count() }}</p>
</div>
<div class="col-md-3">
<a class="btn btn-primary align-bottom full-width" href="{{ url_for('order_bp.order', id=order.id) }}">Open</a>
<a class="btn btn-primary align-bottom full-width" href="{{ url_for('order_bp.order', id=order.id) }}">Expand</a>
</div>
</div>
{%- endmacro %}

View file

@ -23,8 +23,7 @@ zeus = oauth.remote_app(
def zeus_login():
if app.debug:
return zeus.authorize(callback=url_for('authorized', _external=True))
return zeus.authorize(callback=url_for('authorized', _external=True))
@app.route('/login/zeus/authorized')
@ -50,7 +49,7 @@ def authorized():
return login_and_redirect_user(user)
flash("You're not allowed to enter, please contact a system administrator")
return redirect(url_for("admin.index"))
return redirect(url_for("home"))
@zeus.tokengetter