From 669247415f5ff2aae61854432d740f39f1647463 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 23 Dec 2018 16:00:28 -0800 Subject: [PATCH] Add counts to the parent and child hierarchy headers. --- frontends/etiquette_flask/templates/album.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontends/etiquette_flask/templates/album.html b/frontends/etiquette_flask/templates/album.html index e37a3bb..7a65751 100644 --- a/frontends/etiquette_flask/templates/album.html +++ b/frontends/etiquette_flask/templates/album.html @@ -200,13 +200,14 @@ ALBUM_ID = undefined;
-

Parents

{% set parents = album.get_parents() %} {% if parents %} - {% for parent in parents %} - {{album_card.create_album_card(parent, view=view)}} - {% endfor %} +

{{parents|length}} Parents

+ {% for parent in parents %} + {{album_card.create_album_card(parent, view=view)}} + {% endfor %} {% else %} +

1 Parent

{{album_card.create_root_album_card(view=view)}} {% endif %}
@@ -214,7 +215,7 @@ ALBUM_ID = undefined; {% set sub_albums = album.get_children() %} {% if sub_albums %}
-

Children

+

{{sub_albums|length}} Children

{% for sub_album in sub_albums|sort(attribute='title') %} {{album_card.create_album_card(sub_album, view=view, unlink_parent=album)}} {% endfor %}