You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.6 KiB
HTML
63 lines
2.6 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block content %}
|
|
<h1>{% block title %} Welcome to FlaskTodo {% endblock %}</h1>
|
|
{% for list, items in lists.items() %}
|
|
<div class="card" style="width: 18rem; margin-bottom: 50px;">
|
|
<div class="card-header">
|
|
<h3>{{ list }}</h3>
|
|
</div>
|
|
<ul class="list-group list-group-flush">
|
|
{% for item in items %}
|
|
<!-- <li class="list-group-item">{{ item['content'] }}</li> -->
|
|
<li class="list-group-item"
|
|
{% if item['done'] %}
|
|
style="text-decoration: line-through;"
|
|
{% endif %}
|
|
>{{ item['content'] }}
|
|
{% if not item ['done'] %}
|
|
{% set URL = 'do' %}
|
|
{% set BUTTON = 'Do' %}
|
|
{% else %}
|
|
{% set URL = 'undo' %}
|
|
{% set BUTTON = 'Undo' %}
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-12 col-md-3">
|
|
<form action="{{ url_for(URL, id=item['id']) }}"
|
|
method="POST">
|
|
<input type="submit" value="{{ BUTTON }}"
|
|
class="btn btn-success btn-sm">
|
|
</form>
|
|
</div>
|
|
<div class="col-12 col-md-3">
|
|
<a class="btn btn-warning btn-sm"
|
|
href="{{ url_for('edit', id=item['id']) }}">Edit</a>
|
|
</div>
|
|
<div class="col-12 col-md-3">
|
|
<form action="{{ url_for('delete', id=item['id']) }}"
|
|
method="POST">
|
|
<input type="submit" value="Delete"
|
|
class="btn btn-danger btn-sm">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
{% if item['assignees'] %}
|
|
<span style="color: #6a6a6a">Assigned to</span>
|
|
{% for assignee in item['assignees'] %}
|
|
<span class="badge badge-primary">
|
|
{{ assignee['name'] }}
|
|
</span>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endfor %}
|
|
{% endblock %} |