forked from mirrors/bookwyrm
Merge branch 'main' into production
This commit is contained in:
commit
730b6fabc4
6 changed files with 13 additions and 15 deletions
|
@ -39,7 +39,7 @@
|
||||||
<dd itemprop="aliases">{{ author.born|naturalday }}</dd>
|
<dd itemprop="aliases">{{ author.born|naturalday }}</dd>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if author.aliases %}
|
{% if author.died %}
|
||||||
<div class="is-flex">
|
<div class="is-flex">
|
||||||
<dt class="mr-1">{% trans "Died:" %}</dt>
|
<dt class="mr-1">{% trans "Died:" %}</dt>
|
||||||
<dd itemprop="aliases">{{ author.died|naturalday }}</dd>
|
<dd itemprop="aliases">{{ author.died|naturalday }}</dd>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
{% load i18n %}{% load bookwyrm_tags %}{% load humanize %}{% load utilities %}
|
{% load i18n %}{% load bookwyrm_tags %}{% load humanize %}{% load utilities %}
|
||||||
|
|
||||||
{% block title %}{{ book|title }}{% endblock %}
|
{% block title %}{{ book|book_title }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% with user_authenticated=request.user.is_authenticated can_edit_book=perms.bookwyrm.edit_book %}
|
{% with user_authenticated=request.user.is_authenticated can_edit_book=perms.bookwyrm.edit_book %}
|
||||||
|
|
|
@ -54,15 +54,15 @@
|
||||||
<div class="navbar-menu" id="main-nav">
|
<div class="navbar-menu" id="main-nav">
|
||||||
<div class="navbar-start">
|
<div class="navbar-start">
|
||||||
{% if request.user.is_authenticated %}
|
{% 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">
|
<a href="/#feed" class="navbar-item">
|
||||||
{% trans "Feed" %}
|
{% trans "Feed" %}
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'lists' %}" class="navbar-item">
|
<a href="{% url 'lists' %}" class="navbar-item">
|
||||||
{% trans "Lists" %}
|
{% trans "Lists" %}
|
||||||
</a>
|
</a>
|
||||||
|
<a href="{% url 'directory' %}" class="navbar-item">
|
||||||
|
{% trans "Directory" %}
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -82,21 +82,16 @@
|
||||||
<span class="ml-2">{{ request.user.display_name }}</span>
|
<span class="ml-2">{{ request.user.display_name }}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="navbar-dropdown" id="navbar-dropdown">
|
<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>
|
<li>
|
||||||
<a href="{% url 'direct-messages' %}" class="navbar-item">
|
<a href="{% url 'direct-messages' %}" class="navbar-item">
|
||||||
{% trans "Direct Messages" %}
|
{% trans "Direct Messages" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<li>
|
||||||
<a href="{% url 'prefs-profile' %}" class="navbar-item">
|
<a href="{% url 'prefs-profile' %}" class="navbar-item">
|
||||||
{% trans 'Settings' %}
|
{% trans 'Settings' %}
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
{% trans "Create shelf" as button_text %}
|
{% 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" %}
|
{% 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>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,6 +25,7 @@ def get_user_rating(book, user):
|
||||||
user=user,
|
user=user,
|
||||||
book=book,
|
book=book,
|
||||||
rating__isnull=False,
|
rating__isnull=False,
|
||||||
|
deleted=False,
|
||||||
)
|
)
|
||||||
.order_by("-published_date")
|
.order_by("-published_date")
|
||||||
.first()
|
.first()
|
||||||
|
|
|
@ -62,6 +62,7 @@ class Shelf(View):
|
||||||
user=user,
|
user=user,
|
||||||
rating__isnull=False,
|
rating__isnull=False,
|
||||||
book__id=OuterRef("id"),
|
book__id=OuterRef("id"),
|
||||||
|
deleted=False,
|
||||||
).order_by("-published_date")
|
).order_by("-published_date")
|
||||||
|
|
||||||
if not is_self:
|
if not is_self:
|
||||||
|
|
Loading…
Reference in a new issue