{% extends "base.html" %}

{% block page_title %}{{space}} Information{% endblock %}

{% block content %}

<div class='space'>
  <dl>
    <dt>Access Protocol</dt> <dd>{{ space.get_access_protocol_display }}</dd>
    <dt>Path</dt> <dd>{{ space.path|default:"&lt;None&gt;" }}</dd>
    <dt>Staging Path</dt> <dd>{{ space.staging_path}}</dd>
    <dt>Usage</dt> <dd>{{ space.used|filesizeformat }} / {{ space.size|filesizeformat }}</dd>
    <dt>Last Verified</dt> <dd>{{ space.last_verified }}</dd>
    {% for k, v in space.child.items %}
        <dt>{{ k|capfirst }}</dt> <dd>{{ v }}</dd>
    {% endfor %}
    <dt>Actions</dt>
    <dd>
      <ul>
        <li><a href="{% url 'location_create' space.uuid %}">Create Location here</a></li>
        <li><a href="{% url 'space_edit' space.uuid %}">Edit Space</a></li>
        <li><a href="{% url 'space_delete' space.uuid %}">Delete Space</a></li>
      </ul>
    </dd>
  </dl>
</div>

<h2>Locations</h2>
<p><a href="{%url 'location_create' space.uuid %}">Create new location here</a></p>

{% if locations %}
  {% include "snippets/locations_table.html" with no_space=True %}
{% else %}
  <p>No locations in this space.</p>
{% endif %}

{% endblock %}
