Add counts to the parent and child hierarchy headers.
This commit is contained in:
parent
29e999ccac
commit
669247415f
1 changed files with 6 additions and 5 deletions
|
@ -200,13 +200,14 @@ ALBUM_ID = undefined;
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="hierarchy_parents">
|
<div id="hierarchy_parents">
|
||||||
<h3>Parents</h3>
|
|
||||||
{% set parents = album.get_parents() %}
|
{% set parents = album.get_parents() %}
|
||||||
{% if parents %}
|
{% if parents %}
|
||||||
|
<h3>{{parents|length}} Parents</h3>
|
||||||
{% for parent in parents %}
|
{% for parent in parents %}
|
||||||
{{album_card.create_album_card(parent, view=view)}}
|
{{album_card.create_album_card(parent, view=view)}}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
<h3>1 Parent</h3>
|
||||||
{{album_card.create_root_album_card(view=view)}}
|
{{album_card.create_root_album_card(view=view)}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -214,7 +215,7 @@ ALBUM_ID = undefined;
|
||||||
{% set sub_albums = album.get_children() %}
|
{% set sub_albums = album.get_children() %}
|
||||||
{% if sub_albums %}
|
{% if sub_albums %}
|
||||||
<div id="hierarchy_children">
|
<div id="hierarchy_children">
|
||||||
<h3>Children</h3>
|
<h3>{{sub_albums|length}} Children</h3>
|
||||||
{% for sub_album in sub_albums|sort(attribute='title') %}
|
{% for sub_album in sub_albums|sort(attribute='title') %}
|
||||||
{{album_card.create_album_card(sub_album, view=view, unlink_parent=album)}}
|
{{album_card.create_album_card(sub_album, view=view, unlink_parent=album)}}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue