{% extends 'layout.html' %} {% block content %}
{# TODO: a helper function for displaying a username #}
{% if activity.user.localname %}{{ activity.user.localname }}{% else %}{{ activity.user.username }}{% endif %}
{% if activity.fedireads_type == 'Shelve' %}
{# display a reading/shelving activity #}
{% if activity.shelf.shelf_type == 'to-read' %}
wants to read
{% elif activity.shelf.shelf_type == 'read' %}
finished reading
{% elif activity.shelf.shelf_type == 'reading' %}
started reading
{% else %}
shelved in "{{ activity.shelf.name }}"
{% endif %}
{{ activity.book.data.title }} by {{ activity.book.authors.first.data.name }}
{{ activity.rating }} stars
{{ activity.review_content }}