list.html 1.8 KB

12345678910111213141516171819
  1. {% if document_detail %}
  2. <div class="tabs history-tabs" role="group" aria-label="Dokumente filtern">
  3. {% for value,label in [('invoice','Diese Rechnung'),('open','Alle offenen Rechnungen'),('vehicle','Dieses Fahrzeug'),('debtor','Debitor Historie')] %}
  4. <button type="button" class="tab history-tab{% if document_scope == value %} active{% endif %}" data-document-scope="{{ value }}" aria-pressed="{{ 'true' if document_scope == value else 'false' }}" {% if (value in ['open','debtor'] and customer_missing) or (value == 'vehicle' and vehicle_missing) %}disabled{% endif %}>{{ label }}</button>
  5. {% endfor %}
  6. </div>
  7. {% endif %}
  8. {% for error in document_errors %}<p role="status">{{ error }}</p>{% endfor %}
  9. <div class="gc-table-scroll" tabindex="0" role="region" aria-label="Dokumentliste">
  10. <table class="table table-striped table-bordered gc-document-table"><thead><tr>
  11. {% for title in ['Belegnummer','Beleg-Datum','Dok.-/ Belegtyp','Bearbeitet von:','Dateiname','Quelle','Weiterleiten'] %}<th>{{ title }}</th>{% endfor %}
  12. </tr></thead><tbody>
  13. {% for doc in documents %}
  14. <tr><td>{{ doc.number }}</td><td>{{ doc.date }}</td><td>{{ doc.kind }}</td><td>{{ doc.editor }}</td>
  15. <td><a href="{{ document_base }}/content/{{ doc.token }}?scope={{ document_scope }}" hx-boost="false" {% if doc.pdf %}data-document-preview{% endif %}>{{ doc.name }}</a></td><td>{{ doc.source }}</td>
  16. <td><button type="button" class="btn btn-outline-secondary" data-document-recipients="{{ document_base }}/recipients/{{ doc.token }}?scope={{ document_scope }}"><i class="icon cil-envelope-closed" aria-hidden="true"></i> Weiterleiten</button></td></tr>
  17. {% else %}<tr><td colspan="7">Keine Dateien vorhanden.</td></tr>{% endfor %}
  18. </tbody></table></div>
  19. <div data-document-mail role="region" aria-label="Weiterleiten"></div>