2016-09-18 08:33:46 +00:00
|
|
|
<!DOCTYPE html5>
|
|
|
|
<html>
|
|
|
|
<head>
|
2016-11-07 02:00:30 +00:00
|
|
|
{% import "photo_card.html" as photo_card %}
|
2016-09-18 08:33:46 +00:00
|
|
|
{% import "header.html" as header %}
|
2017-03-11 01:08:38 +00:00
|
|
|
<title>Album {{album.display_name}}</title>
|
2016-09-18 08:33:46 +00:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<link rel="stylesheet" href="/static/common.css">
|
2016-11-27 09:06:11 +00:00
|
|
|
|
2016-09-18 08:33:46 +00:00
|
|
|
<style>
|
2016-12-14 21:26:42 +00:00
|
|
|
p
|
|
|
|
{
|
|
|
|
word-break: break-word;
|
|
|
|
}
|
2016-09-18 08:33:46 +00:00
|
|
|
#content_body
|
|
|
|
{
|
|
|
|
/* overriding common.css here */
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
</style>
|
2016-11-27 09:06:11 +00:00
|
|
|
</head>
|
|
|
|
|
2016-09-18 08:33:46 +00:00
|
|
|
|
|
|
|
<body>
|
2016-12-18 13:12:14 +00:00
|
|
|
{{header.make_header(session=session)}}
|
2016-09-18 08:33:46 +00:00
|
|
|
<div id="content_body">
|
2016-12-21 00:33:40 +00:00
|
|
|
<h2>{{album.title}}</h2>
|
|
|
|
<p>{{album.description}}</p>
|
|
|
|
{% set parent=album.parent() %}
|
2016-09-18 08:33:46 +00:00
|
|
|
{% if parent %}
|
2017-03-11 01:08:38 +00:00
|
|
|
<h3>Parent: <a href="/album/{{parent.id}}">{{parent.display_name}}</a></h3>
|
2016-11-06 00:58:37 +00:00
|
|
|
{% else %}
|
|
|
|
<h3>Parent: <a href="/albums">Albums</a></h3>
|
2016-09-18 08:33:46 +00:00
|
|
|
{% endif %}
|
2016-12-21 00:33:40 +00:00
|
|
|
{% set sub_albums = album.children() %}
|
|
|
|
{% if sub_albums %}
|
2016-09-18 08:33:46 +00:00
|
|
|
<h3>Sub-albums</h3>
|
|
|
|
<ul>
|
2017-02-05 02:30:02 +00:00
|
|
|
{% for sub_album in sub_albums|sort(attribute='title') %}
|
2017-03-11 01:08:38 +00:00
|
|
|
<li><a href="/album/{{sub_album.id}}">{{sub_album.display_name}}</a>
|
2016-09-18 08:33:46 +00:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
2016-12-24 03:49:51 +00:00
|
|
|
{% set photos = album.photos() %}
|
2016-12-21 03:53:06 +00:00
|
|
|
<span>
|
|
|
|
Download:
|
2017-02-25 06:07:59 +00:00
|
|
|
{% 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 %}
|
2016-12-21 03:53:06 +00:00
|
|
|
</span>
|
2016-09-18 08:33:46 +00:00
|
|
|
{% if photos %}
|
2017-03-31 01:56:27 +00:00
|
|
|
<h3>Photos</h3>
|
|
|
|
{% if view != "list" %}
|
|
|
|
<a href="?view=list">List view</a>
|
|
|
|
{% else %}
|
|
|
|
<a href="?view=grid">Grid view</a>
|
|
|
|
{% endif %}
|
|
|
|
<ul>
|
2016-09-18 08:33:46 +00:00
|
|
|
{% for photo in photos %}
|
2017-03-31 01:56:27 +00:00
|
|
|
{{photo_card.create_photo_card(photo, view=view)}}
|
2016-09-18 08:33:46 +00:00
|
|
|
{% endfor %}
|
2017-03-31 01:56:27 +00:00
|
|
|
</ul>
|
2016-09-18 08:33:46 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2016-10-21 03:15:24 +00:00
|
|
|
function submit_tag(callback)
|
|
|
|
{
|
2016-12-21 00:33:40 +00:00
|
|
|
add_photo_tag('{{album.id}}', add_tag_box.value, callback);
|
2016-10-21 03:15:24 +00:00
|
|
|
add_tag_box.value = "";
|
|
|
|
}
|
2016-11-27 09:06:11 +00:00
|
|
|
</script>
|
|
|
|
</html>
|