mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
WIP SAS
This commit is contained in:
@ -5,25 +5,27 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{{ sithfile.get_display_name() }}</h3>
|
||||
<h3>{{ album.get_display_name() }}</h3>
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Upload{% endtrans %}" /></p>
|
||||
</form>
|
||||
<div>
|
||||
{% for a in sithfile.children.filter(is_folder=True).all() %}
|
||||
{% for a in album.children.filter(is_folder=True).all() %}
|
||||
<div style="display: inline-block; border: solid 1px black;">
|
||||
<a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
{% for a in sithfile.children.filter(mime_type__in=['image/jpeg', 'image/png']).all() %}
|
||||
{% if a.as_picture.can_be_viewed_by(user) %}
|
||||
{# for a in album.children.filter(mime_type__in=['image/jpeg', 'image/png']).all() #}
|
||||
{% for p in album.children.filter(is_folder=False).all() %}
|
||||
<p>{{ p.name }}</p>
|
||||
{% if p.as_picture.can_be_viewed_by(user) %}
|
||||
<div style="display: inline-block; border: solid 1px black;">
|
||||
<a href="{{ url("sas:picture", picture_id=a.id) }}">
|
||||
<img src="{{ a.as_picture.get_download_url() }}" alt="{{ a.get_display_name() }}" style="width: 50px"/>
|
||||
<a href="{{ url("sas:picture", picture_id=p.id) }}">
|
||||
<img src="{{ p.as_picture.get_download_url() }}" alt="{{ p.get_display_name() }}" style="width: 50px"/>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user