2020-02-11 06:32:03 +00:00
|
|
|
{% extends 'layout.html' %}
|
2021-02-27 22:22:39 +00:00
|
|
|
{% load i18n %}
|
2021-05-11 22:14:42 +00:00
|
|
|
{% load markdown %}
|
2021-05-11 00:24:10 +00:00
|
|
|
{% load humanize %}
|
2021-11-01 04:48:52 +00:00
|
|
|
{% load utilities %}
|
2021-02-28 18:00:36 +00:00
|
|
|
|
|
|
|
{% block title %}{{ author.name }}{% endblock %}
|
|
|
|
|
2020-02-11 06:32:03 +00:00
|
|
|
{% block content %}
|
2020-09-30 23:20:50 +00:00
|
|
|
<div class="block">
|
2021-02-23 21:04:24 +00:00
|
|
|
<div class="columns is-mobile">
|
2020-12-22 17:26:40 +00: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 21:24:40 +00:00
|
|
|
<a href="{% url 'edit-author' author.id %}">
|
2021-05-18 17:45:51 +00:00
|
|
|
<span class="icon icon-pencil" title="{% trans 'Edit Author' %}" aria-hidden="True"></span>
|
2021-06-14 22:55:26 +00:00
|
|
|
<span class="is-hidden-mobile">{% trans "Edit Author" %}</span>
|
2020-12-22 17:26:40 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-17 00:33:53 +00:00
|
|
|
|
2022-01-17 03:38:21 +00:00
|
|
|
<div class="block columns" itemscope itemtype="https://schema.org/Person">
|
2021-05-23 19:17:14 +00:00
|
|
|
<meta itemprop="name" content="{{ author.name }}">
|
|
|
|
|
2021-12-07 19:23:01 +00:00
|
|
|
{% firstof author.aliases author.born author.died as details %}
|
|
|
|
{% firstof author.wikipedia_link author.openlibrary_key author.inventaire_id author.isni as links %}
|
|
|
|
{% if details or links %}
|
2022-01-17 03:38:21 +00:00
|
|
|
<div class="column is-3">
|
2021-12-07 19:23:01 +00:00
|
|
|
{% if details %}
|
|
|
|
<section class="block content">
|
|
|
|
<h2 class="title is-4">{% trans "Author details" %}</h2>
|
|
|
|
<dl class="box">
|
2021-05-11 00:24:10 +00:00
|
|
|
{% if author.aliases %}
|
2021-12-07 19:23:01 +00:00
|
|
|
<div class="is-flex is-flex-wrap-wrap mr-1">
|
2021-05-24 10:51:18 +00:00
|
|
|
<dt class="has-text-weight-bold mr-1">{% trans "Aliases:" %}</dt>
|
2021-12-07 19:23:01 +00:00
|
|
|
<dd>
|
|
|
|
{% include "snippets/trimmed_list.html" with items=author.aliases itemprop="alternateName" %}
|
|
|
|
</dd>
|
2021-05-11 00:24:10 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-05-24 15:17:12 +00:00
|
|
|
|
2021-05-11 00:24:10 +00:00
|
|
|
{% if author.born %}
|
2021-12-07 19:23:01 +00:00
|
|
|
<div class="is-flex mt-1">
|
2021-05-24 10:51:18 +00:00
|
|
|
<dt class="has-text-weight-bold mr-1">{% trans "Born:" %}</dt>
|
2021-05-23 19:17:14 +00:00
|
|
|
<dd itemprop="birthDate">{{ author.born|naturalday }}</dd>
|
2021-05-11 00:24:10 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-05-24 15:17:12 +00:00
|
|
|
|
2021-05-23 18:25:42 +00:00
|
|
|
{% if author.died %}
|
2021-12-07 19:23:01 +00:00
|
|
|
<div class="is-flex mt-1">
|
2021-05-24 10:51:18 +00:00
|
|
|
<dt class="has-text-weight-bold mr-1">{% trans "Died:" %}</dt>
|
2021-05-23 19:17:14 +00:00
|
|
|
<dd itemprop="deathDate">{{ author.died|naturalday }}</dd>
|
2021-05-11 00:24:10 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</dl>
|
2021-12-07 19:23:01 +00:00
|
|
|
</section>
|
|
|
|
{% endif %}
|
2021-05-06 15:24:05 +00:00
|
|
|
|
2021-12-07 19:23:01 +00:00
|
|
|
{% if links %}
|
|
|
|
<section>
|
|
|
|
<h2 class="title is-4">{% trans "External links" %}</h2>
|
|
|
|
<div class="box">
|
|
|
|
{% if author.wikipedia_link %}
|
2021-12-07 20:30:21 +00:00
|
|
|
<div>
|
2022-01-17 19:25:41 +00:00
|
|
|
<a itemprop="sameAs" href="{{ author.wikipedia_link }}" rel="noopener noreferrer" target="_blank">
|
2021-12-07 19:23:01 +00:00
|
|
|
{% trans "Wikipedia" %}
|
|
|
|
</a>
|
2021-12-07 20:30:21 +00:00
|
|
|
</div>
|
2021-12-05 21:02:42 +00:00
|
|
|
{% endif %}
|
2021-12-07 19:23:01 +00:00
|
|
|
|
|
|
|
{% if author.isni %}
|
2021-12-07 20:30:21 +00:00
|
|
|
<div class="mt-1">
|
2022-01-17 19:25:41 +00:00
|
|
|
<a itemprop="sameAs" href="{{ author.isni_link }}" rel="noopener noreferrer" target="_blank">
|
2021-12-07 19:23:01 +00:00
|
|
|
{% trans "View ISNI record" %}
|
|
|
|
</a>
|
2021-12-07 20:30:21 +00:00
|
|
|
</div>
|
2021-12-05 21:02:42 +00:00
|
|
|
{% endif %}
|
2021-12-07 19:23:01 +00:00
|
|
|
|
2021-12-07 20:30:21 +00:00
|
|
|
{% trans "Load data" as button_text %}
|
2021-12-07 19:23:01 +00:00
|
|
|
{% if author.openlibrary_key %}
|
2021-12-07 20:30:21 +00:00
|
|
|
<div class="mt-1 is-flex">
|
2022-01-17 19:25:41 +00:00
|
|
|
<a class="mr-3" itemprop="sameAs" href="{{ author.openlibrary_link }}" target="_blank" rel="noopener noreferrer">
|
2021-12-07 19:23:01 +00:00
|
|
|
{% trans "View on OpenLibrary" %}
|
|
|
|
</a>
|
|
|
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
2021-12-30 21:37:07 +00:00
|
|
|
<button class="button is-small" type="button" data-modal-open="openlibrary_sync">
|
|
|
|
<span class="icon icon-download" title="{{ button_text }}"></span>
|
|
|
|
<span class="is-sr-only-mobile">{{ button_text }}</span>
|
|
|
|
</button>
|
|
|
|
{% include "author/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" id="openlibrary_sync" %}
|
2021-12-07 19:23:01 +00:00
|
|
|
{% endif %}
|
2021-12-07 20:30:21 +00:00
|
|
|
</div>
|
2021-12-07 19:23:01 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if author.inventaire_id %}
|
2021-12-07 20:30:21 +00:00
|
|
|
<div class="mt-1 is-flex">
|
2022-01-17 19:25:41 +00:00
|
|
|
<a class="mr-3" itemprop="sameAs" href="{{ author.inventaire_link }}" target="_blank" rel="noopener noreferrer">
|
2021-12-07 19:23:01 +00:00
|
|
|
{% trans "View on Inventaire" %}
|
|
|
|
</a>
|
2021-12-07 20:30:21 +00:00
|
|
|
|
2021-12-07 19:23:01 +00:00
|
|
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
2021-12-30 21:38:35 +00:00
|
|
|
<button class="button is-small" type="button" data-modal-open="inventaire_sync">
|
|
|
|
<span class="icon icon-download" title="{{ button_text }}"></span>
|
|
|
|
<span class="is-sr-only-mobile">{{ button_text }}</span>
|
|
|
|
</button>
|
|
|
|
{% include "author/sync_modal.html" with source="inventaire.io" source_name="Inventaire" id="inventaire_sync" %}
|
2021-12-07 19:23:01 +00:00
|
|
|
{% endif %}
|
2021-12-07 20:30:21 +00:00
|
|
|
</div>
|
2021-12-07 19:23:01 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if author.librarything_key %}
|
2021-12-07 20:30:21 +00:00
|
|
|
<div class="mt-1">
|
2022-01-17 19:25:41 +00:00
|
|
|
<a itemprop="sameAs" href="https://www.librarything.com/author/{{ author.librarything_key }}" target="_blank" rel="noopener noreferrer">
|
2021-12-07 19:23:01 +00:00
|
|
|
{% trans "View on LibraryThing" %}
|
|
|
|
</a>
|
2021-12-07 20:30:21 +00:00
|
|
|
</div>
|
2021-12-07 19:23:01 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if author.goodreads_key %}
|
2021-12-07 20:30:21 +00:00
|
|
|
<div>
|
2022-01-17 19:25:41 +00:00
|
|
|
<a itemprop="sameAs" href="https://www.goodreads.com/author/show/{{ author.goodreads_key }}" target="_blank" rel="noopener noreferrer">
|
2021-12-07 19:23:01 +00:00
|
|
|
{% trans "View on Goodreads" %}
|
|
|
|
</a>
|
2021-12-07 20:30:21 +00:00
|
|
|
</div>
|
2021-12-07 19:23:01 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</section>
|
2021-05-11 00:24:10 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-12-07 19:23:01 +00:00
|
|
|
{% endif %}
|
2020-03-17 00:33:53 +00:00
|
|
|
|
2022-01-17 03:38:21 +00:00
|
|
|
<div class="column">
|
|
|
|
{% if author.bio %}
|
|
|
|
{% include "snippets/trimmed_text.html" with full=author.bio trim_length=200 %}
|
|
|
|
{% endif %}
|
2021-12-07 19:23:01 +00:00
|
|
|
|
2022-01-17 03:38:21 +00:00
|
|
|
<h2 class="title is-4">{% blocktrans with name=author.name %}Books by {{ name }}{% endblocktrans %}</h2>
|
|
|
|
<div class="columns is-multiline is-mobile">
|
|
|
|
{% for book in books %}
|
|
|
|
<div class="column is-one-fifth-tablet is-half-mobile is-flex is-flex-direction-column">
|
|
|
|
<div class="is-flex-grow-1">
|
|
|
|
{% include 'landing/small-book.html' with book=book %}
|
|
|
|
</div>
|
|
|
|
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
|
2021-12-07 19:23:01 +00:00
|
|
|
</div>
|
2022-01-17 03:38:21 +00:00
|
|
|
{% endfor %}
|
2021-05-10 23:43:40 +00:00
|
|
|
</div>
|
2021-10-21 00:42:19 +00:00
|
|
|
|
2022-01-17 03:38:21 +00:00
|
|
|
<div>
|
|
|
|
{% include 'snippets/pagination.html' with page=books %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-21 00:42:19 +00:00
|
|
|
</div>
|
|
|
|
|
2020-02-11 06:32:03 +00:00
|
|
|
{% endblock %}
|