diff --git a/bookwyrm/models/author.py b/bookwyrm/models/author.py index 53cf94ff..6c29ac05 100644 --- a/bookwyrm/models/author.py +++ b/bookwyrm/models/author.py @@ -27,7 +27,7 @@ class Author(BookDataModel): # idk probably other keys would be useful here? born = fields.DateTimeField(blank=True, null=True) died = fields.DateTimeField(blank=True, null=True) - name = fields.CharField(max_length=255, deduplication_field=True) + name = fields.CharField(max_length=255) aliases = fields.ArrayField( models.CharField(max_length=255), blank=True, default=list ) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index 6a67b50b..b066c6ca 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -2,6 +2,7 @@ {% load i18n %} {% load markdown %} {% load humanize %} +{% load utilities %} {% block title %}{{ author.name }}{% endblock %} @@ -25,7 +26,7 @@
- {% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id %} + {% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id or author.isni %}
@@ -63,6 +64,14 @@

{% endif %} + {% if author.isni %} +

+ + {% trans "View ISNI record" %} + +

+ {% endif %} + {% if author.openlibrary_key %}

diff --git a/bookwyrm/templates/book/edit/edit_book.html b/bookwyrm/templates/book/edit/edit_book.html index fc11208f..3d41058e 100644 --- a/bookwyrm/templates/book/edit/edit_book.html +++ b/bookwyrm/templates/book/edit/edit_book.html @@ -1,6 +1,7 @@ {% extends 'layout.html' %} {% load i18n %} {% load humanize %} +{% load utilities %} {% block title %}{% if book %}{% blocktrans with book_title=book.title %}Edit "{{ book_title }}"{% endblocktrans %}{% else %}{% trans "Add Book" %}{% endif %}{% endblock %} @@ -52,19 +53,29 @@ {% for author in author_matches %}

- {% blocktrans with name=author.name %}Is "{{ name }}" an existing author?{% endblocktrans %} + {% blocktrans with name=author.name %}Is "{{ name }}" one of these authors?{% endblocktrans %} {% with forloop.counter0 as counter %} {% for match in author.matches %} -

- {% blocktrans with book_title=match.book_set.first.title %}Author of {{ book_title }}{% endblocktrans %} +

+ {% with book_title=match.book_set.first.title alt_title=match.bio %} + {% if book_title %} + {% trans "Author of " %}{{ book_title }} + {% else %} + {% if alt_title %}{% trans "Author of " %}{{ alt_title }}{% else %} {% trans "Find more information at isni.org" %}{% endif %} + {% endif %} + {% endwith %}

+

+ {{ author.existing_isnis|get_isni_bio:match }} +

+ {{ author.existing_isnis|get_isni:match }} {% endfor %} -