{% extends "fitcheck/base.html" %} {% load i18n %} {% block fitcheck_content %}
{% translate "Slot-group enforcement policies. Apply them to fittings from the Fittings & Standards pages. Visible to Auth admins and plugin admins only." %}
{% translate "Enforcement Settings" %} {% translate "New Policy" %}
{% for policy in policies %}
{% if not policy.is_builtin or user.is_superuser %} {{ policy.name }} {% else %} {{ policy.name }} {% endif %} {% if policy.is_builtin %} {% translate "Built-in" %} {% endif %} {% if policy.is_disabled %} {% translate "Disabled" %} {% endif %}
{% if policy.description %}

{{ policy.description|truncatechars:120 }}

{% endif %}
{% csrf_token %} {% if policy.is_disabled %} {% else %} {% endif %}
{% if not policy.is_builtin %}
{% csrf_token %}
{% endif %}
{% for rule in policy.rules.all %} {% include "fitcheck/partials/section_icon.html" with code=rule.section %} {{ rule.get_section_display }}: {{ rule.get_enforcement_display }} {% empty %} {% translate "No slot-group overrides yet." %} {% endfor %}
{% blocktranslate count counter=policy.fits.count %}{{ counter }} fitting uses this policy{% plural %}{{ counter }} fittings use this policy{% endblocktranslate %}
{{ policy.created_at|date:"Y-m-d" }} {{ policy.updated_at|date:"Y-m-d" }} {% if policy.is_disabled %} {{ policy.disabled_at|date:"Y-m-d" }} {% endif %}
{% empty %}
{% translate "No compliance policies yet. Create one to standardize slot-group enforcement across fittings." %}
{% endfor %}
{% endblock %}