ciclos

ref: master

core/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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{% extends "layout.html" %}
{% block body %}
{% if current_cycle or closed_cycles %}
	<section class="cycles">
		<h1>Ciclo em aberto</h1>
		<section>
			<div class="{{ "box" if current_cycle.status.value == 'published' }} row">
				<div class="col-xs-12 col-md-8 col-lg-8 col-xl-8">
					<strong>Compras:</strong> {{ current_cycle.start_at.strftime("%A, %d/%m") }} até {{ current_cycle.end_at.strftime("%A, %d/%m") }}
				</div>
				<div class="col-xs-12 col-md-4 col-lg-4 col-xl-4">
					{% if current_cycle.status.value == 'published' %}
					<strong class="pl-5 center-xs center-sm end-md end-lg end-xl d-inline-block w-100"> ACONTECENDO </strong>
					{% endif %}
				</div>
			</div>
			<div class="{{ "box" if current_cycle.status.value == 'delivery' }} row">
				<div class="col-xs-12 col-md-8 col-lg-8 col-xl-8">
					<strong>Entrega:</strong> {{ current_cycle.delivery_start_at.strftime("%d/%m/%Y ") }} até {{ current_cycle.delivery_end_at.strftime("%d/%m/%Y") }}
				</div>

				<div class="col-xs-12 col-md-8 col-lg-8 col-xl-8">
					{% if current_cycle.status.value == 'delivery' %}
					<strong class="pl-5 center-xs center-sm end-md end-lg end-xl d-inline-block w-100"> ACONTECENDO </strong>
					{% endif %}
				</div>
			</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>
	  {% if closed_cycles %}
		  {% 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 %}
	 {% else %}
		<h2> Nenhum ciclo encerrado ainda </h2>
	 {% endif %}
	</section>
{% else %}
<h1> Nenhum ciclo criado </h1>

<div>
	<a href="{{ url_for('cycles.new') }}"> Abrir novo Ciclo </a>
</div>
{% endif %}
{% endblock %}