Holger Frey
7 years ago
3 changed files with 177 additions and 1 deletions
@ -0,0 +1,69 @@ |
|||||||
|
{% extends "ordr2:templates/layout.jinja2" %} |
||||||
|
{% import 'ordr2:templates/macros.jinja2' as macros with context %} |
||||||
|
|
||||||
|
{% block subtitle %} Order | Place Order {% endblock subtitle %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
<div class="content controls"> |
||||||
|
|
||||||
|
<div class="container-fluid"> |
||||||
|
|
||||||
|
<div class="page-controls"> |
||||||
|
<h1>Place an Order</h1> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="row"> |
||||||
|
<div class="span10"> |
||||||
|
|
||||||
|
<div class="alert alert-block alert-info"> |
||||||
|
<h3 class="alert-heading">You can choose from a number of options to place a new order.</h3> |
||||||
|
<ol> |
||||||
|
<li>Place a custom order (empty, not prepopulated order form)</li> |
||||||
|
<li>Use the search field to find a consumable and use a prepopulated order form.</li> |
||||||
|
<li>Choose one of the consumables from a list to use a prepopulated order form.</li> |
||||||
|
</ol> |
||||||
|
</div> |
||||||
|
|
||||||
|
{{ macros.flash_messages() }} |
||||||
|
|
||||||
|
<div class="bordered"> |
||||||
|
<form action="{{ request.resource_url(context, 'splash')}}" method="POST" class="form-inline right" autocomplete="off"> |
||||||
|
<input type="hidden" name="csrf_token" value="{{get_csrf_token()}}"> |
||||||
|
<input type="search" data-provide="typeahead" data-source='{{ consumable_names|tojson }}' placeholder="Search Consumables" size="50" name="search"> |
||||||
|
<button class="btn" type="submit" name="search_consumable">Create Order</button> |
||||||
|
</form> |
||||||
|
<a class="btn" href="{{ request.resource_url(context, 'new') }}">Place a custom order</a> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
<div id="common-consumables-accordion" class="accordion"> |
||||||
|
{% for category, items in consumables.items() %} |
||||||
|
<div class="accordion-group"> |
||||||
|
<div class="accordion-heading"> |
||||||
|
<a href="#{{ category.name }}" data-parent="#common-consumables-accordion" data-toggle="collapse"> |
||||||
|
{{ category.value|capitalize }} |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
<div class="accordion-body collapse" id="{{ category.name }}"> |
||||||
|
<div class="accordion-inner"> |
||||||
|
<ul class="unstyled"> |
||||||
|
{% for item in items %} |
||||||
|
<li><a href="{{ request.resource_url(context, 'new', query={'consumable': item.id}) }}">{{ item.cas_description }}</a> <span>({{ item.package_size }})</span></li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
{% endfor %} |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
{% endblock content %} |
||||||
|
|
||||||
|
|
||||||
|
|
Reference in new issue