{% set events = ledger.events() %}
{% if events %}
{{ charts.events() }}
{% for group in events|groupby('type') %}
<div class="left">
  {{ charts.events(group.grouper) }}
  <h3>{{ _('Event') + ': ' + group.grouper }}</h3>
  <table is="sortable-table">
    <thead>
      <tr>
        <th data-sort="string" data-order="asc">{{ _('Date') }}</th>
        <th data-sort="string">{{ _('Description') }}</th>
      </tr>
    </thead>
    <tbody>
      {% for event in group.list %}
      <tr>
        <td><a href="#context-{{ event|hash_entry }}">{{ event.date }}</a></td>
        <td>{{ event.description }}</td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>
{% endfor %}
{% else %}
<p>
{{ _('No events.') }}
</p>
{% endif %}
