{% macro create_album_card(album, view="grid", unlink_parent=none, draggable=false) %} {% set id = "album_card_root" if album == "root" else "album_card_" + album.id %} {% set view = (view if view in ("list", "grid") else "grid") %} {% set viewparam = "?view=list" if view == "list" else "" %}
{% if album == "root" %} {% else %} {% endif %}
{% if unlink_parent is not none %} {% endif %}
{% if album == "root" %} Albums {% else %} {{album.display_name}} {% endif %}
{% if album == "root" %} {% else %} {% set child_count = album.get_children()|length %} {% set photo_count = album.sum_photos(recurse=False) %} {{child_count}} {{-' | '-}} {{photo_count}} {% endif %}
{% endmacro %}