<!DOCTYPE html>{% load static i18n breadcrumbs %}{% load url from future %}
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>{% block title %}Python Package Repository{% endblock %}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">

    <link href="{% static 'bootstrap/css/bootstrap.spacelab.min.css' %}" rel="stylesheet">
    <link href="{% static 'bootstrap.application.css' %}" rel="stylesheet">
    <link href="{% static 'bootstrap/css/bootstrap-responsive.min.css' %}" rel="stylesheet">

    {% block extra_style %}{% endblock %}

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"></script>
</head>

<body>

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">

            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>

{#            <img id="logo" src="{% static 'img/logo.png' %}" alt="" class="pull-left">#}
            <a class="brand" href="/">PYPPI</a>

            <div class="nav-collapse collapse">
                <ul class="nav">
                    <!-- Home -->
                    <li class="{% if current_first_level == 'home' %}active{% endif %}">
                        <a href="/">Home</a></li>

                    <!-- Packages -->
                    <li class="{% if current_first_level == 'packages' %}active{% endif %}">
                        <a href="{% url 'pyppi-package-list' %}">Packages</a></li>

                    <!-- Releases -->
                    <li class="{% if current_first_level == 'pypi' %}active{% endif %}">
                        <a href="{% url 'pyppi-release-list' %}">
                            Releases</a></li>

                    <!-- RSS -->
                    <li><a href="{% url 'pyppi-rss' %}">RSS</a></li>

                    <!-- Admin -->
                    {% if user.is_authenticated %}
                        {% if user.is_staff %}
                            <li><a href="{% url 'admin:index' %}">Admin</a></li>
                        {% endif %}
                        <li><a href="{% url 'django.contrib.auth.views.logout' %}?next=/">Logout</a></li>
                    {% else %}
                        <li class="{% if current_first_level == 'login' %}active{% endif %}">
                            <a href="{% url 'django.contrib.auth.views.login' %}">Login</a></li>
                    {% endif %}
                </ul>

                <form action="{% url 'haystack_search' %}" method="get" class="navbar-search pull-right">
                    <!--suppress HtmlFormInputWithoutLabel -->
                    <input class="search-query span2" type="text" placeholder="Search..." name="q"
                           value="{{ request.GET.q }}">
                </form>
            </div>
            <!--/.nav-collapse -->

        </div>
    </div>
</div>

<div class="container">
    {% block breadcrumbs_container %}
        {% block breadcrumbs %}
            {% breadcrumb 'Home' 'pyppi-home' %}
        {% endblock breadcrumbs %}
        {% render_breadcrumbs %}
    {% endblock %}

    {% block page_title %}{% endblock %}

    {% block messagelist %}
        {% if messages %}
            <ul class="messagelist">
                {% for message in messages %}
                    <li>{{ message }}</li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endblock %}

    {% block content %}{{ content }}{% endblock %}

    <hr>

    <footer>
        {% block footer %}
            <p class="pull-right">&copy; pyppi 2012</p>
        {% endblock %}
    </footer>

</div>
<!-- /container -->

<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>

</body>
</html>
