{% extends "main/base.html" %}
{% load main_extras history_extras statement_extras %}
{% load i18n %}
{% block title %}
  {{ account }} – {{ block.super }}
{% endblock title %}
{% block link %}
  {{ block.super }}
  {% css "main/css/table.css" %}
  {% css "main/css/plot.css" %}
{% endblock link %}
{% block body %}
  <h2>{{ account.icon|remix }}{{ account }}</h2>
  <p>
    <a href="{% url "edit_account" account.pk %}">{{ "edit"|remix }}{% translate "Edit account" %}</a>
  </p>
  <section>
    <h3>{% translate "Statements" %}</h3>
    {% url "new_statement" account=account.pk as ns_url %}
    {% url "account_statements" account=account.pk as s_url %}
    {% statement_table account.statement_set.all statements_url=s_url new_statement_url=ns_url n_max=6 %}
  </section>
  <section>
    <h3>{% translate "History" %}</h3>
    {% history_plot account.transactions account=account %}
  </section>
{% endblock body %}
