etiquette/templates/album.html

78 lines
No EOL
1.9 KiB
HTML

<!DOCTYPE html5>
<html>
<head>
{% import "photo_card.html" as photo_card %}
{% import "header.html" as header %}
<title>Album {{album.display_name}}</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="/static/common.css">
<style>
p
{
word-break: break-word;
}
#content_body
{
/* overriding common.css here */
display: block;
}
</style>
</head>
<body>
{{header.make_header(session=session)}}
<div id="content_body">
<h2>{{album.title}}</h2>
<p>{{album.description}}</p>
{% set parent=album.parent() %}
{% if parent %}
<h3>Parent: <a href="/album/{{parent.id}}">{{parent.display_name}}</a></h3>
{% else %}
<h3>Parent: <a href="/albums">Albums</a></h3>
{% endif %}
{% set sub_albums = album.children() %}
{% if sub_albums %}
<h3>Sub-albums</h3>
<ul>
{% for sub_album in sub_albums|sort(attribute='title') %}
<li><a href="/album/{{sub_album.id}}">{{sub_album.display_name}}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% set photos = album.photos() %}
<span>
Download:
{% if photos %}
<a href="/album/{{album.id}}.zip?recursive=no">
These files ({{album.sum_bytes(recurse=False, string=True)}})
</a>
{% endif %}
{% if sub_albums %}
<a href="/album/{{album.id}}.zip?recursive=yes">
Include children ({{album.sum_bytes(recurse=True, string=True)}})
</a>
{% endif %}
</span>
{% if photos %}
<h3>Photos</h3>
<ul>
{% for photo in photos %}
{{photo_card.create_photo_card(photo, view=view)}}
{% endfor %}
</ul>
{% endif %}
</div>
</body>
<script type="text/javascript">
function submit_tag(callback)
{
add_photo_tag('{{album.id}}', add_tag_box.value, callback);
add_tag_box.value = "";
}
</script>
</html>