{% extends "./error-base.html" %}

{% comment %}
Copyright (C) 2024  The Software Heritage developers
See the AUTHORS file at the top-level directory of this distribution
License: GNU Affero General Public License version 3, or any later version
See top-level LICENSE file for more information
{% endcomment %}

{% block error-description %}
  <div class="container text-start">
    <p>Some requested objects are currently under restricted access:</p>
    <ul>
      {% for swhid, statuses in masked.items %}
        <li>
          <code>{{ swhid }}</code>
          {% if statuses %}
            due to the request{{ statuses|length|pluralize }}:
            <ul>
              {% for status in statuses %}
                <li>
                  <code>{{ status.request }}</code>
                  {% if status.state.name == "RESTRICTED" %}
                    (permanent restriction)
                  {% else %}
                    (temporary restriction)
                  {% endif %}
                </li>
              {% endfor -%}
            </ul>
          {% endif %}
        </li>
      {% empty %}
        <li>Object list unavailable. Sorry.</li>
      {% endfor %}
    </ul>
  </div>
{% endblock error-description %}
