{% extends 'projectroles/project_base.html' %}

{% load rules %}
{% load projectroles_common_tags %}

{% block title %}
  Public Link for File "{{ file.name }}"
{% endblock title %}

{% block projectroles_extend %}

<div class="container-fluid sodar-subtitle-container">
  <h3>Public Link to File "{{ file.name }}"</h3>
</div>

<div class="container-fluid sodar-page-container">
  <p>
    Use the URL below to provide a publicly available download link to the
    file "{{ file.name }}" in {% get_display_name 'PROJECT' %}
    {{ file.project.title }}.
  </p>
  <div class="alert alert-warning" role="alert">
    <strong>Warning:</strong> Anyone with this URL can access the file,
      including users without permissions in the {% get_display_name 'PROJECT' %}.
  </div>
  <dl class="row">
    <dt class="col-2">Link</dt>
    <dd class="col-10"><a href="{{ public_url }}">{{ public_url }}</a></dd>
  </dl>
  <div class="btn-group pull-right">
    <a role="button" class="btn btn-secondary"
       href="{{ request.session.real_referer }}">
      <i class="iconify" data-icon="mdi:arrow-left-circle"></i> Back
    </a>
  </div>
</div>

{% endblock projectroles_extend %}
