{% extends 'core/lcars_app.html' %} {% load static %} {% block header_title %}Diagnostic Expressions{% endblock header_title %} {% block app_title %}Diagnostic Expressions{% endblock app_title %} {% block extra_head %} {% endblock extra_head %} {% block left_menu %} {% comment %} Both buttons drive the table's form from outside it, via `form`, and `formaction` sends each to its own view -- so one set of checkboxes answers for both without a line of JavaScript. {% endcomment %}
{% csrf_token %} {% comment %} No option to set beforehand: a file naming something already stored is asked about when it happens, which is the only time the answer means anything. {% endcomment %}
{{ block.super }} {% endblock left_menu %} {% block main %}
{% csrf_token %} {% comment %} Empty when creating; the name of the row being replaced when editing, which is also what makes a rename an edit rather than a second expression. {% endcomment %}
Name Expression Description {% if edit_name %}Editing {{ edit_name }}{% endif %}
{{ form.name }} {{ form.name.errors }} {{ form.expression }} {{ form.expression.errors }} {{ form.description }} {{ form.description.errors }} {% comment %} Plain navigation back to the blank form, which is also how an edit is abandoned. {% endcomment %} Clear
{% csrf_token %} {% for row in expression_rows %} {% empty %} {% endfor %}
Name Expression Description Built from Status
{{ row.name }} {{ row.expression }} {{ row.description }} {{ row.depends_on|join:", " }} {% for problem in row.problems %}
{{ problem }}
{% empty %} {% if row.missing %}
Not recorded in this project: {{ row.missing|join:", " }}
{% else %} OK {% endif %} {% endfor %}
No expressions yet. Define one above, or import a file.
{% if not have_project %}

No project is open, so nothing is said about which expressions have the data to be drawn. They are valid regardless: an expression means the same thing in every project.

{% endif %}
{# One delegated listener on document, no init call, so load order is free. #} {% endblock main %}