added the rest that was missing from the last commit
This commit is contained in:
75
fet2020/templates/tasks/index.html
Normal file
75
fet2020/templates/tasks/index.html
Normal file
@@ -0,0 +1,75 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
|
||||
<div class="grid-container">
|
||||
<h1>Tasks</h1>
|
||||
|
||||
<div class="grid-x">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<label>User
|
||||
<select id="id_user" name="user">
|
||||
{% for user in users %}
|
||||
<option value="{{ user.id }}" {% if current_user == user.id %} selected {% endif %}>
|
||||
{{ user.username }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>Aktion
|
||||
<select id="id_action" name="action">
|
||||
<option value="show_incompleted" {% if not current_action %} selected {% endif %}>unvollständige Tasks</option>
|
||||
<option value="show_all" {% if current_action %} selected {% endif %}>alle Tasks</option>
|
||||
</select>
|
||||
</label>
|
||||
<input type="submit" class="button" name="btn_user" value="Anzeigen">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="grid-x">
|
||||
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{% regroup tasks by task_list as section_list %}
|
||||
{% for group in section_list %}
|
||||
|
||||
<div class="cell">
|
||||
<ul class="no-bullet">
|
||||
|
||||
<h3>{{ group.grouper }}</h3>
|
||||
|
||||
{% for task in group.list %}
|
||||
<input type="checkbox" name="checkbox" value="{{ task.id }}" {% if task.completed %} checked {% endif %}>
|
||||
|
||||
{{ task.title|truncatewords:10 }}</a>
|
||||
|
||||
{{ task.due_date|date:"d.m.Y" }}
|
||||
|
||||
<br>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
<input type="submit" class="button" name="btn_checkbox" value="Task abschließen">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid-x">
|
||||
|
||||
<form action="" method="post">
|
||||
<h2>neue Tasks hinzufügen</h2>
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" class="button" name="btn_input" value="Hinzufügen">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user