ixg_platform/templates/ops/qc_detail.html
ixgadmin db05d6052a Quote the ops templates' HTML attributes so the classes apply
An unquoted attribute value ends at the first whitespace, so
``class=badge bg-danger`` is read by every browser as ``class="badge"`` plus two
meaningless attributes. Bootstrap was loading perfectly well; the markup simply
never asked for the styles. Across the ops portal that meant buttons rendered as
plain links, status badges were invisible (white text on a white background: a
failed result showed as nothing at all), the active sidebar item never
highlighted, and the flex utility classes did nothing. The buyer portal templates
quote their attributes, which is why only the ops portal looked unstyled.

346 attributes across 20 templates, rewritten mechanically with a conservative
transform that handles the three shapes in use — a Django tag as the value, a
multi-token class list, and a trailing simple conditional (the active-nav
highlight) — and leaves anything it does not recognise exactly as it was.
2026-09-17 13:57:53 +00:00

28 lines
1.6 KiB
HTML

{% extends 'ops/base_ops.html' %}
{% block title %}QC Detail - IXG Operations{% endblock %}
{% block content %}
<div class="page-header d-flex justify-content-between align-items-center">
<h2>QC Result: {{ result.batch.batch_reference }}</h2>
<a href="{% url 'ops:qc_list' %}" class="btn btn-sm btn-outline-secondary"><i class="bi bi-arrow-left"></i> Back</a>
</div>
<div class="row g-3">
<div class="col-md-6">
<div class="stat-card">
<table class="table table-sm table-borderless mb-0">
<tr><td class="text-secondary">Batch</td><td><a href="{% url 'ops:batch_detail' result.batch.pk %}">{{ result.batch.batch_reference }}</a></td></tr>
<tr><td class="text-secondary">Overall Result</td><td>{% if result.overall_pass %}<span class="badge bg-success">Pass</span>{% else %}<span class="badge bg-danger">Fail</span>{% endif %}</td></tr>
<tr><td class="text-secondary">FFA %</td><td>{{ result.ffa_percentage }}</td></tr>
<tr><td class="text-secondary">Moisture %</td><td>{{ result.moisture_percentage }}</td></tr>
<tr><td class="text-secondary">Peroxide Value</td><td>{{ result.peroxide_value }}</td></tr>
<tr><td class="text-secondary">Visual Grade</td><td>{{ result.visual_grade }}</td></tr>
<tr><td class="text-secondary">Tested By</td><td>{{ result.tested_by|default:'-' }}</td></tr>
<tr><td class="text-secondary">Tested At</td><td>{{ result.tested_at|date:'d/m/Y H:i' }}</td></tr>
<tr><td class="text-secondary">Lab Reference</td><td>{{ result.lab_reference|default:'-' }}</td></tr>
</table>
</div>
</div>
</div>
{% endblock %}