mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Add file moderation tool
This commit is contained in:
@ -42,7 +42,8 @@
|
||||
{% if not file.home_of and not file.home_of_club and file.parent %}
|
||||
<p><a href="{{ url('core:file_delete', file_id=file.id, popup=popup) }}">{% trans %}Delete{% endtrans %}</a></p>
|
||||
{% endif %}
|
||||
{% if popup %}
|
||||
{% if user.is_in_group(settings.SITH_GROUPS['communication-admin']['id']) %}
|
||||
<p><a href="{{ url('core:file_moderate', file_id=file.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
28
core/templates/core/file_moderation.jinja
Normal file
28
core/templates/core/file_moderation.jinja
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}File moderation{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{% trans %}File moderation{% endtrans %}</h3>
|
||||
<div>
|
||||
{% for f in files %}
|
||||
<div style="margin: 2px; padding: 2px; border: solid 1px red; text-align: center">
|
||||
{% if f.is_folder %}
|
||||
<strong>Folder</strong>
|
||||
{% else %}
|
||||
<strong>File</strong>
|
||||
{% endif %}
|
||||
<p>
|
||||
<a href="{{ url("core:file_detail", file_id=f.id) }}">{{ f.name }}</a><br/>
|
||||
{% trans %}Full name: {% endtrans %}{{ f.get_parent_path()+'/'+f.name }}<br/>
|
||||
{% trans %}Owner: {% endtrans %}{{ f.owner.get_display_name() }}<br/>
|
||||
{% trans %}Date: {% endtrans %}{{ f.date|date(DATE_FORMAT) }} {{ f.date|time(TIME_FORMAT) }}<br/>
|
||||
</p>
|
||||
<p><a href="{{ url('core:file_moderate', file_id=f.id) }}">{% trans %}Moderate{% endtrans %}</a> -
|
||||
<a href="{{ url('core:file_delete', file_id=f.id) }}?next={{ url('core:file_moderation') }}">{% trans %}Delete{% endtrans %}</a></p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
@ -8,6 +8,7 @@
|
||||
<h2>{% trans %}Edit user profile{% endtrans %}</h2>
|
||||
<form action="" method="post" enctype="multipart/form-data" id="user_edit">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors() }}
|
||||
{% for field in form %}
|
||||
<p>{{ field.errors }}<label for="{{ field.name }}">{{ field.label }}
|
||||
{%- if field.name == "profile_pict" -%}
|
||||
|
@ -58,6 +58,15 @@
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
|
||||
{% if user.is_in_group(settings.SITH_GROUPS['communication-admin']['id']) %}
|
||||
<hr>
|
||||
<h4>{% trans %}Communication{% endtrans %}</h4>
|
||||
<ul>
|
||||
<li><a href="{{ url('core:file_moderation') }}">{% trans %}Moderate files{% endtrans %}</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<hr>
|
||||
<h4>{% trans %}Club tools{% endtrans %}</h4>
|
||||
<ul>
|
||||
|
Reference in New Issue
Block a user