{% extends 'base.html' %}

{% load bootstrap_toolkit %}

{% block content %}

    <div class='hero-unit lesser-hero-unit'>
        <h3>{{ package.filepath }}</h3>
        <dl class='dl-horizontal dl-unwrapped-horizontal'>
            <dt>file name</dt>
            <dd>{{ package.filepath }}</dd>
            <dt>current status</dt>
            <dd>{% include 'packages/_status.html' with status=package.status_name %}</dd>
            <dt>project</dt>
            <dd><a href="{% url 'projects:show' package.project.id %}">{{ package.project }}</a></dd>
            <dt>upload date</dt>
            <dd>{{ package.created_at }}</dd>
            <dt>deployment date</dt>
            <dd>???</dd>
        </dl>
        <dl class='dl-horizontal dl-unwrapped-horizontal'>
            <dt></dt>
            <dd>
                <a href="{% url 'projects:index' %}">Back</a>
                {% if package.can_remove and can_remove %}
                    <a href="{% url 'packages:remove' package.id %}">Remove</a>
                {% endif %}
                {% if package.can_deploy and can_deploy %}
                    <a href="{% url 'packages:deploy' package.id %}">Deploy</a>
                {% endif %}
            </dd>
        </dl>
    </div>
    {% if files %}
        {% include '_filelist.html' with name='package content' files=files uid=package.id %}
    {% endif %}
{% endblock %}
