Re-adds "manually add book" link

This commit is contained in:
Mouse Reeve 2021-05-03 11:20:43 -07:00
parent 7db8e249cc
commit a81901f9fe
2 changed files with 13 additions and 9 deletions

View file

@ -57,18 +57,22 @@
{% endif %}
{% if not remote %}
<p class="block">
{% if request.user.is_authenticated %}
<a href="{{ request.path }}?q={{ query }}&type=book&remote=true">
{% trans "Load results from other catalogues" %}
</a>
{% if not remote %}
<a href="{{ request.path }}?q={{ query }}&type=book&remote=true">
{% trans "Load results from other catalogues" %}
</a>
{% else %}
<a href="{% url 'create-book' %}">
{% trans "Manually add book" %}
</a>
{% endif %}
{% else %}
<a href="{% url 'login' %}">
{% trans "Log in to import or add books." %}
</a>
<a href="{% url 'login' %}">
{% trans "Log in to import or add books." %}
</a>
{% endif %}
</p>
{% endif %}
{% endblock %}

View file

@ -272,7 +272,7 @@ urlpatterns = [
),
re_path(r"%s/edit/?$" % book_path, views.EditBook.as_view()),
re_path(r"%s/confirm/?$" % book_path, views.ConfirmEditBook.as_view()),
re_path(r"^create-book/?$", views.EditBook.as_view()),
re_path(r"^create-book/?$", views.EditBook.as_view(), name="create-book"),
re_path(r"^create-book/confirm?$", views.ConfirmEditBook.as_view()),
re_path(r"%s/editions(.json)?/?$" % book_path, views.Editions.as_view()),
re_path(