{% extends "documents/base_documents.html" %} {% load i18n %} {% block content %}

{% blocktranslate %}Sharing – {{ folder.name }}{% endblocktranslate %}

{% translate "Manage who can access this folder." %}

{% translate "Back to folder" %}
{% if breadcrumbs %} {% endif %}
{% translate "Share with users" %}
{% csrf_token %}
{{ share_form.user }} {% if share_form.user.errors %}
{{ share_form.user.errors|join:', ' }}
{% endif %}
{{ share_form.permission }} {% if share_form.permission.errors %}
{{ share_form.permission.errors|join:', ' }}
{% endif %}

{% translate "Existing shares" %}
{% if shares %}
    {% for share in shares %}
  • {{ share.user.get_full_name|default:share.user.username }} – {{ share.get_permission_display }}
    {% csrf_token %}
  • {% endfor %}
{% else %}

{% translate "No users have access." %}

{% endif %}
{% translate "Shareable links" %}
{% csrf_token %}
{{ access_link_form.permission }} {% if access_link_form.permission.errors %}
{{ access_link_form.permission.errors|join:', ' }}
{% endif %}
{{ access_link_form.expires_at }} {% if access_link_form.expires_at.errors %}
{{ access_link_form.expires_at.errors|join:', ' }}
{% endif %}

{% translate "Active links" %}
{% if access_links %}
{% for link in access_links %}
{{ link.get_permission_display }}
{% translate "Created on" %} {{ link.created_at|date:"SHORT_DATETIME_FORMAT" }} {% if link.expires_at %}
{% translate "Expires" %} {{ link.expires_at|date:"SHORT_DATETIME_FORMAT" }}
{% endif %}
{% url 'documents:folder_public' link.token as public_url %} {{ request.scheme }}://{{ request.get_host }}{{ public_url }}
{% csrf_token %}
{% endfor %}
{% else %}

{% translate "No active links." %}

{% endif %}
{% endblock %}