{% load i18n %}
{% load url from future %}
{% if not request.is_ajax %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="author" content="Michal Čihař" />
  <meta name="copyright" content="Copyright &copy; 2003 - {{ current_year }} Michal Čihař" />

  <title>{% include "title.html" %}</title>
{% if description %}
  <meta name="description" content="{{ description }}" />
{% endif %}
  
  <link rel="stylesheet" type="text/css" href="/media/css/style.css" />
  <link rel="stylesheet" type="text/css" href="/media/css/custom-theme/jquery-ui-1.8.18.custom.css" />
  <script src="/media/js/jquery-1.7.1.min.js" type="text/javascript"></script>
  <script src="/media/js/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
  <script src="/media/js/jquery.autogrow-textarea.js" type="text/javascript"></script>
  <script src="/media/js/jquery.sortElements.js" type="text/javascript"></script>
  <script src="/media/js/jquery.cookie.js" type="text/javascript"></script>
  <script src="/media/js/loader.js" type="text/javascript"></script>
  <script src="{% url 'django.views.i18n.javascript_catalog' %}" type="text/javascript"></script>
  <script src="{% url 'weblate.trans.views.js_config' %}" type="text/javascript"></script>
{% if target_language %}
  <script type="text/javascript">
  var target_language = '{{ target_language }}';
  </script>
{% endif %}
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

  <link rel="icon" href="/favicon.ico" type="image/x-icon" />
  <meta name="robots" content="index, follow" />
  
 </head>

 <body>
    <h1 class="ui-state-default"><a href="/">{% include "title.html" %}</a></h1>

<ul class="menu">
{% if user.is_authenticated %}
<li><a href="/accounts/profile/">{% blocktrans with user.get_full_name as name %}Logged in as {{ name }}{% endblocktrans %}</a></li>
<li><a href="/accounts/logout/">{% trans "Logout" %}</a></li>
{% else %}
<li><a href="/accounts/register/">{% trans "Register" %}</a></li>
<li><a href="/accounts/login/?next={{ current_url }}">{% trans "Login" %}</a></li>
{% endif %}
</ul>

<ul class="breadcrumbs">
<li><a href="/">{% trans "Home" %}</a></li>
{% block breadcrumbs %}
{% endblock %}
</ul>

<div class="content">
{% if messages %}
{% for message in messages %}
<div class="ui-widget">
    <div style="padding: 0pt 0.7em;" class="ui-state-{% if message.tags == "error" %}error{% else %}highlight{% endif %} ui-corner-all"> 
        <p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-{% if message.tags == "error" or message.tags == "warning" %}alert{% else %}info{% endif %}"></span>
            {{ message }}
        </p>
    </div>
</div>
{% endfor %}
{% endif %}

{% endif %}

{% block content %}
{% endblock %}

{% if not request.is_ajax %}
</div>
 <ul class="footer">
  <li>{% blocktrans %}Powered by <a href="http://weblate.org">Weblate {{ version }}</a>{% endblocktrans %}</li>
  <li><a href="{% url 'weblate.trans.views.about' %}">{% blocktrans %}About Weblate{% endblocktrans %}</a></li>
  <li><a href="{% url 'weblate.accounts.views.contact' %}">{% trans "Contact us" %}</a></li>
  <li><a href="http://weblate.readthedocs.org/en/weblate-{{ version }}/usage.html">{% trans "Documentation" %}</a></li>
 </ul>
 </body>
</html>
{% endif %}
