{% extends "main/base.html" %}
{% load static %}
{% load main_extras account_extras history_extras statement_extras %}
{% load i18n %}
{% block link %}
  {{ block.super }}
  {% css "main/css/table.css" %}
  {% css "main/css/plot.css" %}
{% endblock link %}
{% block body %}
  <div class="split">
    <section>
      <h2>{% translate "Accounts" %}</h2>
      {% account_table user.account_set.all index=True %}
    </section>
    <section>
      <h2>{% translate "Statements" %}</h2>
      {% url "statements" as s_url %}
      {% statement_table statements statements_url=s_url %}
    </section>
  </div>
  <section>
    <h2>{% translate "Categories" %}</h2>
    {% spaceless %}
      <p>
        {% for cat in user.category_set.all %}
          <a class="category" href="{{ cat.get_absolute_url }}">{{ cat.icon|remix }}{{ cat }}</a>
        {% endfor %}
        <a class="category add" href="{% url "new_category" %}">{{ "add"|remix }}{% translate "Create category" %}</a>
      </p>
    {% endspaceless %}
  </section>
  <section>
    <h2>{% translate "History" %}</h2>
    {% history_plot user.transaction_set.all %}
  </section>
{% endblock body %}
