{% load i18n %}

<div class="panel panel-default">
    <div class="panel-heading">{% trans 'Submit' %}</div>
    <div class="panel-body">
    <table class="table-condensed">
        <tr>
            <th>{% trans 'Task' %}:</th>
            <td>{{ submit.receiver.task.name }}</td>
        </tr>
        <tr>
            <th>{% trans 'Submit ID' %}:</th>
            <td>{{ submit.id }}</td>
        </tr>
        <tr>
            <th>{% trans 'User' %}:</th>
            <td>{{ submit.user }}</td>
        </tr>
        <tr>
            <th>{% trans 'Time' %}:</th>
            <td>{{ submit.time }}</td>
        </tr>
        <tr>
            <th>{% trans 'Accepted' %}:</th>
            <td>{{ submit.get_is_accepted_display }}</td>
        </tr>
        {% if submit.file_exists %}
            <tr>
                <th>{% trans 'Submitted file' %}:</th>
                <td>{{ submit.filename }}</td>
            </tr>
            <tr>
                <th></th>
                <td>
                    {% if submit.receiver.show_submitted_file %}
                        <a class="btn btn-primary" data-toggle="collapse" href="#collapse-submitted-file">{% trans 'Show' %}</a>
                    {% endif %}
                     <a class="btn btn-primary" href="{% url 'download_submit' submit.id %}">{% trans 'Download' %}</a>
                </td>
            </tr>
        {% endif %}
    </table>
    </div>
</div>