Show clarifying text for empty search when logged out
This commit is contained in:
parent
f4ebecfe75
commit
6f38ab167e
|
@ -14,7 +14,12 @@
|
||||||
<h2 class="title is-4">{% trans "Matching Books" %}</h2>
|
<h2 class="title is-4">{% trans "Matching Books" %}</h2>
|
||||||
<section class="block">
|
<section class="block">
|
||||||
{% if not local_results.results %}
|
{% if not local_results.results %}
|
||||||
<p>{% blocktrans %}No books found for "{{ query }}"{% endblocktrans %}</p>
|
<p><em>{% blocktrans %}No books found for "{{ query }}"{% endblocktrans %}</em></p>
|
||||||
|
{% if not user.is_authenticated %}
|
||||||
|
<p>
|
||||||
|
<a href="{% url 'login' %}">{% trans "Log in to import or add books." %}</a>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for result in local_results.results %}
|
{% for result in local_results.results %}
|
||||||
|
@ -88,7 +93,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<section class="block">
|
<section class="box">
|
||||||
<h2 class="title is-4">{% trans "Matching Users" %}</h2>
|
<h2 class="title is-4">{% trans "Matching Users" %}</h2>
|
||||||
{% if not user_results %}
|
{% if not user_results %}
|
||||||
<p><em>{% blocktrans %}No users found for "{{ query }}"{% endblocktrans %}</em></p>
|
<p><em>{% blocktrans %}No users found for "{{ query }}"{% endblocktrans %}</em></p>
|
||||||
|
@ -106,7 +111,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<section class="block">
|
<section class="box">
|
||||||
<h2 class="title is-4">{% trans "Lists" %}</h2>
|
<h2 class="title is-4">{% trans "Lists" %}</h2>
|
||||||
{% if not list_results %}
|
{% if not list_results %}
|
||||||
<p><em>{% blocktrans %}No lists found for "{{ query }}"{% endblocktrans %}</em></p>
|
<p><em>{% blocktrans %}No lists found for "{{ query }}"{% endblocktrans %}</em></p>
|
||||||
|
|
|
@ -43,7 +43,7 @@ urlpatterns = [
|
||||||
re_path("^api/updates/notifications/?$", views.get_notification_count),
|
re_path("^api/updates/notifications/?$", views.get_notification_count),
|
||||||
re_path("^api/updates/stream/(?P<stream>[a-z]+)/?$", views.get_unread_status_count),
|
re_path("^api/updates/stream/(?P<stream>[a-z]+)/?$", views.get_unread_status_count),
|
||||||
# authentication
|
# authentication
|
||||||
re_path(r"^login/?$", views.Login.as_view()),
|
re_path(r"^login/?$", views.Login.as_view(), name="login"),
|
||||||
re_path(r"^register/?$", views.Register.as_view()),
|
re_path(r"^register/?$", views.Register.as_view()),
|
||||||
re_path(r"^logout/?$", views.Logout.as_view()),
|
re_path(r"^logout/?$", views.Logout.as_view()),
|
||||||
re_path(r"^password-reset/?$", views.PasswordResetRequest.as_view()),
|
re_path(r"^password-reset/?$", views.PasswordResetRequest.as_view()),
|
||||||
|
|
Loading…
Reference in New Issue