<!DOCTYPE html>
{% load admin_static %}{% load url from future %}{% load i18n grp_tags %}
<html>
  <head>
    <title>New Ball Manager</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="//netdna.bootstrapcdn.com/bootswatch/3.0.0/cosmo/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.min.js"></script>
      <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->

    <style>
      body {
        padding-top: 70px;
      }

      .fixed-body {
        position: fixed;
        padding-top: 1px;
      }
      .breadcrumb > li {
        display: inline;
      }
    </style>
  </head>
  <body>
    <!-- HEADER -->
    {% if not is_popup %}
    <header class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          {% block admin_title %}<a class="navbar-brand" href="/admin">{% if grappelli_admin_title %}{{ grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %}</a>{% endblock %}
        </div>
        {% if user.is_authenticated and user.is_staff %}

        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav pull-right">
            <li class="dropdown" id="accountmenu">
              <a class="dropdown-toggle" data-toggle="dropdown" href="#">{% filter force_escape %}{% firstof user.first_name user.username user.get_short_name user.get_username %}{% endfilter %}<b class="caret"></b></a>
              <ul class="dropdown-menu">
                  {% if user.has_usable_password %}
                      {% url 'admin:password_change' as password_change_url %}
                      {% if password_change_url %}
                          <li><a href="{{ password_change_url }}">
                      {% else %}
                          <li><a href="{{ root_path }}password_change/">
                      {% endif %}
                      {% trans 'Change password' %}</a></li>
                  {% endif %}
                  <!-- Logout -->
                  {% url 'admin:logout' as logout_url %}
                  {% if logout_url %}
                      <li><a href="{{ logout_url }}">
                  {% else %}
                      <li><a href="{{ root_path }}logout/">
                  {% endif %}
                  {% trans 'Log out' %}</a></li>
              </ul>
            </li>
          </ul>
        </div>
        {% endif %}

        <!-- Nav-Global -->
        {% block nav-global %}{% endblock %}
      </div>

      <!-- CONTEXT NAVIGATION -->
      <div class="fixed-body">
        <!-- BREADCRUMBS -->
        {% block breadcrumbs %}
            {% if not is_popup %}
              <ol class="breadcrumb">
                <li><a href="../../">{% trans "Home" %}</a></li>
                <li><a href="../">{% trans app_label|capfirst|escape %}</a></li>
                <li class="active">{{ cl.opts.verbose_name_plural|capfirst }}</li>
              </ol>
            {% endif %}
        {% endblock %}
      </div>
    </header>
    {% endif %}

    <!-- CONTENT -->
    <article class="{% block content-class %}{% endblock %}">
        <!-- MESSAGES -->
        {% block messages %}
            {% if messages %}
                {% for message in messages %}
                <div {% if message.tags %} class="alert alert-dismissable alert-{{ message.tags }}"{% else %}class="alert alert-dismissable "{% endif %}>
                  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                  {{ message }}
                </div>
                {% endfor %}
            {% endif %}
        {% endblock %}

        <div class="container">
          <!-- CONTENT TITLE -->
          <header>
              {% block pretitle %}{% endblock %}
              {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
              {% block object-tools %}{% endblock %}
          </header>

          <!-- CONTENT-CONTAINER -->
            {% block content %}
                {{ content }}
                {% block filters %}{% endblock %}
            {% endblock %}
        </div>

    </article>

    <!-- FOOTER -->
    {% block footer %}{% endblock %}

    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js" type="text/javascript"></script>
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js" type="text/javascript"></script>
  </body>
</html>

