{% extends "squad/base.jinja2" %}
{% block content %}

<h2 class="page-header well">
    <a class="h2 text-primitive" href="{{group_url(project.group)}}">{{project.group.display_name}}</a>
    » <a class="h2 text-primitive" href="{{project_url(project)}}">{{project.display_name}}</a>
    » <a class="h2 text-primitive" href="{{build_url(build)}}"> {{build.version}}</a>
    » <a class="h2 text-primitive" href="{{project_url(test_run)}}">{{test_run.job_id}}</a>
    » <a class="h2 text-primary" href="{{project_url(test_run)}}">{{suite}}</a>
    <br>

    <small>
      <i class='fa fa-microchip'></i>
      {{ (_('Test environment: <strong>%s</strong>') % test_run.environment) | safe }}
      {% if test_run.environment.description %}
      <a href='#' onclick="$('#environment-description').toggle(); return false" class='btn btn-xs btn-info'><span class='fa fa-info'></span></a>
      {% endif %}
      {% if test_run.environment.description %}
      <div class='alert alert-info' id='environment-description' style='display: none'>
	{{test_run.environment.description|markdown}}
      </div>
      {% endif %}
      <br>
      <i class='fa fa-list'></i>
      {{ (_('Suite: <strong>%s</strong>') % suite) | safe }}
      {% if status.suite_version %}
      {{status.suite_version.version}}
      {% endif %}
      {% if suite.metadata.description %}
      <a href='#' onclick="$('#tests-{{suite.slug}}-description').toggle(); return false" class='btn btn-xs btn-info'><span class='fa fa-info'></span></a>
      {% endif %}
      
      {% if suite.metadata.description %}
      <div class='alert alert-info' id='tests-{{suite.slug}}-description' style='display: none'>
	{{suite.metadata.description|markdown}}
      </div>
      {% endif %}
    </small> 
      <a name="tests"></a>
</h2>

<h2>
    {{ _('Test results') }}
</h2>

{% with items=tests %}
  {% include "squad/_pagination.jinja2" %}
{% endwith %}

{% for test in tests %}
  {% with suite=status.suite %}
    {% include "squad/_test_run_test.jinja2" %}
  {% endwith %}
{% endfor %}

{% with items=tests %}
  {% include "squad/_pagination.jinja2" %}
{% endwith %}

{% endblock %}
