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