ciclos

ref: legacy

src/templates/cycles.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
30
31
32
33
34
35
36
{% extends "layout.html" %}
{% block body %}
<section class="cycles">
  <h1>Ciclo em aberto</h1>
  <section>
    <div class="{{ "box" if current_cycle.status.value == 'published' }}">
      <strong>Compras:</strong> {{ current_cycle.start_at.strftime("%A, %d/%m") }} até {{ current_cycle.end_at.strftime("%A, %d/%m") }} 
      {% if current_cycle.status.value == 'published' %}
        <strong class="pl-5 f-right"> ACONTECENDO </strong>
      {% endif %}
    </div>
    <div class="{{ "box" if current_cycle.status.value == 'delivery' }}">
      <strong>Entrega:</strong> {{ current_cycle.delivery_start_at.strftime("%d/%m/%Y ") }} até {{ current_cycle.delivery_end_at.strftime("%d/%m/%Y") }}
      {% if current_cycle.status.value == 'delivery' %}
        <strong class="pl-5 f-right"> ACONTECENDO </strong>
      {% endif %}
    </div>
  </section>
  <div class="cycle">
    <h2>{{ current_cycle.title }}</h2>
    <p class="white-space-pre">{{ current_cycle.description }}</p>
    <a href="{{url_for('cycles.show', id = current_cycle.id)}}">Ver ciclo</a> 
    <a href="{{url_for('cycles.close', id = current_cycle.id)}}">Fechar ciclo</a>
  </div>
</section>

<section class="closed-cycles"> 
  <h1>Ciclos passados</h1>
  {% for cycle in closed_cycles %}
    <div class="cycle">
      <h2>{{ cycle.name }}</h2>
      <em>Ciclo fechado em {{ cycle.delivery_end_at.strftime("%d/%m/%Y") }} </em>
    </div>
 {% endfor %}
</section>
{% endblock %}