2016-10-26 17:21:19 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{% trans %}SAS{% endtrans %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2016-11-20 09:40:49 +00:00
|
|
|
{% macro print_path(file) %}
|
2016-11-20 13:08:10 +00:00
|
|
|
{% if file and file.parent %}
|
2016-11-20 09:40:49 +00:00
|
|
|
{{ print_path(file.parent) }}
|
|
|
|
<a href="{{ url('sas:album', album_id=file.id) }}">{{ file.get_display_name() }}</a> >
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
2016-10-26 17:21:19 +00:00
|
|
|
{% block content %}
|
2016-11-20 13:08:10 +00:00
|
|
|
<a href="{{ url('sas:main') }}">SAS</a> > {{ print_path(album.parent) }} {{ album.get_display_name() }}
|
2016-11-08 14:12:37 +00:00
|
|
|
<h3>{{ album.get_display_name() }}</h3>
|
2016-11-20 22:53:41 +00:00
|
|
|
<hr>
|
2016-10-26 17:21:19 +00:00
|
|
|
<div>
|
2016-11-09 08:23:39 +00:00
|
|
|
{% for a in album.children.filter(is_folder=True, is_moderated=True).all() %}
|
2016-11-20 22:53:41 +00:00
|
|
|
<a href="{{ url("sas:album", album_id=a.id) }}" style="display: inline-block">
|
|
|
|
<div class="album">
|
|
|
|
<div>
|
|
|
|
{% if a.children.filter(is_folder=False, is_moderated=True).exists() %}
|
|
|
|
<img src="{{ a.children.filter(is_folder=False).first().as_picture.get_download_thumb_url() }}" alt="{% trans %}preview{% endtrans %}">
|
|
|
|
{% else %}
|
|
|
|
<img src="{{ static('core/img/sas.jpg') }}" alt="{% trans %}preview{% endtrans %}">
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{{ a.name }}
|
2016-10-26 17:21:19 +00:00
|
|
|
</div>
|
2016-11-20 22:53:41 +00:00
|
|
|
</a>
|
2016-10-26 17:21:19 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<div>
|
2016-11-09 08:23:39 +00:00
|
|
|
{% for p in album.children.filter(is_folder=False, is_moderated=True).all() %}
|
2016-11-08 14:12:37 +00:00
|
|
|
{% if p.as_picture.can_be_viewed_by(user) %}
|
2016-11-20 22:53:41 +00:00
|
|
|
<div class="picture">
|
2016-11-19 16:19:00 +00:00
|
|
|
<a href="{{ url("sas:picture", picture_id=p.id) }}#pict">
|
2016-11-20 22:53:41 +00:00
|
|
|
<img src="{{ p.as_picture.get_download_thumb_url() }}" alt="{{ p.get_display_name() }}" />
|
2016-10-26 17:21:19 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2016-11-19 16:19:00 +00:00
|
|
|
<form action="" method="post" enctype="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ form.as_p() }}
|
|
|
|
<p><input type="submit" value="{% trans %}Upload{% endtrans %}" /></p>
|
|
|
|
</form>
|
2016-10-26 17:21:19 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2016-11-20 23:35:07 +00:00
|
|
|
{% block script %}
|
|
|
|
{{ super() }}
|
|
|
|
{% endblock %}
|