2021-01-30 15:03:50 -05:00
|
|
|
{% extends 'user/user_layout.html' %}
|
2020-12-12 21:25:04 -05:00
|
|
|
{% load bookwyrm_tags %}
|
2021-02-28 20:10:30 -05:00
|
|
|
{% load i18n %}
|
2020-11-10 16:39:37 -05:00
|
|
|
|
2021-01-30 15:03:50 -05:00
|
|
|
{% block header %}
|
|
|
|
<header class="columns">
|
|
|
|
<h1 class="title">
|
2021-02-28 13:00:36 -05:00
|
|
|
{% if is_self %}
|
|
|
|
{% trans "Your Shelves" %}
|
2021-01-30 15:03:50 -05:00
|
|
|
{% else %}
|
2021-02-28 13:00:36 -05:00
|
|
|
{% blocktrans with username=user.display_name %}{{ username }}: Shelves{% endblocktrans %}
|
2021-01-30 15:03:50 -05:00
|
|
|
{% endif %}
|
|
|
|
</h1>
|
|
|
|
</header>
|
|
|
|
{% endblock %}
|
2020-11-10 17:52:04 -05:00
|
|
|
|
2021-01-30 15:03:50 -05:00
|
|
|
{% block panel %}
|
2020-11-10 17:52:04 -05:00
|
|
|
<div class="block columns">
|
|
|
|
<div class="column">
|
2021-02-27 10:53:27 -05:00
|
|
|
<div class="tabs">
|
2020-11-10 17:52:04 -05:00
|
|
|
<ul>
|
2021-02-27 10:53:27 -05:00
|
|
|
{% for shelf_tab in shelves %}
|
|
|
|
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
|
2021-03-02 13:32:46 -05:00
|
|
|
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}"{% if shelf_tab.identifier == shelf.identifier %} aria-current="page"{% endif %}>{% if shelf_tab.identifier == 'to-read' %}{% trans "To Read" %}{% elif shelf_tab.identifier == 'reading' %}{% trans "Currently Reading" %}{% elif shelf_tab.identifier == 'read' %}{% trans "Read" %}{% else %}{{ shelf_tab.name }}{% endif %}</a>
|
2020-11-10 17:52:04 -05:00
|
|
|
</li>
|
2021-02-27 10:53:27 -05:00
|
|
|
{% endfor %}
|
2020-11-10 17:52:04 -05:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-11-10 16:39:37 -05:00
|
|
|
{% if is_self %}
|
|
|
|
<div class="column is-narrow">
|
2021-02-28 20:10:30 -05:00
|
|
|
{% trans "Create shelf" as button_text %}
|
|
|
|
{% include 'snippets/toggle/open_button.html' with text=button_text icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
|
2020-11-10 16:39:37 -05:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2021-02-03 15:36:20 -05:00
|
|
|
<div class="block">
|
|
|
|
{% include 'user/create_shelf_form.html' with controls_text='create-shelf-form' %}
|
2020-09-29 22:48:10 -04:00
|
|
|
</div>
|
|
|
|
|
2021-02-23 16:04:24 -05:00
|
|
|
<div class="block columns is-mobile">
|
2020-11-10 16:39:37 -05:00
|
|
|
<div class="column">
|
2020-11-10 19:18:48 -05:00
|
|
|
<h2 class="title is-3">
|
|
|
|
{{ shelf.name }}
|
|
|
|
<span class="subtitle">
|
|
|
|
{% include 'snippets/privacy-icons.html' with item=shelf %}
|
|
|
|
</span>
|
|
|
|
</h2>
|
2020-11-10 16:39:37 -05:00
|
|
|
</div>
|
|
|
|
{% if is_self %}
|
|
|
|
<div class="column is-narrow">
|
2021-02-28 20:10:30 -05:00
|
|
|
{% trans "Edit shelf" as button_text %}
|
|
|
|
{% include 'snippets/toggle/open_button.html' with text=button_text icon="pencil" controls_text="edit-shelf-form" focus="edit-shelf-form-header" %}
|
2020-11-10 16:39:37 -05:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2021-02-03 15:44:51 -05:00
|
|
|
<div class="block">
|
|
|
|
{% include 'user/edit_shelf_form.html' with controls_text="edit-shelf-form" %}
|
2020-11-10 23:11:21 -05:00
|
|
|
</div>
|
|
|
|
|
2020-09-29 17:11:55 -04:00
|
|
|
<div class="block">
|
2020-02-21 19:03:05 -05:00
|
|
|
<div>
|
2020-12-30 19:07:29 -05:00
|
|
|
{% include 'snippets/shelf.html' with shelf=shelf books=books ratings=ratings %}
|
2020-02-21 19:03:05 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|