forked from mirrors/bookwyrm
44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
{% extends 'layout.html' %}
|
|
{% block content %}
|
|
|
|
<header class="block">
|
|
<h1 class="title">Lists</h1>
|
|
</header>
|
|
|
|
{% if request.user.is_authenticated %}
|
|
<section class="block content">
|
|
<header class="columns">
|
|
<div class="column">
|
|
<h2 class="title">Your lists</h2>
|
|
</div>
|
|
<div class="column is-narrow">
|
|
{% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon="plus" text="Create new list" %}
|
|
</div>
|
|
</header>
|
|
|
|
<form name="create-list" method="post" action="{% url 'lists' %}" class="box hidden" id="create-list">
|
|
<header class="columns">
|
|
<h3 class="title column">Create list</h3>
|
|
<div class="column is-narrow">
|
|
{% include 'snippets/toggle/toggle_button.html' with controls_text="create-list" label="close" class="delete" nonbutton=True %}
|
|
</div>
|
|
</header>
|
|
{% include 'lists/form.html' %}
|
|
</form>
|
|
|
|
{% if request.user.list_set.exists %}
|
|
{% include 'lists/list_items.html' with lists=request.user.list_set.all %}
|
|
{% endif %}
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% if lists.exists %}
|
|
<section class="block content">
|
|
<h2 class="title">Recent Lists</h2>
|
|
{% if request.user.list_set.exists %}
|
|
{% include 'lists/list_items.html' with lists=lists %}
|
|
{% endif %}
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|