main.jinja 1.24 KB
Newer Older
Skia's avatar
Skia committed
1
2
3
4
5
6
7
8
{% extends "core/base.jinja" %}

{% block title %}
{% trans %}SAS{% endtrans %}
{% endblock %}

{% block content %}
<h3>{% trans %}SAS{% endtrans %}</h3>
Skia's avatar
Skia committed
9
{% if user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID) %}
Skia's avatar
Skia committed
10
11
<form action="" method="post" enctype="multipart/form-data">
    {% csrf_token %}
Skia's avatar
Skia committed
12
13
14
    {{ form.non_field_errors() }}
    <p>{{ form.album_name.errors }}<label for="{{ form.album_name.name }}">{{ form.album_name.label }}</label>
    {{ form.album_name }}</p>
Skia's avatar
Skia committed
15
16
    <p><input type="submit" value="{% trans %}Create{% endtrans %}" /></p>
</form>
Skia's avatar
Skia committed
17
{% endif %}
Skia's avatar
Skia committed
18
19
<div>
    {% for a in root_file.children.filter(is_folder=True).all() %}
Skia's avatar
Skia committed
20
21
    {% if a.is_moderated %}
    <div style="display: inline-block; border: solid 1px black; text-align: center">
Skia's avatar
Skia committed
22
23
        <a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
    </div>
Skia's avatar
Skia committed
24
25
26
27
28
29
    {% elif user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID) %}
    <div style="display: inline-block; border: solid 1px red; text-align: center">
        <p><a href="{{ url('core:file_moderate', file_id=a.id) }}?next={{ url('sas:moderation') }}">Moderate</a> or <a href="">Delete</a></p>
        <a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
    </div>
    {% endif %}
Skia's avatar
Skia committed
30
31
32
    {% endfor %}
</div>
{% endblock %}