Update openlibrary author with ISNI

This commit is contained in:
Mouse Reeve
2021-12-05 13:24:40 -08:00
parent d7e4e6aa1e
commit 4085714764
8 changed files with 43 additions and 15 deletions

View File

@ -14,7 +14,7 @@
</div>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<div class="column is-narrow">
<a href="{{ author.local_path }}/edit">
<a href="{% url 'edit-author' author.id %}">
<span class="icon icon-pencil" title="{% trans 'Edit Author' %}" aria-hidden="True"></span>
<span class="is-hidden-mobile">{% trans "Edit Author" %}</span>
</a>
@ -73,23 +73,29 @@
{% endif %}
{% if author.openlibrary_key %}
<p class="my-1 is-flex is-justify-content-space-between">
<p class="my-1">
<a itemprop="sameAs" href="{{ author.openlibrary_link }}" target="_blank" rel="noopener">
{% trans "View on OpenLibrary" %}
</a>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<button class="button is-small" type="button">{% trans "Update from OpenLibrary" %}</button>
<form name="ol-update" method="POST" action="{% url 'author-update-remote' author.id 'openlibrary.org' %}">
{% csrf_token %}
<button class="button is-small" type="submit">{% trans "Update from OpenLibrary" %}</button>
</form>
{% endif %}
</p>
{% endif %}
{% if author.inventaire_id %}
<p class="my-1 is-flex is-justify-content-space-between">
<p class="my-1">
<a itemprop="sameAs" href="{{ author.inventaire_link }}" target="_blank" rel="noopener">
{% trans "View on Inventaire" %}
</a>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<button class="button is-small" type="button">{% trans "Update from Inventaire" %}</button>
<form name="ol-update" method="POST" action="{% url 'author-update-remote' author.id 'inventaire' %}">
{% csrf_token %}
<button class="button is-small" type="submit">{% trans "Update from Inventaire" %}</button>
</form>
{% endif %}
</p>
{% endif %}

View File

@ -93,10 +93,12 @@
{% if book.openlibrary_key %}
<p>
<a href="{{ book.openlibrary_link }}" target="_blank" rel="noopener">{% trans "View on OpenLibrary" %}</a>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<form name="ol-update" method="POST" action="{% url 'book-update-remote' book.id 'openlibrary.org' %}">
{% csrf_token %}
<button class="button is-small" type="submit">{% trans "Update from OpenLibrary" %}</button>
</form>
{% endif %}
</p>
{% endif %}
{% if book.inventaire_id %}