{% extends 'base.html.twig' %} {% block toolbar %} {% set left_group %} {% endset %} {% set right_group %} {% endset %} {% endblock %} {% block body %}

{{ manga.title }}

{{ manga.publicationYear }} Chapters: {{ manga.chapters.count }}
/media/mangas/{{ manga.title }} ({{ manga.publicationYear }}) {{ manga.status ?? 'Terminé' }}
{% set genre_count = 0 %} {% for genre in manga.genres %} {% if genre_count < 5 %} {{ genre }} {% set genre_count = genre_count + 1 %} {% endif %} {% endfor %} {% if genre_count == 5 and manga.genres|length > 5 %} ... {% endif %}
{{ manga.rating|round(2) }}

{{ manga.description|truncate(500) }}

{% for volume, chapters in chapters_by_volume %} {% set is_first = loop.first %} {% set volume_cbz_path = chapters|first.cbzPath %} {% set all_chapters_same_cbz = chapters|reduce((carry, chapter) => carry and chapter.cbzPath == volume_cbz_path, true) %} {% set available_chapters = chapters|filter(chapter => chapter.cbzPath is not null) %} {% set total_chapters = chapters|length %}

Volume {{ '%02d'|format(volume) }}

{{ available_chapters|length }} / {{ total_chapters }}
{{ chapters|length }} Chapters
{% if all_chapters_same_cbz and volume_cbz_path is not null %} {% else %} {% for chapter in chapters %} {% if chapter.cbzPath is not null %} {% else %} {% endif %} {% endfor %} {% endif %}
# Title Actions
{{ '%02d'|format(volume) }} Volume {{ '%02d'|format(volume) }}
{{ '%02d'|format(chapter.number) }} {{ '%02d'|format(chapter.number) }} {% if chapter.cbzPath is not null %} {{ chapter.title ?? 'No title' }} {% else %} {{ chapter.title ?? 'No title' }} {% endif %} {% if chapter.cbzPath is null %} {% else %} {% endif %}
{% endfor %}
{% endblock %}