diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index 3fe4b7abc..66ecb0625 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -94,7 +94,7 @@ {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} {% with controls_text="ol_sync" controls_uid=author.id %} {% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_ol_sync" class="is-small" icon_with_text="download" %} - {% include "author/sync_modal.html" with source="opnlibrary.org" source_name="OpenLibrary" %} + {% include "author/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" %} {% endwith %} {% endif %} diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index 6d8ce72b8..27d061a28 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -90,14 +90,15 @@ {% endwith %} + {% trans "Load data" as button_text %} {% if book.openlibrary_key %}

{% trans "View on OpenLibrary" %} {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} -

- {% csrf_token %} - -
+ {% with controls_text="ol_sync" controls_uid=book.id %} + {% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_ol_sync" class="is-small" icon_with_text="download" %} + {% include "book/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" %} + {% endwith %} {% endif %}

{% endif %} @@ -105,10 +106,10 @@

{% trans "View on Inventaire" %} {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} -

- {% csrf_token %} - -
+ {% with controls_text="iv_sync" controls_uid=book.id %} + {% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_iv_sync" class="is-small" icon_with_text="download" %} + {% include "book/sync_modal.html" with source="inventaire.io" source_name="Inventaire" %} + {% endwith %} {% endif %}

{% endif %} diff --git a/bookwyrm/templates/book/sync_modal.html b/bookwyrm/templates/book/sync_modal.html new file mode 100644 index 000000000..d80bf25fd --- /dev/null +++ b/bookwyrm/templates/book/sync_modal.html @@ -0,0 +1,30 @@ +{% extends 'components/modal.html' %} +{% load i18n %} + +{% block modal-title %} +{% trans "Load data" %} +{% endblock %} + +{% block modal-form-open %} +
+ {% csrf_token %} +{% endblock %} + +{% block modal-body %} +

+ {% blocktrans trimmed %} + Loading data will connect to {{ source_name }} and check for any metadata about this book which aren't present here. Existing metadata will not be overwritten. + {% endblocktrans %} +

+{% endblock %} + +{% block modal-footer %} + + +{% trans "Cancel" as button_text %} +{% include 'snippets/toggle/toggle_button.html' with text=button_text %} +{% endblock %} + +{% block modal-form-close %}
{% endblock %}