mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-27 02:20:31 +00:00
Updates book sync modals
This commit is contained in:
parent
0031a63511
commit
57ce894667
2 changed files with 20 additions and 17 deletions
|
@ -122,23 +122,30 @@
|
||||||
{% trans "Load data" as button_text %}
|
{% trans "Load data" as button_text %}
|
||||||
{% if book.openlibrary_key %}
|
{% if book.openlibrary_key %}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ book.openlibrary_link }}" target="_blank" rel="noopener">{% trans "View on OpenLibrary" %}</a>
|
<a href="{{ book.openlibrary_link }}" target="_blank" rel="noopener">
|
||||||
|
{% trans "View on OpenLibrary" %}
|
||||||
|
</a>
|
||||||
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
||||||
{% with controls_text="ol_sync" controls_uid=book.id %}
|
<button class="button is-small" type="button" data-modal-open="openlibrary_sync">
|
||||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_ol_sync" class="is-small" icon_with_text="download" %}
|
<span class="icon icon-download" title="{{ button_text }}"></span>
|
||||||
{% include "book/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" %}
|
<span class="is-sr-only-mobile">{{ button_text }}</span>
|
||||||
{% endwith %}
|
</button>
|
||||||
|
{% include "book/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" id="openlibrary_sync" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if book.inventaire_id %}
|
{% if book.inventaire_id %}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ book.inventaire_link }}" target="_blank" rel="noopener">{% trans "View on Inventaire" %}</a>
|
<a href="{{ book.inventaire_link }}" target="_blank" rel="noopener">
|
||||||
|
{% trans "View on Inventaire" %}
|
||||||
|
</a>
|
||||||
|
|
||||||
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
||||||
{% with controls_text="iv_sync" controls_uid=book.id %}
|
<button class="button is-small" type="button" data-modal-open="inventaire_sync">
|
||||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_iv_sync" class="is-small" icon_with_text="download" %}
|
<span class="icon icon-download" title="{{ button_text }}"></span>
|
||||||
{% include "book/sync_modal.html" with source="inventaire.io" source_name="Inventaire" %}
|
<span class="is-sr-only-mobile">{{ button_text }}</span>
|
||||||
{% endwith %}
|
</button>
|
||||||
|
{% include "book/sync_modal.html" with source="inventaire.io" source_name="Inventaire" id="inventaire_sync" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends 'components/modal.html' %}
|
{% extends 'components/new_modal.html' %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block modal-title %}
|
{% block modal-title %}
|
||||||
|
@ -19,12 +19,8 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-footer %}
|
{% block modal-footer %}
|
||||||
<button class="button is-primary" type="submit">
|
<button class="button is-primary" type="submit">{% trans "Confirm" %}</button>
|
||||||
<span>{% trans "Confirm" %}</span>
|
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
||||||
</button>
|
|
||||||
|
|
||||||
{% trans "Cancel" as button_text %}
|
|
||||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-form-close %}</form>{% endblock %}
|
{% block modal-form-close %}</form>{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue