{% extends 'ops/base_ops.html' %} {% block title %}{{ page_title }} - IXG Operations{% endblock %} {% block content %} {% if messages %} {% for m in messages %}
{{ m }}
{% endfor %} {% endif %} {% if editing_approved %}
This specification is not a draft. Its parameters are the limits QC results are judged against, so editing them changes those limits.
{% endif %}
{% csrf_token %}
Specification
{% if form.non_field_errors %} {% for e in form.non_field_errors %}
{{ e }}
{% endfor %} {% endif %} {% for field in form %}
{{ field }} {% if field.help_text %}
{{ field.help_text }}
{% endif %} {% for e in field.errors %}
{{ e }}
{% endfor %}
{% endfor %}
Parameters
{{ formset.management_form }} {% if formset.non_form_errors %} {% for e in formset.non_form_errors %}
{{ e }}
{% endfor %} {% endif %}
{% for pf in formset %}
{{ pf.id }}
{{ pf.parameter }} {% for e in pf.parameter.errors %}
{{ e }}
{% endfor %}
{{ pf.unit }}
{{ pf.min_value }} {% for e in pf.min_value.errors %}
{{ e }}
{% endfor %}
{{ pf.max_value }} {% for e in pf.max_value.errors %}
{{ e }}
{% endfor %}
{{ pf.sort_order }}
{{ pf.allowed_values }} {% for e in pf.allowed_values.errors %}
{{ e }}
{% endfor %}
{{ pf.required }}
{{ pf.DELETE }}
{% for e in pf.non_field_errors %}
{{ e }}
{% endfor %}
{% endfor %}
How a specification is used

Each parameter is a limit. A numeric parameter is checked between its minimum and maximum; a visual parameter is checked against its allowed grades. A QC result is judged against the specification that is both approved and current.

A specification needs at least one parameter: with none, every QC result would pass.

Approval (four-eyes)
{% if object and object.pk %} {% if object.status == 'approved' %}

Approved{% if object.approved_by %} by {{ object.approved_by.full_name|default:object.approved_by.email }}{% endif %}{% if object.approved_at %} on {{ object.approved_at|date:'d/m/Y H:i' }}{% endif %}. {% if object.is_current %}It is the current specification for this product.{% endif %}

{% elif object.status == 'superseded' %}

This version is superseded. It can no longer be approved.

{% elif show_approval %} {% if approval_error %}

{{ approval_error }}

{% else %}

Approving makes these parameters the limits QC is judged against, and supersedes the product's previously current version.

{% csrf_token %} {% endif %} {% else %}

Approval is an administrator action. Save this specification as a draft; an administrator can then approve it. The creator may not approve their own specification.

{% endif %} {% else %}

A new specification is saved as a draft. Approval is a separate administrator action, and the creator may not approve their own specification, so a second person makes the limits live.

{% endif %}
Cancel
{% endblock %} {% block extra_js %} {% endblock %}