{% extends "base.html" %}
{% load djblets_deco %}
{% load i18n %}
{% load reviewtags %}
{% block title %}{% trans "My Dashboard" %}{% endblock %}

{% block extrahead %}
<meta http-equiv="refresh" content="300" />
{% endblock %}

{% block css %}
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/dashboard.css?{{MEDIA_SERIAL}}" />
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}djblets/css/datagrid.css?{{MEDIA_SERIAL}}" />
{% endblock %}

{% block scripts-post %}
<script type="text/javascript" src="{{MEDIA_URL}}djblets/js/datagrid.js?{{MEDIA_SERIAL}}"></script>
{% endblock %}

{% block content %}
{% box "dashboard" %}
<div id="dashboard-wrapper">
 <table class="datagrid" id="dashboard-navbar">
  <colgroup>
   <col class="summary" />
   <col class="count" />
  </colgroup>
  <tbody>
{% dashboard_entry "main-item" "Starred Reviews"  "starred" %}
{% dashboard_entry "main-item" "Outgoing Reviews" "outgoing" %}
{% dashboard_entry "main-item" "Incoming Reviews" "incoming" %}
{% dashboard_entry "sub-item"  "To Me"            "to-me" %}
{% for name, value in datagrid.counts.groups.items %}
{%  dashboard_entry "sub-item" name "to-group" name %}
{% endfor %}
{% if datagrid.counts.starred_groups %}
{%  dashboard_entry "main-item" "Watched Groups" "watched-groups" %}
{%  for name, value in datagrid.counts.starred_groups.items %}
{%   dashboard_entry "sub-item" name "to-group" name %}
{%  endfor %}
{% endif %}
{% dashboard_entry "main-item" "All My Requests" "mine" %}
  </tbody>
 </table>
 <div id="dashboard-main" class="clearfix">
{{datagrid.render_listview}}
 </div>
</div>
{% endbox %}
{% endblock %}
