{% extends "rest_framework/base.html" %}
{% load static %}
{% load squad %}
{% load i18n %}

{% block title %}{% squad_site_name %} {{ _('API') }}{% endblock %}

{% block bootstrap_theme %}
    <link rel="stylesheet" href="{% static "bootstrap/css/bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "bootstrap/css/bootstrap-theme.css" %}">
    <link rel="stylesheet" href="{% static "font-awesome/css/font-awesome.css" %}">
    <link rel="stylesheet" href="{% static "main.css" %}">
{% endblock %}
{% block bootstrap_navbar_variant %}navbar-default{% endblock %}

{% block branding %}
<a class='navbar-brand' rel="nofollow" href='{% url "home" %}'>
    <img style="height: 27px;" src="{% static 'squad_sign.svg' %}" alt='{% squad_site_name %}'>
</a>
<ul class="nav navbar-nav">
    <li class="{% active 'home'%}"><a href="{% url 'home' %}">{{ _('Groups') }}</a></li>
    <li class="dropdown">
      <a class="dropdown-toggle" href="#" id="compareDropdown" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        {{ _('Compare') }}
        <span class="caret"></span>
      </a>
      <ul class="dropdown-menu" aria-labelledby="compareDropdown">
        <li>
            <a class="dropdown-item" href="{% url 'compare_builds' %}">{{ _('Compare Builds') }}</a>
        </li>
        <li role="separator" class="divider"></li>
        <li>
            <a class="dropdown-item" href="{% url 'compare_projects' %}">{{ _('Compare Projects') }}</a>
        </li>
        <li role="separator" class="divider"></li>
        <li>
            <a class="dropdown-item "href="{% url 'compare_test' %}">{{ _('Compare Test') }}</a>
        </li>
      </ul>
    </li>
    <li class="{% active 'api-root' %}"><a href="{% url 'api-root' %}">{{ _('API') }}</a></li>
</ul>
{% endblock %}

{% block userlinks %}
    {% include "squad/_user_menu.html" %}
{% endblock %}


{% block body %}
    {{block.super}}
    <footer id='footer'>
      <div class="container">
        {# long lines needed so that translated strings do not have line breaks #}
        {% squad_version as squadversion %}
        {% blocktrans %}<a href="http://squad.readthedocs.io/">SQUAD</a> version {{ squadversion }}.{% endblocktrans %}
        {% blocktrans %}SQUAD is free software, distributed under the terms of <a href="https://www.gnu.org/licenses/agpl-3.0.html">GNU Affero General Public License, version 3</a> or (at your option) any later version.{% endblocktrans %}
        {% blocktrans %}<a href="https://github.com/Linaro/squad">Source code</a> and <a href="https://github.com/Linaro/squad/issues">Issue tracker</a> are available on Github.{% endblocktrans %}
      </div>
    </footer>
    </div><!-- id="wrapper" -->
{% endblock %}
