1
0
Fork 0

fixes to move layout and notifs

- make Move notifications less complicated
- moved users cannot do anything other than unmove or log out
- refactor translations for moved users
This commit is contained in:
Hugh Rundle 2023-10-27 22:00:04 +11:00
parent 088b9ab555
commit 6f3b1b565f
No known key found for this signature in database
GPG key ID: A7E35779918253F9
8 changed files with 75 additions and 64 deletions

View file

@ -30,10 +30,11 @@
<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 %}" loading="lazy" decoding="async">
</a>
{% if not request.user.moved_to %}
<form class="navbar-item column is-align-items-start pt-5" action="{% url 'search' %}">
<div class="field has-addons">
<div class="control">
{% if user.is_authenticated %}
{% if request.user.is_authenticated %}
{% trans "Search for a book, user, or list" as search_placeholder %}
{% else %}
{% trans "Search for a book" as search_placeholder %}
@ -79,7 +80,6 @@
</strong>
</button>
</div>
<div class="navbar-menu" id="main_nav">
<div class="navbar-start" id="tour-navbar-start">
{% if request.user.is_authenticated %}
@ -151,6 +151,7 @@
{% endif %}
</div>
</div>
{% endif %}
{% endwith %}
</div>
</nav>
@ -167,11 +168,15 @@
<main class="section is-flex-grow-1">
<div class="container">
{# almost every view needs to know the user shelves #}
{% with request.user.shelf_set.all as user_shelves %}
{% block content %}
{% endblock %}
{% endwith %}
{% if request.user.moved_to %}
{% include "moved.html" %}
{% else %}
{# almost every view needs to know the user shelves #}
{% with request.user.shelf_set.all as user_shelves %}
{% block content %}
{% endblock %}
{% endwith %}
{% endif %}
</div>
</main>