{% load i18n %}
{% load static %}
{% load translations %}
{% load compress %}

{% if not request.is_ajax %}
<!DOCTYPE html>

<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
 <head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="author" content="Michal Čihař" />
  <meta name="copyright" content="Copyright &copy; 2003 - {{ current_year }} Michal Čihař" />

  <title>{% include "title.html" %}</title>
  <meta name="description" content="{{ description }}" />

{% compress css %}
  <link rel="stylesheet" type="text/css" href="{% static 'bootstrap/css/bootstrap.css' %}" />
{% if LANGUAGE_BIDI %}
  <link rel="stylesheet" type="text/css" href="{% static 'bootstrap/css/bootstrap-rtl.css' %}" />
{% endif %}
  <link rel="stylesheet" type="text/css" href="{% static 'bootstrap/css/bootstrap-theme.css' %}" />
  <link rel="stylesheet" type="text/css" href="{% static 'bootstrap/css/bootstrap-datepicker3.css' %}" />
  <link rel="stylesheet" type="text/css" href="{% static 'font-awesome/css/font-awesome.css' %}" />
  <link rel="stylesheet" type="text/css" href="{% static 'font-linux/font-linux.css' %}" />
  <link rel="stylesheet" type="text/css" href="{% static 'chartist.min.css' %}" />
  <link rel="stylesheet" type="text/css" href="{% static 'multi-select.css' %}" />
  <link rel="stylesheet" type="text/css" href="{% static 'style-bootstrap.css' %}" />
{% endcompress %}
  <script src="{% url 'js-catalog' %}" type="text/javascript"></script>
{% compress js %}
  <script src="{% static 'js/jquery-1.11.3.js' %}" type="text/javascript"></script>
  <script src="{% static 'js/jquery.cookie.js' %}" type="text/javascript"></script>
  <script src="{% static 'js/autosize.js' %}" type="text/javascript"></script>
  <script src="{% static 'js/jquery.sortElements.js' %}" type="text/javascript"></script>
  <script src="{% static 'js/jquery.multi-select.js' %}" type="text/javascript"></script>
  <script src="{% static 'js/mousetrap.js' %}" type="text/javascript"></script>
  <script src="{% static 'js/mousetrap-global-bind.js' %}" type="text/javascript"></script>
  <script src="{% static 'js/chartist.js' %}" type="text/javascript"></script>
  <script src="{% static 'bootstrap/js/bootstrap.js' %}" type="text/javascript"></script>
  <script src="{% static 'loader-bootstrap.js' %}" type="text/javascript"></script>
  <script src="{% static 'bootstrap/js/bootstrap-datepicker.js' %}" type="text/javascript"></script>
{% endcompress %}
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

  <link rel="icon" href="/favicon.ico" type="image/x-icon" />
  <link rel="image_src" type="image/png" href="{% static 'weblate-128.png' %}"/>
  <link rel="apple-touch-icon" href="{% static 'weblate-128.png' %}"/>
  <meta name="robots" content="index, follow" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta property="og:site_name" content="{% if site_title %}{{ site_title }}{% else %}Weblate{% endif %}" />
  <meta property="og:title" content="{% if title %}{{ title }}{% else %}{% if object %}{{ object }}{% else %}{% if page_profile %}{{ page_profile.get_user_name }}{% else %}{% if site_title %}{{ site_title }}{% else %}Weblate{% endif %}{% endif %}{% endif %}{% endif %}" />
  <meta property="og:description" content="{{ description }}" />

{% block extra_meta %}
{% endblock %}

 </head>

 <body {% if LANGUAGE_BIDI %}class="dir-rtl"{% endif %}>
 <header>
<nav class="navbar navbar-default navbar-static-top navbar-inverse" role="navigation">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#wl-navbar-main" id="navbar-toggle">
        <span class="sr-only">{% trans "Toggle navigation" %}</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{% url 'home' %}"><img class="avatar" src="{% static 'weblate-128.png' %}" /> {{ site_title }}</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="wl-navbar-main">
      <ul class="nav navbar-nav">
        <li><a href="{% url 'home' %}">{% trans "Dashboard" %}</a></li>
        {% if subscribed_projects %}
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans "Your subscriptions" %}<b class="caret"></b></a>
          <ul class="dropdown-menu">
            {% for project in subscribed_projects %}
            <li><a href="{{ project.get_absolute_url }}">{{ project }}</a></li>
            {% endfor %}
          </ul>
        </li>
        {% endif %}
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans "Projects" %}<b class="caret"></b></a>
          <ul class="dropdown-menu">
            {% for project in acl_projects %}
            <li><a href="{{ project.get_absolute_url }}">{{ project }}</a></li>
            {% endfor %}
          </ul>
        </li>
        <li><a href="{% documentation 'index' %}">{% trans "Documentation" %}</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right flip">
        {% if user.is_authenticated %}
        <li><a class="button" id="profile-button" href="{% url 'profile' %}" title="{% trans "Your profile" %}">{{ user.profile.get_user_display }}</a></li>
        {% if user.is_staff %}
        <li><a class="button" id="admin-button" href="{% url 'admin:index' %}" title="{% trans "Administration" %}"><i class="fa fa-wrench"></i></a></li>
        {% endif %}
        <li><a class="button" id="logout-button" href="{% url 'logout' %}" title="{% trans "Logout" %}"><i class="fa fa-sign-out"></i></a></li>
        {% else %}
        {% if registration_open %}
        <li><a class="button" id="register-button" href="{% url 'register' %}">{% trans "Register" %}</a></li>
        {% endif %}
        <li><a class="button" id="login-button" href="{% url 'login' %}{% if not skip_next %}?next={{ login_redirect_url }}{% endif %}">{% trans "Login" %}</a></li>
        {% endif %}
      </ul>
    </div>
  </div>
</nav>
<h1>
<ol class="breadcrumb">
{% block breadcrumbs %}
<li><a href="{% url 'home' %}">{% trans "Dashboard" %}</a></li>
{% endblock %}
</ol>
</h1>
</header>

<div class="content">
<!--[if lte IE 8]>
{% show_message "error" _('Weblate does not support Microsoft Internet Explorer 8 and older, please use some more recent browser like <a href="https://www.mozilla.org/firefox/">Firefox</a>.') %}
<![endif]-->
{% if messages %}
{% for message in messages %}
{% show_message message.tags message %}
{% endfor %}
{% endif %}

{% endif %}

{% block content %}
{% endblock %}

{% if not request.is_ajax %}
</div>
{% include 'footer.html' %}
 </body>
</html>
{% endif %}
