{{% extends "html-template.html" %}} {{%- macro render_policy_specific_content(of_what) %}} {{% for policy, fields in of_what.policy_specific_content.items() %}} {{% call normal_content(policy ~ "–related", 3 ) %}} {{% for field, text in fields.items() %}}

{{{ field }}}

{{{ text }}} {{% endfor %}} {{% endcall %}} {{% endfor %}} {{% endmacro %}} {{%- macro collapsible_content(heading, level) %}}
{{{ caller() }}}
{{% endmacro %}} {{%- macro normal_content(heading, level) %}} {{{ heading }}}
{{{ caller() }}}
{{% endmacro %}} {{%- macro minor_section(title, content, collapsible) %}} {{% if content %}} {{% if collapsible %}} {{% call collapsible_content(title, 3 ) %}} {{{ content }}} {{% endcall %}} {{% else %}} {{% call normal_content(title, 3 ) %}} {{{ content }}} {{% endcall %}} {{% endif %}} {{% endif %}} {{% endmacro %}} {{%- block head %}} {{% endblock %}} {{%- block body %}} {{{ super() }}}

{{{ rule.title }}}

Prose

{{{ minor_section("Description", prose.description, collapsible=false) -}}} {{{ minor_section("Rationale", prose.rationale, collapsible=false) -}}} {{{ render_policy_specific_content(prose) -}}}
{{% if checks.contains_something() %}}

Checks

{{{ minor_section("OVAL", checks.oval, collapsible=true) -}}} {{{ render_policy_specific_content(checks) -}}}
{{% endif %}} {{%- if fixes.contains_something() %}}

Fixes

{{{ minor_section("Bash", fixes.bash, collapsible=true) -}}} {{{ minor_section("Ansible", fixes.ansible, collapsible=true) -}}} {{{ render_policy_specific_content(fixes) -}}}
{{% endif -%}}
{{% endblock %}}