forked from mirrors/bookwyrm
Uses new modals for author sync
This commit is contained in:
parent
d60684e08e
commit
82ea04f247
3 changed files with 12 additions and 8 deletions
|
@ -92,10 +92,11 @@
|
||||||
{% trans "View on OpenLibrary" %}
|
{% trans "View on OpenLibrary" %}
|
||||||
</a>
|
</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=author.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 "author/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" %}
|
<span class="is-sr-only-mobile">{{ button_text }}</span>
|
||||||
{% endwith %}
|
</button>
|
||||||
|
{% include "author/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" id="openlibrary_sync" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% 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 %}
|
||||||
|
@ -23,8 +23,9 @@
|
||||||
<span>{% trans "Confirm" %}</span>
|
<span>{% trans "Confirm" %}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% trans "Cancel" as button_text %}
|
<button type="button" class="button" data-modal-close>
|
||||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text %}
|
{% trans "Cancel" %}
|
||||||
|
</button>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-form-close %}</form>{% endblock %}
|
{% block modal-form-close %}</form>{% endblock %}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<div class="modal" id="{{ id }}">
|
<div class="modal" id="{{ id }}">
|
||||||
<div class="modal-background" data-modal-close></div>
|
<div class="modal-background" data-modal-close></div>
|
||||||
<div class="modal-card is-thin" role="dialog" aria-modal="true" tabindex="-1">
|
<div class="modal-card" role="dialog" aria-modal="true" tabindex="-1">
|
||||||
<header class="modal-card-head">
|
<header class="modal-card-head">
|
||||||
<h2 class="modal-card-title mb-0">
|
<h2 class="modal-card-title mb-0">
|
||||||
{% block modal-title %}{% endblock %}
|
{% block modal-title %}{% endblock %}
|
||||||
|
@ -15,12 +15,14 @@
|
||||||
></button>
|
></button>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
{% block modal-form-open %}{% endblock %}
|
||||||
<section class="modal-card-body">
|
<section class="modal-card-body">
|
||||||
{% block modal-body %}{% endblock %}
|
{% block modal-body %}{% endblock %}
|
||||||
</section>
|
</section>
|
||||||
<footer class="modal-card-foot">
|
<footer class="modal-card-foot">
|
||||||
{% block modal-footer %}{% endblock %}
|
{% block modal-footer %}{% endblock %}
|
||||||
</footer>
|
</footer>
|
||||||
|
{% block modal-form-close %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
Loading…
Reference in a new issue