Bootstrap 4 in list_lists
This commit is contained in:
parent
7e0435a948
commit
c470864c86
1 changed files with 9 additions and 8 deletions
|
@ -6,22 +6,23 @@
|
||||||
|
|
||||||
<h1>Todo Lists</h1>
|
<h1>Todo Lists</h1>
|
||||||
|
|
||||||
<p>{{ item_count }} items in {{ list_count }} lists</p>
|
<p>{{ item_count }} items in {{ list_count }} list{{ list_count|pluralize }}</p>
|
||||||
|
|
||||||
{% regroup lists by group as section_list %}
|
{% regroup lists by group as section_list %}
|
||||||
|
|
||||||
{% for group in section_list %}
|
{% for group in section_list %}
|
||||||
<h3>{{ group.grouper }}</h3>
|
<h3>Group: {{ group.grouper }}</h3>
|
||||||
<ul>
|
<ul class="list-group">
|
||||||
{% for item in group.list %}
|
{% for item in group.list %}
|
||||||
<li>
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
<a href="{% url 'todo:list_detail' item.id item.slug %}">{{ item.name }}</a>
|
<a href="{% url 'todo:list_detail' item.id item.slug %}">{{ item.name }}</a>
|
||||||
({{ item.list_detail.count }}/{{ item.item_set.count }})
|
<span class="badge badge-primary badge-pill">{{ item.item_set.count }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
|
||||||
|
</ul>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<p><a href="{% url 'todo:add_list' %}">Create new todo list</a></p>
|
<div class="mt-3"><a href="{% url 'todo:add_list' %}" class="btn btn-primary">Create new todo list</a></div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue