{% if ledger.errors %}
<table is="sortable-table" class="errors">
  <thead>
    <tr>
      <th data-sort="string" data-order="asc">{{ _('File') }}</th>
      <th data-sort="num">{{ _('Line') }}</th>
      <th data-sort="string">{{ _('Error') }}</th>
    </tr>
  </thead>
  <tbody>
    {% for error in ledger.errors %}
    <tr>
      {% with link=url_for_source(file_path=error.source['filename'], line=error.source['lineno']) %}
      <td><a class="source" href="{{ link }}" title="{{ _('Show source %(file)s:%(lineno)s', file=error.source['filename'], lineno=error.source['lineno']) }}">{{ error.source['filename'] }}</a></td>
      <td class="num"><a class="source" href="{{ link }}" title="{{ _('Show source %(file)s:%(lineno)s', file=error.source['filename'], lineno=error.source['lineno']) }}">{{ error.source['lineno'] }}</a></td>
      <td class="pre">{{ error.message|format_errormsg|safe }}</td>
      {% endwith %}
    </tr>
    {% endfor %}
  </tbody>
</table>
{% else %}
<p>
{{ _('No errors.') }}
</p>
{% endif %}
