{% load i18n %} {% load fitcheck_extras %} {% comment %} Status icon is driven by the finding code, NOT by reading the message text. Pass codes are explicit so a future addition (e.g. another refit variant) won't fall through and accidentally render as a fail. Findings arrive already section-contiguous (the engine sorts by section order), so we regroup by section into per-section panels for visual separation. {% endcomment %} {% regroup findings by section as section_groups %} {% for group in section_groups %}
{% include "fitcheck/partials/section_icon.html" with code=group.grouper %} {{ group.list.0.get_section_display }}
{% for finding in group.list %} {% comment %}Explanatory message rides the Status cell as a hover tooltip so it no longer clutters the table with a detail row.{% endcomment %} {% if finding.code == "OK" or finding.code == "SUB" or finding.code == "REF" or finding.code == "FRF" or finding.code == "ANY" %} {% elif finding.code == "EXT" or finding.code == "UNV" %} {% else %} {% endif %} {% if finding.code == "OK" %} {{ finding.get_code_display }} {% elif finding.code == "SUB" %} {{ finding.get_code_display }} {% elif finding.code == "REF" %} {{ finding.get_code_display }} {% elif finding.code == "FRF" %} {{ finding.get_code_display }} {% elif finding.code == "ANY" %} {{ finding.get_code_display }} {% elif finding.code == "EXT" or finding.code == "UNV" %} {{ finding.get_code_display }} {% else %} {{ finding.get_code_display }} {% endif %} {% if finding.allowed_alternatives or finding.attribute_results %} {% endif %} {% endfor %}
{% translate "Doctrine Expects" %} {% translate "Your Fit" %} {% translate "Status" %}
{% if finding.expected_type %} {{ finding.expected_type.name }} {% if finding.expected_qty %}×{{ finding.expected_qty }}{% endif %} {% else %}—{% endif %} {% if finding.actual_type %} {{ finding.actual_type.name }} {% if finding.actual_qty %}×{{ finding.actual_qty }}{% endif %} {% else %}—{% endif %}
{% if finding.allowed_alternatives %}
{% translate "Allowed Options" %} {% for alt in finding.allowed_alternatives %} {{ alt.name }} {% endfor %}
{% endif %} {% if finding.attribute_results %} {% for row in finding.attribute_results %} {% endfor %}
{% translate "Attribute" %} {% translate "Required" %} {% translate "Yours" %}
{{ row.attribute }} {% if row.high_is_good %} ({% translate "higher is better" %}) {% else %} ({% translate "lower is better" %}) {% endif %} {{ row.required|sig3 }} {{ row.actual|sig3|default:"?" }} {% if row.passed %} {% else %} {% endif %}
{% endif %}
{% empty %}

{% translate "No findings." %}

{% endfor %}