{% block content %}


<h2>{{ _('Testcase Metadata') }}</h2>
{% include "squad/_metadata.jinja2" %}

<h2>{{ _('Related downloads') }}</h2>

{% if test_run.log_file|length > 0 %}
<a href="../log" class='btn btn-default'>
    <i class='fa fa-file-text-o'></i>
    {{ _('Log file') }}
</a>
{% endif %}

{% if test_run.tests_file|length > 0 %}
<a href="../tests" class='btn btn-default'>
    <i class='fa fa-file-code-o'></i>
    {{ _('Tests file') }}
</a>
{% endif %}

{% if test_run.metrics_file|length > 0 %}
<a href="../metrics" class='btn btn-default'>
    <i class='fa fa-file-code-o'></i>
    {{ _('Metrics file') }}
</a>
{% endif %}

{% if test_run.metadata_file|length > 0 %}
<a href="../metadata" class='btn btn-default'>
    <i class='fa fa-file-code-o'></i>
    {{ _('Metadata file') }}
</a>
{% endif %}

{% if attachments|length > 0 %}
{% for file, file_type, length in attachments %}
<a href="../attachments/{{file}}" class='btn btn-default'>
    {% if file_type %}
    <i class='fa fa-file-{{file_type}}-o'></i>
    {% else %}
    <i class='fa fa-file-o'></i>
    {% endif %}
    {{file}}
    ({{length|filesizeformat}})
</a>
{% endfor %}
{% endif %}
{% endblock %}
