2022-04-13 23:12:49 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-04-25 05:55:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<div class="table-wrapper">
|
|
|
|
<div class="table-title">
|
|
|
|
<div class="row">
|
2022-04-30 04:19:31 +00:00
|
|
|
<div class="col-sm-6">
|
|
|
|
{% block header %}
|
|
|
|
<h2>{% block title %}Cycles{% endblock %}</h2>
|
|
|
|
{% endblock %}
|
|
|
|
</div>
|
2022-05-08 18:51:05 +00:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<a class="btn btn-primary" href="{{ url_for('cycles.create') }}">New Cycle</a>
|
|
|
|
</div>
|
2022-04-13 23:12:49 +00:00
|
|
|
</div>
|
2022-04-25 05:55:17 +00:00
|
|
|
</div>
|
|
|
|
{% for cycle in cycles %}
|
2022-04-30 02:38:54 +00:00
|
|
|
<div class="card text-center" style="width: 18rem;">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">
|
|
|
|
{% if cycle['cycle_length'] %}
|
|
|
|
{% if loop.first %}
|
2022-08-12 04:20:37 +00:00
|
|
|
Day <b>{{ cycle['cycle_length'] - 1 }}</b>
|
2022-04-30 02:38:54 +00:00
|
|
|
{% else %}
|
|
|
|
<b>{{ cycle['cycle_length'] }}</b> days.
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% endif %}</h5>
|
|
|
|
<p class="card-text"><b>Started:</b> {{ cycle['start_time'][:10] }}
|
|
|
|
<br>
|
2022-04-30 04:19:31 +00:00
|
|
|
{% if cycle['end_time'] is not none %}
|
2022-04-30 02:38:54 +00:00
|
|
|
<b>Ended: </b>{{ cycle['end_time'][:10] }}
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
<a href="{{ url_for('cycles.update', id=cycle['id'])}}"class="btn btn-primary">Edit</a>
|
|
|
|
</div>
|
2022-04-25 05:55:17 +00:00
|
|
|
</div>
|
|
|
|
{% if not loop.last %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|