{% extends "blogango/admin/base.html" %}
{% load i18n %}
{% block title %}{{ _("Dashboard") }}{% endblock %}
{% block contents %}
  <div class="dashboard">
    <h1>{{ _("Dashboard") }}</h1>
    <div class="panel">
      <div class="text">
        <p>
          Howdy. Welcome to the administration interface, {{ request.user.username }}.
          You have written <strong>{{ request.user.blogentry_set.count }}</strong> post{{ request.user.blogentry_set.count|pluralize }} so far.
      </div>
      <h2>{{ _('Quickstart') }}</h2>
      <ul>
        <li><a href="{% url blogango_admin_entry_new %}">{{ _("New Entry") }}</a>
        <li><a href="{% url blogango_admin_comments_manage %}">{{ _("Moderate Comments") }}</a>
        <li><a href="{% url blogango_admin_entry_manage %}">{{ _("Manage Entries") }}</a>
        <li><a href="{% url blogango_admin_edit_preferences %}">{{ _("Configure blogango") }}</a>
      </ul>
    </div>
    <div class="links">
      {% if recent_drafts %}
      <h2>{{ _("Drafts") }}</h2>
      <ul class="drafts">
      {% for draft in recent_drafts %}
        <li>
            <a href="{{ draft.get_edit_url }}">{{ draft.title }}</a>
            <span class="meta">[<a href="{{ draft.get_absolute_url }}?preview">{{ _('show') }}</a>]</span>,
            {{ draft.created_on }}
        </li>
      {% endfor %}
      </ul>
      {% endif %}
      {% if recent_entries %}
      <h2>{{ _("Recent Posts") }}</h2>
      <ul class="last_posts">
      {% for post in recent_entries %}
        <li>
            <a href="{{ post.get_edit_url }}">{{ post.title }}</a>
            <span class="meta">[<a href="{{ post.get_absolute_url }}">{{ _('show') }}</a>]</span>,
          {{ post.created_on }}
      {% endfor %}
      </ul>
      {% endif %}
    </div>
    <div class="clear"></div>
  </div>
{% endblock %}
