{% extends 'base.html.twig' %} {% block title %}{{ list.name }} โ€” Reading Lists โ€” Shamra Academia{% endblock %} {% block og_title %}{{ list.name }} โ€” Shamra Academia{% endblock %} {% block og_description %}{% if list.description %}{{ list.description|slice(0, 200) }}{% else %}{{ 'reading_lists.page_description'|trans({}, 'ReadingList') }}{% endif %}{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block body %}
{{ is_granted('ROLE_USER') ? 'reading_lists.back_to_lists'|trans({}, 'ReadingList') : 'reading_lists.discover'|trans({}, 'ReadingList') }} {{ 'reading_lists.discover'|trans({}, 'ReadingList') }}
{% if list.listType == 'want_to_read' %}๐Ÿ“š {% elseif list.listType == 'reading' %}๐Ÿ“– {% elseif list.listType == 'read' %}โœ… {% else %}๐Ÿ“‹{% endif %}

{% if list.isSystemList %} {{ ('reading_lists.' ~ (list.listType == 'want_to_read' ? 'want_to_read' : list.listType == 'reading' ? 'currently_reading' : 'read'))|trans({}, 'ReadingList') }} {% else %} {{ list.name }} {% endif %}

{% if list.owner %}{{ 'reading_lists.by'|trans({}, 'ReadingList') }} {{ list.owner.fullname ?? list.owner.username }} ยท {% endif %} {{ list.itemCount }} {{ 'reading_lists.papers'|trans({}, 'ReadingList') }} {% if list.visibility == 'public' %} ยท {{ list.followerCount }} {{ 'reading_lists.followers'|trans({}, 'ReadingList') }}{% endif %}
{% if list.description %}

{{ list.description }}

{% endif %} {% if canEdit and not list.isSystemList %}
{% endif %}
{% if items|length > 0 %}
{% for item in items %}

{% if item.cachedSlug %} {{ item.cachedTitle ?? 'reading_lists.untitled'|trans({}, 'ReadingList') }} {% else %} {{ item.cachedTitle ?? 'reading_lists.untitled'|trans({}, 'ReadingList') }} {% endif %}

{% if item.cachedAuthors %}{{ item.cachedAuthors }}{% endif %} {% if item.cachedYear %} ยท {{ item.cachedYear }}{% endif %} {% if item.startedAt %} ยท {{ 'reading_lists.started_on'|trans({}, 'ReadingList') }} {{ item.startedAt|date('M j, Y') }}{% endif %} {% if item.finishedAt %} ยท {{ 'reading_lists.finished_on'|trans({}, 'ReadingList') }} {{ item.finishedAt|date('M j, Y') }}{% endif %}
{% if item.rating %}
{% for i in 1..5 %} {% if i <= item.rating %}โ˜…{% else %}โ˜†{% endif %} {% endfor %}
{% endif %}
{% if item.readingStatus == 'to_read' %}๐Ÿ“š {{ 'reading_lists.status.to_read'|trans({}, 'ReadingList') }} {% elseif item.readingStatus == 'reading' %}๐Ÿ“– {{ 'reading_lists.status.reading'|trans({}, 'ReadingList') }}{% if item.progress %} ({{ item.progress }}%){% endif %} {% else %}โœ… {{ 'reading_lists.status.read'|trans({}, 'ReadingList') }} {% endif %}
{% if item.notes %}
{{ 'reading_lists.notes_label'|trans({}, 'ReadingList') }} {{ item.notes }}
{% endif %} {% if item.review and list.visibility == 'public' %}
{{ 'reading_lists.review_label'|trans({}, 'ReadingList') }} {{ item.review }}
{% endif %}
{% endfor %}
{% else %}

{{ 'reading_lists.no_items'|trans({}, 'ReadingList') }}

{% endif %} {% if canEdit and not list.isSystemList %} {% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}