Fixes html on notifications page

This commit is contained in:
Mouse Reeve 2022-07-06 19:16:14 -07:00
parent 26a1f75e91
commit cded3e973d
5 changed files with 31 additions and 27 deletions

View file

@ -3,6 +3,10 @@
{% load i18n %}
{% load utilities %}
{% block primary_link %}{% spaceless %}
{% url 'user-followers' request.user.localname %}
{% endspaceless %}{% endblock %}
{% block icon %}
<span class="icon icon-local"></span>
{% endblock %}

View file

@ -27,31 +27,29 @@
</div>
{% endif %}
<div class="block content">
<p>
{% if related_user_count == 1 %}
{% with user=related_users.first %}
{% spaceless %}
<a href="{{ user.local_path }}" class="mr-2">
{% include 'snippets/avatar.html' with user=user %}
</a>
{% endspaceless %}
{% endwith %}
{% endif %}
{% if related_user_count == 1 %}
{% with user=related_users.first %}
{% spaceless %}
<a href="{{ user.local_path }}" class="mr-2">
{% include 'snippets/avatar.html' with user=user %}
</a>
{% endspaceless %}
{% endwith %}
{% endif %}
{% with related_user=related_users.first.display_name %}
{% with related_user_link=related_users.first.local_path %}
{% with second_user=related_users.1.display_name %}
{% with second_user_link=related_users.1.local_path %}
{% with other_user_count=related_user_count|add:"-1" %}
{% with other_user_display_count=other_user_count|intcomma %}
{% block description %}{% endblock %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
</p>
{% with related_user=related_users.first.display_name %}
{% with related_user_link=related_users.first.local_path %}
{% with second_user=related_users.1.display_name %}
{% with second_user_link=related_users.1.local_path %}
{% with other_user_count=related_user_count|add:"-1" %}
{% with other_user_display_count=other_user_count|intcomma %}
{% block description %}{% endblock %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
</div>
{% if related_status %}

View file

@ -3,6 +3,7 @@
{% load i18n %}
{% block primary_link %}{% spaceless %}
{% url 'settings-reports' %}
{% endspaceless %}{% endblock %}
{% block icon %}

View file

@ -16,11 +16,11 @@
<select>
</select>
</div>
<div id="barcode-status" class="block">
<div class="grant-access is-hidden">
<span class="icon icon-lock"></span>
<span class="is-size-5">{% trans "Requesting camera..." %}</span></br>
<span class="is-size-5">{% trans "Requesting camera..." %}</span><br/>
<span>{% trans "Grant access to the camera to scan a book's barcode." %}</span>
</div>
<div class="access-denied is-hidden">

View file

@ -18,10 +18,11 @@ class Notifications(View):
.order_by("-updated_date")
.select_related(
"related_status",
"related_status__reply_parent",
"related_group",
"related_import",
)
.prefetch_related(
"related_import",
"related_reports",
"related_users",
"related_list_items",