ciclos

ref: master

core/templates/orders.html


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{% extends "layout.html" %}
{% block body %}
  <section>
    <h1> Seus pedidos </h1>

    {% for order in orders %}
    <div class="order p-5 {{ 'current-cycle' if order.cycle.status.value == "published" }}">
        Seu pedido no ciclo <strong>{{ order.cycle.name }}</strong>:
        <div>
          <small>{{ order.cycle.start_at.strftime("%d/%m/%Y") }} até {{ order.cycle.end_at.strftime("%d/%m/%Y") }}</small>
        </div>

        <ul>
          {% for product in order.products() %}
            <li>{{ product.title }}</li>
          {% endfor %}
        </ul>

        <div>
          <strong> Total: </strong> <em>{{ order.total() | as_currency }}</em>
        </div>

        <div class="pt-5 pb-5">
          <a href="{{url_for('cycles.show', id = order.cycle.id)}}">Ver ciclo</a>
        </div>
      </div>
    {% endfor %}
  </section>
{% endblock %}