haldis/app/templates/locations.html
mcbloch d0863325a5
Restructuring the codebase!
But for real, it's a real shitstorm in there.
- Added context by making the init go through a function
  and not implicitly happen via imports
- Fixup all context and contextless function mixups
- splitup the models in sensible different files
- give the dump of view functions in views/__init__.py their own file
- add all routes via blueprints, not half of them
- move the slack notifications function and class to its own file,
    no idea what it was doing in a views file in the first place.
2019-08-28 03:46:04 +02:00

31 lines
1.1 KiB
HTML

{% extends "layout.html" %}
{% set active_page = "locations" -%}
{% import "utils.html" as util %}
{% block container %}
<div class="row">
<div class="col-md-push-1 col-md-10 darker">
<h3>Locations</h3>
<table class="table table-hover table-condensed">
<thead>
<tr><th>Name</th><th>Address</th><th></th><th></th><th></th></tr>
</thead>
<tbody>
{% for loc in locations -%}
<tr>
<td><a href="{{ url_for('general_bp.location', id=loc.id) }}">{{ loc.name }}</a></td>
<td>{{ loc.address }}<td>
<td><a href="{{ loc.website}}"><span class="glyphicon glyphicon-link"></span></a></td>
<td>
{% if not current_user.is_anonymous() %}
<a href="{{ url_for("order_bp.orders", location_id=loc.id) }}" class="btn btn-primary btn-xs">Create order</a>
{% endif %}
</td>
</tr>
{%- endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}