Основа для оформления накладных
This commit is contained in:
27
App/Waybill/templates/card.html
Normal file
27
App/Waybill/templates/card.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% macro render_item(item, show_amount = False, show_form = False) %}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">{{ item['name'] }}</h6>
|
||||
<p class="card-text">Цена: {{ item['price'] }} ₽</p>
|
||||
{% if show_amount %}
|
||||
<span>Количество: {{item['count']}}</span><br>
|
||||
<form method="POST" action="">
|
||||
<input type="hidden" name="product_display" value="{{item['work_id']}}" />
|
||||
<button class="btn btn-primary">
|
||||
Добавить в корзину
|
||||
</button>
|
||||
<button type="submit" name="product_display_minus" value="minus" class="btn btn-danger">-</button>
|
||||
<button type="submit" name="product_display_plus" value="plus" class="btn btn-success">+</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if show_form %}
|
||||
<form method="POST" action="">
|
||||
<input type="hidden" name="product_display" value="{{item['work_id']}}" />
|
||||
<input type="submit" class="btn btn-primary" value="Купить" name="buy" />
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user