{% load blogango_filters %}
{% blogango_extra_context %}

<!doctype html>
<html>
<head>
  {% block html_head %}

  <title>{% block title %}{% endblock %} &mdash; {{ blog.title }} {{ _("Administration") }}</title>

  <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}blogango/admin/preview.css">
  <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}blogango/admin/style.css">
  <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}blogango/css/jquery.autocomplete.css">

  <script type="text/javascript" src="{{ STATIC_URL }}blogango/js/jquery.min.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}blogango/js/jquery.autocomplete.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}blogango/js/jquery.textarearesizer.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}blogango/js/Admin.js"></script>
  {% endblock %}
  {% block page_head %}{% endblock %}
  {% block extra_script %}{% endblock %}
</head>
<body>
  <div class="header">
    <div class="title">{{ blog.title }} Administration</div>
    <div class="metanav">
      <a href="{% url "blogango_index" %}">{{ _("View Blog") }}</a> |
      <a href="{% url "admin:logout" %}">{{ _("Logout") }}</a>
    </div>
  </div>
  <div class="body">
    <ul class="navbar standalonebar">
      {% url "blogango_admin_dashboard" as dashboard_url %}
      <li {% if request.path == dashboard_url %}class="active"{% endif %}>
          <a href="{{ dashboard_url }}">{{ _("Dashboard") }}</a>
      </li>
      {% url "blogango_admin_entry_new" as write_url %}
      <li {% if request.path == write_url %}class="active"{% endif %}>
          <a href="{{ write_url }}">{{ _("Write") }}</a>
      </li>
      {% url "blogango_admin_entry_manage" as manage_entry_url %}
      {% if author %}
          {% url "blogango_admin_author_entry_manage" author.username as manage_author_entry_url %}
      {% endif %}
      <li {% if request.path == manage_entry_url or request.path == manage_author_entry_url %}class="active"{% endif %}>
          <a href="{{ manage_entry_url }}">{{ _("Manage") }}</a>
      </li>
      {% url "blogango_admin_comments_manage" as manage_comments_url %}
      {% if blog_entry %}
          {% url "blogango_admin_entry_comments_manage" blog_entry.pk as manage_entry_comments_url %}
      {% endif %}
      <li {% if request.path == manage_comments_url or request.path == manage_entry_comments_url %}class="active"{% endif %}>
          <a href="{{ manage_comments_url }}">{{ _("Comments") }}</a>
      </li>
      {% url "blogango_admin_edit_preferences" as edit_preferences_url %}
      <li {% if request.path == edit_preferences_url %}class="active"{% endif %}>
          <a href="{{ edit_preferences_url }}">{{ _("Options") }}</a>
      </li>
    </ul>
    {% block subnavbar %}{% endblock %}
    <div class="contents">
      {% block contents %}{% endblock %}
    </div>
  </div>
  <div class="footer">
    <p>
        <a href="http://{{ site.domain }}/">{{ site.name }}</a>
        Powered by blogango | &copy; 2010 by {{ site.name }}
    </p>
  </div>
</body>
</html>
