2016-08-10 03:48:06 +00:00
|
|
|
{% extends "core/file.jinja" %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block file %}
|
|
|
|
<h3>
|
|
|
|
{% if file.is_folder %}
|
|
|
|
📁
|
|
|
|
{% else %}
|
|
|
|
🗎
|
|
|
|
{% endif %}
|
|
|
|
{{ file.get_display_name() }}
|
|
|
|
</h3>
|
|
|
|
<p>{% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}</p>
|
|
|
|
{% if file.is_folder %}
|
2016-08-10 12:48:18 +00:00
|
|
|
{% if user.can_edit(file) %}
|
2016-08-10 03:48:06 +00:00
|
|
|
<form action="" method="post" enctype="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ form.as_p() }}
|
|
|
|
<p><input type="submit" value="{% trans %}Add{% endtrans %}"></p>
|
|
|
|
</form>
|
2016-08-10 12:48:18 +00:00
|
|
|
{% endif %}
|
2016-12-12 23:45:20 +00:00
|
|
|
<form action="" method="post" enctype="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
|
|
|
<p>
|
|
|
|
<input name="delete" type="submit" value="{% trans %}Delete{% endtrans %}"> |
|
|
|
|
<input name="clear" type="submit" value="{% trans %}Clear clipboard{% endtrans %}"> |
|
|
|
|
<input name="cut" type="submit" value="{% trans %}Cut{% endtrans %}"> |
|
|
|
|
<input name="paste" type="submit" value="{% trans %}Paste{% endtrans %}">
|
|
|
|
</p>
|
2016-12-13 00:24:23 +00:00
|
|
|
{% if clipboard %}
|
|
|
|
<p>{% trans %}Clipboard: {% endtrans %}
|
|
|
|
<ul>
|
|
|
|
{% for f in clipboard %}
|
|
|
|
<li>{{ f.get_full_path() }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2016-12-12 23:45:20 +00:00
|
|
|
<ul>
|
|
|
|
{% for f in file.children.order_by('-is_folder', 'name').all() %}
|
|
|
|
<li>
|
|
|
|
<input type="checkbox" name="file_list" value="{{ f.id }}">
|
|
|
|
{% if f.is_folder %}
|
|
|
|
📁
|
|
|
|
{% else %}
|
|
|
|
🗎
|
|
|
|
{% endif %}
|
|
|
|
<a href="{{ url('core:file_detail', file_id=f.id, popup=popup) }}">{{ f.get_display_name() }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</form>
|
2016-08-10 03:48:06 +00:00
|
|
|
{% else %}
|
|
|
|
<p>{% trans %}Real name: {% endtrans %}{{ file.file.name.split('/')[-1] }}</p>
|
|
|
|
<p>{% trans %}Date: {% endtrans %}{{ file.date|localtime|date(DATETIME_FORMAT) }} -
|
|
|
|
{{ file.date|localtime|time(DATETIME_FORMAT) }}</p>
|
|
|
|
<p>{% trans %}Type: {% endtrans %}{{ file.mime_type }}</p>
|
|
|
|
<p>{% trans %}Size: {% endtrans %}{{ file.size }} {% trans %}bytes{% endtrans %}</p>
|
|
|
|
|
|
|
|
<p><a href="{{ url('core:download', file_id=file.id) }}">{% trans %}Download{% endtrans %}</a></p>
|
|
|
|
{% endif %}
|
2016-08-10 14:23:12 +00:00
|
|
|
{% if not file.home_of and not file.home_of_club and file.parent %}
|
2016-08-10 03:48:06 +00:00
|
|
|
<p><a href="{{ url('core:file_delete', file_id=file.id, popup=popup) }}">{% trans %}Delete{% endtrans %}</a></p>
|
2016-08-10 14:23:12 +00:00
|
|
|
{% endif %}
|
2016-12-10 00:29:56 +00:00
|
|
|
{% if user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) %}
|
2016-11-09 08:13:57 +00:00
|
|
|
<p><a href="{{ url('core:file_moderate', file_id=file.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
2016-08-11 02:24:32 +00:00
|
|
|
{% endif %}
|
2016-08-10 03:48:06 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2016-08-11 02:24:32 +00:00
|
|
|
{% block script %}
|
|
|
|
{{ super() }}
|
|
|
|
<script>
|
2016-08-15 19:04:06 +00:00
|
|
|
{% if popup and file.is_file %}
|
|
|
|
parent.$("#file_id").replaceWith('<div id="file_id" value="{{ file.id }}">{{ file.name }}</div>');
|
|
|
|
parent.$(".ui-dialog-buttonpane button").button("option", "disabled", false);
|
2016-08-11 02:24:32 +00:00
|
|
|
{% endif %}
|
2016-08-15 19:04:06 +00:00
|
|
|
</script>
|
2016-08-11 02:24:32 +00:00
|
|
|
{% endblock %}
|
2016-08-10 03:48:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|