{% load i18n %} {% comment %} One document row of the order panel (order_info.html). Takes `doc` (an IssuedInvoice or None), `label`, and the action offered when there's no successful document: `action` (URL name: issue/credit) with `action_label`, or no action at all. The action links to a confirmation page rather than posting straight away: either one issues an official document reported to the tax authority, which can't be undone. {% endcomment %} {{ label }} {% if doc.status == "success" %} {% trans "Issued" %} {% elif doc.status == "error" %} {% trans "Error" %} {% elif doc %} {% trans "Processing" %} {% else %}—{% endif %} {% if doc.document_id %} {{ doc.display_number }} {% if doc.permanent_url %} · {% blocktrans trimmed with provider=doc.provider_label %} Open at {{ provider }} {% endblocktrans %} {% endif %} {% if doc.email_sent is True %}
{% trans "E-mailed to the buyer" %} {% elif doc.email_sent is False %}
{% trans "Could not be e-mailed to the buyer" %} {% endif %} {% else %}—{% endif %} {% if doc %} {{ doc.modified|date:"SHORT_DATETIME_FORMAT" }} {% blocktrans trimmed count attempts=doc.attempts %} {{ attempts }} attempt {% plural %} {{ attempts }} attempts {% endblocktrans %} {% else %}—{% endif %} {% if doc.status == "success" %} {% trans "Download PDF" %} {% elif doc.in_flight %} {% trans "In progress — reload in a moment" %} {% elif action %} {{ action_label }} {% endif %} {% if doc.status == "error" and doc.error_message %} {{ doc.error_message }} {% if doc.error_items %} {% endif %} {% endif %}