{% if permission_level|lower == 'view' %}
    {% include 'spire/badge/primary_badge.html' with badge_text=permission_level %}
{% elif permission_level|lower == 'add' %}
    {% include 'spire/badge/primary_badge.html' with badge_text=permission_level %}
{% elif permission_level|lower == 'change' %}
    {% include 'spire/badge/success_badge.html' with badge_text=permission_level %}
{% elif permission_level|lower == 'delete' %}
    {% include 'spire/badge/danger_badge.html' with badge_text=permission_level %}
{% else %}
    {% include 'spire/badge/secondary_badge.html' with badge_text=permission_level %}
{% endif %}
