Display album hierarchy as nested bullets instead of separate lists.
Not perfect yet but I didn't like having all those header elements.
This commit is contained in:
parent
a7b5a7d42a
commit
156e467814
1 changed files with 18 additions and 14 deletions
|
@ -60,22 +60,26 @@ p
|
||||||
{{-album.description-}}
|
{{-album.description-}}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<ul>
|
||||||
{% set viewparam = "?view=list" if view == "list" else "" %}
|
{% set viewparam = "?view=list" if view == "list" else "" %}
|
||||||
{% set parent = album.parent() %}
|
{% set parent = album.parent() %}
|
||||||
{% if parent %}
|
{% if parent %}
|
||||||
<h3>Parent: <a href="/album/{{parent.id}}{{viewparam}}">{{parent.display_name}}</a></h3>
|
<li><a href="/album/{{parent.id}}{{viewparam}}">{{parent.display_name}}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>Parent: <a href="/albums">Albums</a></h3>
|
<li><a href="/albums">Albums</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set sub_albums = album.children() %}
|
|
||||||
<h3>Sub-albums</h3>
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>You are here</li>
|
||||||
|
<ul>
|
||||||
|
{% set sub_albums = album.children() %}
|
||||||
{% for sub_album in sub_albums|sort(attribute='title') %}
|
{% for sub_album in sub_albums|sort(attribute='title') %}
|
||||||
<li><a href="/album/{{sub_album.id}}{{viewparam}}">{{sub_album.display_name}}</a></li>
|
<li><a href="/album/{{sub_album.id}}{{viewparam}}">{{sub_album.display_name}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li><button class="green_button" onclick="var parent='{{album.id}}'; create_album_and_follow(parent);">Create child</button></li>
|
<li><button class="green_button" onclick="var parent='{{album.id}}'; create_album_and_follow(parent);">Create child</button></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% set photos = album.photos() %}
|
{% set photos = album.photos() %}
|
||||||
{% if photos %}
|
{% if photos %}
|
||||||
|
|
Loading…
Reference in a new issue