mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-01 07:35:17 +00:00
Fix SAS being accessible for non-connected users (wtf)
This commit is contained in:
parent
2bb8e0b231
commit
fe31d8cfda
@ -5301,6 +5301,10 @@ msgstr "Cet album ne contient aucune photo."
|
|||||||
msgid "preview"
|
msgid "preview"
|
||||||
msgstr "miniature"
|
msgstr "miniature"
|
||||||
|
|
||||||
|
#: sas/templates/sas/main.jinja:42
|
||||||
|
msgid "You must be logged in to see the SAS."
|
||||||
|
msgstr "Vous devez être connecté pour voir les photos."
|
||||||
|
|
||||||
#: sas/templates/sas/album.jinja:89
|
#: sas/templates/sas/album.jinja:89
|
||||||
msgid "Upload"
|
msgid "Upload"
|
||||||
msgstr "Envoyer"
|
msgstr "Envoyer"
|
||||||
|
@ -37,67 +37,73 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}SAS{% endtrans %}</h3>
|
<h3>{% trans %}SAS{% endtrans %}</h3>
|
||||||
<br>
|
|
||||||
<h4>{% trans %}Latest albums{% endtrans %}</h4>
|
|
||||||
<div class="albums">
|
|
||||||
{% for a in latest %}
|
|
||||||
{{ display_album(a) }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
{% if not user.is_authenticated %}
|
||||||
|
<p>{% trans %}You must be logged in to see the SAS.{% endtrans %}</p>
|
||||||
{% if edit_mode %}
|
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
|
||||||
{% csrf_token %}
|
|
||||||
|
|
||||||
<div class="navbar">
|
|
||||||
<h4>{% trans %}All categories{% endtrans %}</h4>
|
|
||||||
|
|
||||||
{# <div class="toolbar">
|
|
||||||
<input name="delete" type="submit" value="{% trans %}Delete{% endtrans %}">
|
|
||||||
</div> #}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if clipboard %}
|
|
||||||
<div class="clipboard">
|
|
||||||
{% trans %}Clipboard: {% endtrans %}
|
|
||||||
<ul>
|
|
||||||
{% for f in clipboard %}
|
|
||||||
<li>{{ f.get_full_path() }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
<input name="clear" type="submit" value="{% trans %}Clear clipboard{% endtrans %}">
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<h4>{% trans %}All categories{% endtrans %}</h4>
|
<br>
|
||||||
{% endif %}
|
<h4>{% trans %}Latest albums{% endtrans %}</h4>
|
||||||
|
|
||||||
<div class="albums">
|
<div class="albums">
|
||||||
{% for a in categories %}
|
{% for a in latest %}
|
||||||
{{ display_album(a, true) }}
|
{{ display_album(a) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if edit_mode %}
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<form class="add-files" action="" method="post" enctype="multipart/form-data">
|
{% if edit_mode %}
|
||||||
{% csrf_token %}
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
<div class="inputs">
|
<div class="navbar">
|
||||||
<div>
|
<h4>{% trans %}All categories{% endtrans %}</h4>
|
||||||
<label for="{{ form.album_name.name }}">{{ form.album_name.label }}</label>
|
|
||||||
{{ form.album_name }}
|
{# <div class="toolbar">
|
||||||
|
<input name="delete" type="submit" value="{% trans %}Delete{% endtrans %}">
|
||||||
|
</div> #}
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" value="{% trans %}Create{% endtrans %}" />
|
|
||||||
</div>
|
{% if clipboard %}
|
||||||
|
<div class="clipboard">
|
||||||
{{ form.non_field_errors() }}
|
{% trans %}Clipboard: {% endtrans %}
|
||||||
{{ form.album_name.errors }}
|
<ul>
|
||||||
</form>
|
{% for f in clipboard %}
|
||||||
|
<li>{{ f.get_full_path() }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
<input name="clear" type="submit" value="{% trans %}Clear clipboard{% endtrans %}">
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<h4>{% trans %}All categories{% endtrans %}</h4>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="albums">
|
||||||
|
{% for a in categories %}
|
||||||
|
{{ display_album(a, true) }}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if edit_mode %}
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<form class="add-files" action="" method="post" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
<div class="inputs">
|
||||||
|
<div>
|
||||||
|
<label for="{{ form.album_name.name }}">{{ form.album_name.label }}</label>
|
||||||
|
{{ form.album_name }}
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="{% trans %}Create{% endtrans %}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ form.non_field_errors() }}
|
||||||
|
{{ form.album_name.errors }}
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user