From 4c99fd7f12beb61e476786ce9f414038c678e8f6 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 10 May 2021 17:24:10 -0700 Subject: [PATCH] Adds metadata to author view --- bookwyrm/templates/author/author.html | 51 +++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index c7fdea0e..d342da47 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -1,6 +1,7 @@ {% extends 'layout.html' %} {% load i18n %} {% load bookwyrm_tags %} +{% load humanize %} {% block title %}{{ author.name }}{% endblock %} @@ -22,14 +23,52 @@ -
- {% if author.bio %} - {{ author.bio | to_markdown | safe }} - {% endif %} +
+ {% if author.aliases or author.born or author.died or author.wikipedia_link %} +
+
+
+ {% if author.aliases %} +
+
{% trans "Aliases:" %}
+
{{ author.aliases|join:', ' }}
+
+ {% endif %} + {% if author.born %} +
+
{% trans "Born:" %}
+
{{ author.born|naturalday }}
+
+ {% endif %} + {% if author.aliases %} +
+
{% trans "Died:" %}
+
{{ author.died|naturalday }}
+
+ {% endif %} +
- {% if author.wikipedia_link %} -

{% trans "Wikipedia" %}

+ {% if author.wikipedia_link %} +

{% trans "Wikipedia" %}

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

+ {% trans "View on OpenLibrary" %} +

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

+ {% trans "View on Inventaire" %} +

+ {% endif %} +
+
{% endif %} +
+ {% if author.bio %} + {{ author.bio | to_markdown | safe }} + {% endif %} +