2020-01-25 15:25:19 -08:00
|
|
|
{% extends 'layout.html' %}
|
2020-01-29 15:10:32 -08:00
|
|
|
{% load fr_display %}
|
2020-01-25 15:25:19 -08:00
|
|
|
{% block content %}
|
|
|
|
<div id="sidebar">
|
2020-01-28 17:23:38 -08:00
|
|
|
<div>
|
|
|
|
<h2>Currently Reading</h2>
|
|
|
|
{# listing books currently on user's shelves #}
|
2020-01-29 00:05:58 -08:00
|
|
|
{% if not reading.books.all %}
|
2020-01-28 17:23:38 -08:00
|
|
|
<p>Start a book!</p>
|
2020-01-29 00:05:58 -08:00
|
|
|
{% for book in to_read.books.all %}
|
|
|
|
<div class="book-preview">
|
2020-02-10 21:23:21 -08:00
|
|
|
{% include 'snippets/book.html' with book=book size="small" %}
|
2020-02-15 14:38:46 -08:00
|
|
|
<form name="shelve" action="/shelve/{{ user.localname }}/reading/{{ book.id }}" method="post">
|
2020-01-29 12:53:12 -08:00
|
|
|
{% csrf_token %}
|
2020-01-29 00:22:48 -08:00
|
|
|
<input type="hidden" name="book" value="book.id"></input>
|
|
|
|
<button type="submit">Start reading</button>
|
|
|
|
</form>
|
2020-01-29 00:05:58 -08:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2020-01-25 15:25:19 -08:00
|
|
|
{% endif %}
|
2020-01-29 00:05:58 -08:00
|
|
|
|
|
|
|
{% for book in reading.books.all %}
|
2020-01-28 17:23:38 -08:00
|
|
|
<div class="book-preview">
|
2020-02-10 21:23:21 -08:00
|
|
|
{% include 'snippets/book.html' with book=book size="small" %}
|
2020-02-15 14:38:46 -08:00
|
|
|
<form name="shelve" action="/shelve/{{ user.localname }}/read/{{ book.id }}" method="post">
|
2020-01-29 12:53:12 -08:00
|
|
|
{% csrf_token %}
|
2020-01-29 00:22:48 -08:00
|
|
|
<input type="hidden" name="book" value="book.id"></input>
|
|
|
|
<button type="submit">I'm done!</button>
|
|
|
|
</form>
|
2020-01-28 17:23:38 -08:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2020-01-25 15:25:19 -08:00
|
|
|
</div>
|
|
|
|
|
2020-01-28 17:23:38 -08:00
|
|
|
<div>
|
|
|
|
<h2>Recently Added Books</h2>
|
2020-01-26 17:55:02 -08:00
|
|
|
{% for book in recent_books %}
|
|
|
|
<div class="book-preview">
|
2020-02-10 21:23:21 -08:00
|
|
|
{% include 'snippets/book.html' with book=book size="small" %}
|
2020-01-28 17:23:38 -08:00
|
|
|
{% if not book in user_books.all %}
|
2020-02-15 14:38:46 -08:00
|
|
|
<form name="shelve" action="/shelve/{{ user.localname }}/to-read/{{ book.id }}" method="post">
|
2020-01-29 12:53:12 -08:00
|
|
|
{% csrf_token %}
|
2020-01-26 17:55:02 -08:00
|
|
|
<input type="hidden" name="book" value="book.id"></input>
|
2020-01-28 15:23:49 -08:00
|
|
|
<button type="submit">Want to read</button>
|
2020-01-26 17:55:02 -08:00
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-01-28 17:23:38 -08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="feed">
|
2020-02-19 18:02:11 -08:00
|
|
|
<div id="feed-tabs">
|
|
|
|
{% for tab in feed_tabs %}
|
|
|
|
<div class="{% if tab == active_tab %}active{% endif %}">
|
|
|
|
<a href="/{{ tab }}">{{ tab }}</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-01-28 17:23:38 -08:00
|
|
|
|
2020-01-27 18:47:54 -08:00
|
|
|
{% for activity in activities %}
|
2020-02-19 18:02:11 -08:00
|
|
|
{% include 'snippets/status.html' with activity=activity %}
|
2020-01-27 18:47:54 -08:00
|
|
|
{% endfor %}
|
2020-01-25 15:25:19 -08:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|