moviewyrm/bookwyrm/templates/user/shelf.html
2021-03-02 10:32:46 -08:00

69 lines
2.3 KiB
HTML

{% extends 'user/user_layout.html' %}
{% load bookwyrm_tags %}
{% load i18n %}
{% block header %}
<header class="columns">
<h1 class="title">
{% if is_self %}
{% trans "Your Shelves" %}
{% else %}
{% blocktrans with username=user.display_name %}{{ username }}: Shelves{% endblocktrans %}
{% endif %}
</h1>
</header>
{% endblock %}
{% block panel %}
<div class="block columns">
<div class="column">
<div class="tabs">
<ul>
{% for shelf_tab in shelves %}
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
<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>
</li>
{% endfor %}
</ul>
</div>
</div>
{% if is_self %}
<div class="column is-narrow">
{% 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" %}
</div>
{% endif %}
</div>
<div class="block">
{% include 'user/create_shelf_form.html' with controls_text='create-shelf-form' %}
</div>
<div class="block columns is-mobile">
<div class="column">
<h2 class="title is-3">
{{ shelf.name }}
<span class="subtitle">
{% include 'snippets/privacy-icons.html' with item=shelf %}
</span>
</h2>
</div>
{% if is_self %}
<div class="column is-narrow">
{% 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" %}
</div>
{% endif %}
</div>
<div class="block">
{% include 'user/edit_shelf_form.html' with controls_text="edit-shelf-form" %}
</div>
<div class="block">
<div>
{% include 'snippets/shelf.html' with shelf=shelf books=books ratings=ratings %}
</div>
</div>
{% endblock %}