Merge branch 'main' into book-series-v1
This commit is contained in:
commit
c2a81d88bb
9 changed files with 53 additions and 19 deletions
|
@ -215,10 +215,10 @@
|
|||
{% endif %}
|
||||
|
||||
|
||||
{% with work=book.parent_work %}
|
||||
{% with work=book.parent_work editions_count=book.parent_work.editions.count %}
|
||||
<p>
|
||||
<a href="{{ work.local_path }}/editions" id="tour-other-editions-link">
|
||||
{% blocktrans trimmed count counter=work.editions.count with count=work.editions.count|intcomma %}
|
||||
{% blocktrans trimmed count counter=editions_count with count=editions_count|intcomma %}
|
||||
{{ count }} edition
|
||||
{% plural %}
|
||||
{{ count }} editions
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
{% block body %}
|
||||
<nav class="navbar" aria-label="main navigation">
|
||||
<div class="container">
|
||||
{% with notification_count=request.user.unread_notification_count has_unread_mentions=request.user.has_unread_mentions %}
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="/">
|
||||
<img class="image logo" src="{% if site.logo_small %}{% get_media_prefix %}{{ site.logo_small }}{% else %}{% static "images/logo-small.png" %}{% endif %}" alt="{% blocktrans with site_name=site.name %}{{ site_name }} home page{% endblocktrans %}">
|
||||
|
@ -67,9 +68,8 @@
|
|||
>
|
||||
<i class="icon-dots-three-vertical" aria-hidden="true"></i>
|
||||
|
||||
{% with request.user.unread_notification_count as notification_count %}
|
||||
<strong
|
||||
class="{% if not notification_count %}is-hidden {% elif request.user.has_unread_mentions %}is-danger {% else %}is-primary {% endif %} tag is-small px-1"
|
||||
class="{% if not notification_count %}is-hidden {% elif has_unread_mentions %}is-danger {% else %}is-primary {% endif %} tag is-small px-1"
|
||||
data-poll-wrapper
|
||||
>
|
||||
<span class="is-sr-only">{% trans "Notifications" %}</span>
|
||||
|
@ -77,7 +77,6 @@
|
|||
{{ notification_count }}
|
||||
</strong>
|
||||
</strong>
|
||||
{% endwith %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
@ -108,14 +107,12 @@
|
|||
<span class="is-sr-only">{% trans "Notifications" %}</span>
|
||||
</span>
|
||||
</span>
|
||||
{% with request.user.unread_notification_count as notification_count %}
|
||||
<span
|
||||
class="{% if not notification_count %}is-hidden {% elif request.user.has_unread_mentions %}is-danger {% endif %}tag is-medium transition-x"
|
||||
class="{% if not notification_count %}is-hidden {% elif has_unread_mentions %}is-danger {% endif %}tag is-medium transition-x"
|
||||
data-poll-wrapper
|
||||
>
|
||||
<span data-poll="notifications">{{ notification_count }}</span>
|
||||
</span>
|
||||
{% endwith %}
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
|
@ -154,6 +151,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if not user.is_active and user.deactivation_reason == "pending" %}
|
||||
<form name="activate" method="post" action="{% url 'settings-activate-user' user.id %}" class="mr-1">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="button is-success is-light">{% trans "Activate user" %}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if user.is_active or user.deactivation_reason == "pending" %}
|
||||
<form name="suspend" method="post" action="{% url 'settings-report-suspend' user.id %}" class="mr-1">
|
||||
{% csrf_token %}
|
||||
|
|
|
@ -19,9 +19,9 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
|||
{# Supplemental fields #}
|
||||
<div>
|
||||
{% active_shelf book as active_shelf %}
|
||||
{% if active_shelf.shelf.identifier == 'reading' and book.latest_readthrough %}
|
||||
|
||||
{% if active_shelf.shelf.identifier == 'reading' %}
|
||||
{% with readthrough=book.latest_readthrough %}
|
||||
{% if readthrough %}
|
||||
<div class="field">
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}"/>
|
||||
<label class="label" for="progress_{{ uuid }}">{% trans "Progress:" %}</label>
|
||||
|
@ -66,6 +66,7 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
|||
<p class="help">{% blocktrans with pages=book.pages %}of {{ pages }} pages{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
{# Three day cache #}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% cache 259200 generated_note_header LANGUAGE_CODE status.id %}
|
||||
{% if status.content == 'wants to read' %}
|
||||
{% if status.content == 'wants to read' or status.content == '<p>wants to read</p>' %}
|
||||
{% include 'snippets/status/headers/to_read.html' with book=status.mention_books.first %}
|
||||
{% elif status.content == 'finished reading' %}
|
||||
{% elif status.content == 'finished reading' or status.content == '<p>finished reading</p>' %}
|
||||
{% include 'snippets/status/headers/read.html' with book=status.mention_books.first %}
|
||||
{% elif status.content == 'started reading' %}
|
||||
{% elif status.content == 'started reading' or status.content == '<p>started reading</p>' %}
|
||||
{% include 'snippets/status/headers/reading.html' with book=status.mention_books.first %}
|
||||
{% else %}
|
||||
{{ status.content }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue