2021-01-30 21:33:41 -08:00
|
|
|
{% extends 'layout.html' %}
|
2021-05-11 15:14:42 -07:00
|
|
|
{% load utilities %}
|
2021-02-27 18:48:10 -08:00
|
|
|
{% load i18n %}
|
2021-02-28 10:00:36 -08:00
|
|
|
|
|
|
|
{% block title %}{% trans "Lists" %}{% endblock %}
|
|
|
|
|
2021-01-30 21:33:41 -08:00
|
|
|
{% block content %}
|
|
|
|
|
2021-02-23 13:04:24 -08:00
|
|
|
<header class="block columns is-mobile">
|
2021-02-03 12:25:33 -08:00
|
|
|
<div class="column">
|
2021-03-30 10:19:51 -07:00
|
|
|
<h1 class="title">
|
|
|
|
{% trans "Lists" %}
|
|
|
|
{% if request.user.is_authenticated %}
|
2021-04-05 12:53:20 +02:00
|
|
|
<a class="help has-text-weight-normal" href="{% url 'user-lists' request.user|username %}">{% trans "Your Lists" %}</a>
|
2021-03-30 10:19:51 -07:00
|
|
|
{% endif %}
|
|
|
|
</h1>
|
2021-02-03 12:25:33 -08:00
|
|
|
</div>
|
2021-04-14 20:07:51 +02:00
|
|
|
{% if request.user.is_authenticated %}
|
2021-02-03 12:25:33 -08:00
|
|
|
<div class="column is-narrow">
|
2021-02-28 17:10:30 -08:00
|
|
|
{% trans "Create List" as button_text %}
|
2021-08-08 18:40:47 -07:00
|
|
|
{% include 'snippets/toggle/open_button.html' with controls_text="create_list" icon_with_text="plus" text=button_text focus="create_list_header" %}
|
2021-02-03 12:25:33 -08:00
|
|
|
</div>
|
2021-04-14 20:07:51 +02:00
|
|
|
{% endif %}
|
2021-02-03 12:25:33 -08:00
|
|
|
</header>
|
2021-01-31 08:08:52 -08:00
|
|
|
|
2021-02-03 12:25:33 -08:00
|
|
|
<div class="block">
|
2021-08-08 18:40:47 -07:00
|
|
|
{% include 'lists/create_form.html' with controls_text="create_list" %}
|
2021-02-03 12:25:33 -08:00
|
|
|
</div>
|
2021-01-31 08:08:52 -08:00
|
|
|
|
2021-08-23 13:40:07 -07:00
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<nav class="tabs">
|
|
|
|
<ul>
|
|
|
|
{% url 'lists' as url %}
|
|
|
|
<li{% if url in request.path %} class="is-active"{% endif %}>
|
|
|
|
<a href="{{ url }}">{% trans "All Lists" %}</a>
|
|
|
|
</li>
|
|
|
|
{% url 'bookmarked-lists' as url %}
|
|
|
|
<li{% if url in request.path %} class="is-active"{% endif %}>
|
|
|
|
<a href="{{ url }}">{% trans "Bookmarked Lists" %}</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{% endif %}
|
|
|
|
|
2021-01-31 17:34:06 -08:00
|
|
|
{% if lists %}
|
2021-04-24 21:16:30 +02:00
|
|
|
<section class="block">
|
2021-01-31 14:03:38 -08:00
|
|
|
{% include 'lists/list_items.html' with lists=lists %}
|
2021-01-31 08:08:52 -08:00
|
|
|
</section>
|
2021-03-30 10:19:51 -07:00
|
|
|
|
2021-01-31 17:34:06 -08:00
|
|
|
<div>
|
|
|
|
{% include 'snippets/pagination.html' with page=lists path=path %}
|
|
|
|
</div>
|
2021-01-31 08:08:52 -08:00
|
|
|
{% endif %}
|
2021-01-30 21:33:41 -08:00
|
|
|
|
|
|
|
{% endblock %}
|