2020-01-25 23:25:19 +00:00
|
|
|
{% extends 'layout.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2020-12-13 02:25:04 +00:00
|
|
|
{% load bookwyrm_tags %}
|
2020-02-21 23:39:25 +00:00
|
|
|
|
2021-02-28 18:00:36 +00:00
|
|
|
{% block title %}{% trans "Updates" %}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2020-09-30 00:43:30 +00:00
|
|
|
<div class="columns">
|
2021-01-29 18:25:31 +00:00
|
|
|
{% if user.is_authenticated %}
|
2020-09-30 22:00:46 +00:00
|
|
|
<div class="column is-one-third">
|
2021-02-28 02:48:10 +00:00
|
|
|
<h2 class="title is-5">{% trans "Your books" %}</h2>
|
2020-10-02 22:06:42 +00:00
|
|
|
{% if not suggested_books %}
|
2021-02-28 02:48:10 +00:00
|
|
|
<p>{% trans "There are no books here right now! Try searching for a book to get started" %}</p>
|
2020-10-02 22:06:42 +00:00
|
|
|
{% else %}
|
2021-02-28 18:04:04 +00:00
|
|
|
<div class="tab-group">
|
2021-02-27 15:47:03 +00:00
|
|
|
<div class="tabs is-small">
|
|
|
|
<ul role="tablist">
|
|
|
|
{% for shelf in suggested_books %}
|
|
|
|
{% if shelf.books %}
|
|
|
|
{% with shelf_counter=forloop.counter %}
|
|
|
|
<li>
|
|
|
|
<p>
|
2021-03-02 18:32:46 +00:00
|
|
|
{% if shelf.identifier == 'to-read' %}{% trans "To Read" %}
|
|
|
|
{% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %}
|
|
|
|
{% elif shelf.identifier == 'read' %}{% trans "Read" %}
|
|
|
|
{% else %}{{ shelf.name }}{% endif %}
|
2021-02-27 15:47:03 +00:00
|
|
|
</p>
|
|
|
|
<div class="tabs is-small is-toggle">
|
|
|
|
<ul>
|
|
|
|
{% for book in shelf.books %}
|
|
|
|
<li{% if shelf_counter == 1 and forloop.first %} class="is-active"{% endif %}>
|
2021-02-28 18:04:04 +00:00
|
|
|
<a href="#book-{{ book.id }}" id="tab-book-{{ book.id }}" role="tab" aria-label="{{ book.title }}" aria-selected="{% if shelf_counter == 1 and forloop.first %}true{% else %}false{% endif %}" aria-controls="book-{{ book.id }}">
|
2021-02-27 15:47:03 +00:00
|
|
|
{% include 'snippets/book_cover.html' with book=book size="medium" %}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-11-07 04:36:52 +00:00
|
|
|
{% for shelf in suggested_books %}
|
|
|
|
{% with shelf_counter=forloop.counter %}
|
2021-02-27 15:47:03 +00:00
|
|
|
{% for book in shelf.books %}
|
2021-02-28 18:04:04 +00:00
|
|
|
<div class="suggested-tabs card" role="tabpanel" id="book-{{ book.id }}"{% if shelf_counter != 1 or not forloop.first %} hidden{% endif %} aria-labelledby="tab-book-{{ book.id }}">
|
2021-02-27 15:47:03 +00:00
|
|
|
<div class="card-header">
|
|
|
|
<p class="card-header-title">
|
|
|
|
<span>{% include 'snippets/book_titleby.html' with book=book %}</span>
|
2020-11-07 19:54:32 +00:00
|
|
|
</p>
|
2021-02-27 15:47:03 +00:00
|
|
|
<div class="card-header-icon is-hidden-tablet">
|
2021-03-01 01:10:30 +00:00
|
|
|
{% trans "Close" as button_text %}
|
|
|
|
{% include 'snippets/toggle/toggle_button.html' with label=button_text controls_text="book" controls_uid=book.id class="delete" nonbutton=True pressed=True %}
|
2020-11-07 04:36:52 +00:00
|
|
|
</div>
|
2021-02-27 15:47:03 +00:00
|
|
|
</div>
|
|
|
|
<div class="card-content">
|
2021-01-30 23:59:50 +00:00
|
|
|
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
|
2021-01-20 07:04:08 +00:00
|
|
|
{% active_shelf book as active_shelf %}
|
|
|
|
{% if active_shelf.shelf.identifier == 'reading' and book.latest_readthrough %}
|
|
|
|
{% include 'snippets/progress_update.html' with readthrough=book.latest_readthrough %}
|
|
|
|
{% endif %}
|
2021-01-18 04:19:09 +00:00
|
|
|
{% include 'snippets/create_status.html' with book=book %}
|
2020-09-30 19:19:23 +00:00
|
|
|
</div>
|
2020-09-30 00:43:30 +00:00
|
|
|
</div>
|
2021-02-27 15:47:03 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endfor %}
|
2021-02-28 18:04:04 +00:00
|
|
|
</div>
|
2020-10-02 22:06:42 +00:00
|
|
|
{% endif %}
|
2021-01-16 16:19:54 +00:00
|
|
|
|
|
|
|
{% if goal %}
|
|
|
|
<section class="section">
|
|
|
|
<div class="block">
|
2021-02-28 02:48:10 +00:00
|
|
|
<h3 class="title is-4">{% blocktrans with yar=goal.year %}{{ year }} Reading Goal{% endblocktrans %}</h3>
|
2021-01-16 19:34:19 +00:00
|
|
|
{% include 'snippets/goal_progress.html' with goal=goal %}
|
2021-01-16 16:19:54 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
2020-09-29 17:21:10 +00:00
|
|
|
</div>
|
2021-01-29 18:25:31 +00:00
|
|
|
{% endif %}
|
2020-01-25 23:25:19 +00:00
|
|
|
|
2020-09-30 00:51:57 +00:00
|
|
|
<div class="column is-two-thirds" id="feed">
|
2021-01-29 18:25:31 +00:00
|
|
|
{% block panel %}{% endblock %}
|
2021-01-16 16:19:54 +00:00
|
|
|
|
2021-01-29 18:25:31 +00:00
|
|
|
{% if activities %}
|
2021-01-29 19:14:18 +00:00
|
|
|
{% include 'snippets/pagination.html' with page=activities path=path anchor="#feed" %}
|
2020-10-02 22:06:42 +00:00
|
|
|
{% endif %}
|
2020-09-30 00:43:30 +00:00
|
|
|
</div>
|
2020-09-29 17:21:10 +00:00
|
|
|
</div>
|
2020-01-25 23:25:19 +00:00
|
|
|
{% endblock %}
|
2021-01-29 18:25:31 +00:00
|
|
|
|