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

{% block content %}
<h1>{{ _('Compare project') }}s</h1>

{% if comparison %}
  {% with items=comparison.results %}
    {% include "squad/_pagination.jinja2" %}
  {% endwith %}

  {% include "squad/_results_table.jinja2" %}

  {% with items=comparison.results %}
    {% include "squad/_pagination.jinja2" %}
  {% endwith %}
{% endif %}

<h2>{{ _('Select projects to compare') }}</h2>
<form>
  {% for project in projects %}
  <div class="checkbox">
    <label>
      <input type='checkbox' name='project' value='{{project}}'
       {% if project in selected %}
       checked
       {% endif %}
       />
      {{project}}
    </label>
  </div>
  {% endfor %}
  <div class="form-group">
    <label>{{ _('Comparison type') }}</label>
    <div>
      <input id="test-comparison" name="comparison_type" type="radio" value="test" checked="checked"/>
      <label for="test-comparison">{{ _('compare by tests') }}</label>
      <br />
	  <input id="metric-comparison" name="comparison_type" type="radio" value="metric" />
      <label for="metric-comparison">{{ _('compare by metrics') }}</label>
    </div>
  </div>
  <input type='submit' value='{{ _('Compare') }}' class='btn btn-default'/>
</form>
{% endblock %}
{% block javascript %}
<script type="text/javascript" src='{{static("squad/table.js")}}'></script>
{% endblock %}
