Merge branch 'main' into production

This commit is contained in:
Mouse Reeve 2021-05-24 07:21:43 -07:00
commit 730b6fabc4
6 changed files with 13 additions and 15 deletions

View file

@ -39,7 +39,7 @@
<dd itemprop="aliases">{{ author.born|naturalday }}</dd>
</div>
{% endif %}
{% if author.aliases %}
{% if author.died %}
<div class="is-flex">
<dt class="mr-1">{% trans "Died:" %}</dt>
<dd itemprop="aliases">{{ author.died|naturalday }}</dd>

View file

@ -1,7 +1,7 @@
{% extends 'layout.html' %}
{% load i18n %}{% load bookwyrm_tags %}{% load humanize %}{% load utilities %}
{% block title %}{{ book|title }}{% endblock %}
{% block title %}{{ book|book_title }}{% endblock %}
{% block content %}
{% with user_authenticated=request.user.is_authenticated can_edit_book=perms.bookwyrm.edit_book %}

View file

@ -54,15 +54,15 @@
<div class="navbar-menu" id="main-nav">
<div class="navbar-start">
{% if request.user.is_authenticated %}
<a href="{% url 'user-shelves' request.user.localname %}" class="navbar-item">
{% trans "Your books" %}
</a>
<a href="/#feed" class="navbar-item">
{% trans "Feed" %}
</a>
<a href="{% url 'lists' %}" class="navbar-item">
{% trans "Lists" %}
</a>
<a href="{% url 'directory' %}" class="navbar-item">
{% trans "Directory" %}
</a>
{% endif %}
</div>
@ -82,21 +82,16 @@
<span class="ml-2">{{ request.user.display_name }}</span>
</a>
<ul class="navbar-dropdown" id="navbar-dropdown">
<li>
<a href="{% url 'user-shelves' request.user.localname %}" class="navbar-item">
{% trans 'Your Books' %}
</a>
</li>
<li>
<a href="{% url 'direct-messages' %}" class="navbar-item">
{% trans "Direct Messages" %}
</a>
</li>
<li>
<a href="{% url 'directory' %}" class="navbar-item">
{% trans 'Directory' %}
</a>
</li>
<li>
<a href="{% url 'import' %}" class="navbar-item">
{% trans 'Import Books' %}
</a>
</li>
<li>
<a href="{% url 'prefs-profile' %}" class="navbar-item">
{% trans 'Settings' %}

View file

@ -37,6 +37,7 @@
<div class="column is-narrow">
{% trans "Create shelf" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
<a class="button" href="{% url 'import' %}">{% trans "Import Books" %}</a>
</div>
{% endif %}
</div>

View file

@ -25,6 +25,7 @@ def get_user_rating(book, user):
user=user,
book=book,
rating__isnull=False,
deleted=False,
)
.order_by("-published_date")
.first()

View file

@ -62,6 +62,7 @@ class Shelf(View):
user=user,
rating__isnull=False,
book__id=OuterRef("id"),
deleted=False,
).order_by("-published_date")
if not is_self: