2020-02-11 01:32:03 -05:00
|
|
|
{% extends 'layout.html' %}
|
2021-02-27 17:22:39 -05:00
|
|
|
{% load i18n %}
|
2021-05-11 18:14:42 -04:00
|
|
|
{% load markdown %}
|
2021-05-10 20:24:10 -04:00
|
|
|
{% load humanize %}
|
2021-11-01 00:48:52 -04:00
|
|
|
{% load utilities %}
|
2021-02-28 13:00:36 -05:00
|
|
|
|
|
|
|
{% block title %}{{ author.name }}{% endblock %}
|
|
|
|
|
2020-02-11 01:32:03 -05:00
|
|
|
{% block content %}
|
2020-09-30 19:20:50 -04:00
|
|
|
<div class="block">
|
2021-02-23 16:04:24 -05:00
|
|
|
<div class="columns is-mobile">
|
2020-12-22 12:26:40 -05:00
|
|
|
<div class="column">
|
|
|
|
<h1 class="title">{{ author.name }}</h1>
|
|
|
|
</div>
|
|
|
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
|
|
|
<div class="column is-narrow">
|
2021-12-05 16:24:40 -05:00
|
|
|
<a href="{% url 'edit-author' author.id %}">
|
2021-05-18 13:45:51 -04:00
|
|
|
<span class="icon icon-pencil" title="{% trans 'Edit Author' %}" aria-hidden="True"></span>
|
2021-06-14 18:55:26 -04:00
|
|
|
<span class="is-hidden-mobile">{% trans "Edit Author" %}</span>
|
2020-12-22 12:26:40 -05:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-16 20:33:53 -04:00
|
|
|
|
2021-10-02 14:44:25 -04:00
|
|
|
<div class="block columns content" itemscope itemtype="https://schema.org/Person">
|
2021-05-23 15:17:14 -04:00
|
|
|
<meta itemprop="name" content="{{ author.name }}">
|
|
|
|
|
2021-11-21 17:24:05 -05:00
|
|
|
{% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id or author.isni %}
|
2021-05-24 06:51:18 -04:00
|
|
|
<div class="column is-two-fifths">
|
2021-05-24 11:17:12 -04:00
|
|
|
<div class="box py-2">
|
2021-05-10 20:24:10 -04:00
|
|
|
<dl>
|
|
|
|
{% if author.aliases %}
|
2021-05-24 11:17:12 -04:00
|
|
|
<div class="is-flex is-flex-wrap-wrap my-1">
|
2021-05-24 06:51:18 -04:00
|
|
|
<dt class="has-text-weight-bold mr-1">{% trans "Aliases:" %}</dt>
|
2021-05-24 06:36:48 -04:00
|
|
|
{% for alias in author.aliases %}
|
|
|
|
<dd itemprop="alternateName" content="{{alias}}">
|
2021-05-24 06:51:18 -04:00
|
|
|
{{alias}}{% if not forloop.last %}, {% endif %}
|
2021-05-24 06:36:48 -04:00
|
|
|
</dd>
|
|
|
|
{% endfor %}
|
2021-05-10 20:24:10 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-05-24 11:17:12 -04:00
|
|
|
|
2021-05-10 20:24:10 -04:00
|
|
|
{% if author.born %}
|
2021-05-24 11:17:12 -04:00
|
|
|
<div class="is-flex my-1">
|
2021-05-24 06:51:18 -04:00
|
|
|
<dt class="has-text-weight-bold mr-1">{% trans "Born:" %}</dt>
|
2021-05-23 15:17:14 -04:00
|
|
|
<dd itemprop="birthDate">{{ author.born|naturalday }}</dd>
|
2021-05-10 20:24:10 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-05-24 11:17:12 -04:00
|
|
|
|
2021-05-23 14:25:42 -04:00
|
|
|
{% if author.died %}
|
2021-05-24 11:17:12 -04:00
|
|
|
<div class="is-flex my-1">
|
2021-05-24 06:51:18 -04:00
|
|
|
<dt class="has-text-weight-bold mr-1">{% trans "Died:" %}</dt>
|
2021-05-23 15:17:14 -04:00
|
|
|
<dd itemprop="deathDate">{{ author.died|naturalday }}</dd>
|
2021-05-10 20:24:10 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</dl>
|
2021-05-06 11:24:05 -04:00
|
|
|
|
2021-05-10 20:24:10 -04:00
|
|
|
{% if author.wikipedia_link %}
|
2021-05-24 11:17:12 -04:00
|
|
|
<p class="my-1">
|
2021-08-21 14:04:26 -04:00
|
|
|
<a itemprop="sameAs" href="{{ author.wikipedia_link }}" rel="noopener" target="_blank">
|
2021-05-23 15:17:14 -04:00
|
|
|
{% trans "Wikipedia" %}
|
|
|
|
</a>
|
|
|
|
</p>
|
2021-05-10 20:24:10 -04:00
|
|
|
{% endif %}
|
2021-10-31 20:45:47 -04:00
|
|
|
|
|
|
|
{% if author.isni %}
|
|
|
|
<p class="my-1">
|
2021-12-05 15:28:17 -05:00
|
|
|
<a itemprop="sameAs" href="{{ author.isni_link }}" rel="noopener" target="_blank">
|
2021-10-31 20:45:47 -04:00
|
|
|
{% trans "View ISNI record" %}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-05-24 06:51:18 -04:00
|
|
|
|
2021-05-10 20:24:10 -04:00
|
|
|
{% if author.openlibrary_key %}
|
2021-12-05 16:24:40 -05:00
|
|
|
<p class="my-1">
|
2021-12-05 15:28:17 -05:00
|
|
|
<a itemprop="sameAs" href="{{ author.openlibrary_link }}" target="_blank" rel="noopener">
|
2021-05-23 15:17:14 -04:00
|
|
|
{% trans "View on OpenLibrary" %}
|
|
|
|
</a>
|
2021-12-05 16:02:42 -05:00
|
|
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
2021-12-05 16:24:40 -05:00
|
|
|
<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>
|
2021-12-05 16:02:42 -05:00
|
|
|
{% endif %}
|
2021-05-10 20:24:10 -04:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-08-16 16:44:54 -04:00
|
|
|
|
2021-05-10 20:24:10 -04:00
|
|
|
{% if author.inventaire_id %}
|
2021-12-05 16:24:40 -05:00
|
|
|
<p class="my-1">
|
2021-12-05 15:28:17 -05:00
|
|
|
<a itemprop="sameAs" href="{{ author.inventaire_link }}" target="_blank" rel="noopener">
|
2021-05-23 15:17:14 -04:00
|
|
|
{% trans "View on Inventaire" %}
|
|
|
|
</a>
|
2021-12-05 16:02:42 -05:00
|
|
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
2021-12-05 16:38:15 -05:00
|
|
|
<form name="ol-update" method="POST" action="{% url 'author-update-remote' author.id 'inventaire.io' %}">
|
2021-12-05 16:24:40 -05:00
|
|
|
{% csrf_token %}
|
|
|
|
<button class="button is-small" type="submit">{% trans "Update from Inventaire" %}</button>
|
|
|
|
</form>
|
2021-12-05 16:02:42 -05:00
|
|
|
{% endif %}
|
2021-05-10 20:24:10 -04:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-05-24 06:51:41 -04:00
|
|
|
|
|
|
|
{% if author.librarything_key %}
|
2021-05-24 11:17:12 -04:00
|
|
|
<p class="my-1">
|
2021-05-24 06:51:41 -04:00
|
|
|
<a itemprop="sameAs" href="https://www.librarything.com/author/{{ author.librarything_key }}" target="_blank" rel="noopener">
|
|
|
|
{% trans "View on LibraryThing" %}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-08-16 16:44:54 -04:00
|
|
|
|
2021-05-24 06:51:41 -04:00
|
|
|
{% if author.goodreads_key %}
|
2021-05-24 11:17:12 -04:00
|
|
|
<p class="my-1">
|
2021-05-24 06:51:41 -04:00
|
|
|
<a itemprop="sameAs" href="https://www.goodreads.com/author/show/{{ author.goodreads_key }}" target="_blank" rel="noopener">
|
|
|
|
{% trans "View on Goodreads" %}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-05-10 20:24:10 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-22 12:26:40 -05:00
|
|
|
{% endif %}
|
2021-05-10 20:24:10 -04:00
|
|
|
<div class="column">
|
|
|
|
{% if author.bio %}
|
2021-05-11 18:14:42 -04:00
|
|
|
{{ author.bio|to_markdown|safe }}
|
2021-05-10 20:24:10 -04:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-03-16 20:33:53 -04:00
|
|
|
</div>
|
|
|
|
|
2020-09-30 19:20:50 -04:00
|
|
|
<div class="block">
|
2021-02-27 17:22:39 -05:00
|
|
|
<h3 class="title is-4">{% blocktrans with name=author.name %}Books by {{ name }}{% endblocktrans %}</h3>
|
2021-05-10 19:43:40 -04:00
|
|
|
<div class="columns is-multiline is-mobile">
|
|
|
|
{% for book in books %}
|
|
|
|
<div class="column is-one-fifth">
|
2021-08-16 16:44:54 -04:00
|
|
|
{% include 'landing/small-book.html' with book=book %}
|
2021-10-20 20:51:42 -04:00
|
|
|
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
|
2021-05-10 19:43:40 -04:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-02-11 01:32:03 -05:00
|
|
|
</div>
|
2021-10-20 20:42:19 -04:00
|
|
|
|
|
|
|
<div>
|
|
|
|
{% include 'snippets/pagination.html' with page=books %}
|
|
|
|
</div>
|
|
|
|
|
2020-02-11 01:32:03 -05:00
|
|
|
{% endblock %}
|