moviewyrm/bookwyrm/templates/lists/lists.html

54 lines
1.5 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 %}
<ul>
{% for list in request.user.list_set.all %}
<li class="block">
{% include 'lists/list-item.html' with list=list %}
</li>
{% endfor %}
</ul>
{% endif %}
</section>
{% endif %}
{% if lists.exists %}
<section class="block content">
<h2 class="title">Recent Lists</h2>
<ul>
{% for list in lists %}
<li class="block">
{% include 'lists/list-item.html' with list=list %}
</li>
{% endfor %}
</ul>
</section>
{% endif %}
{% endblock %}