{% extends 'base.html' %} {% load base_extras inventory_extras ui_extras %} {% block content %}
| Policy |
{{ rule.get_policy_display }}
{% if not rule.ruleset and not rule.is_voting_rule %}
{% if perms.santa.change_rule or perms.santa.delete_rule %}
{% if perms.santa.change_rule %}
{% url 'santa:update_configuration_rule' configuration.pk rule.pk as url %}
{% button 'UPDATE' url "Edit rule" %}
{% endif %}
{% if perms.santa.delete_rule %}
{% url 'santa:delete_configuration_rule' configuration.pk rule.pk as url %}
{% button 'DELETE' url "Delete rule" %}
{% endif %}
{% endif %}
{% endif %}
|
| Voting rule? | {{ rule.is_voting_rule|yesno }} |
| {{ target.get_type_display }} |
{% if perms.santa.view_target %}
{{ target.identifier }}
{% else %}
{{ target.identifier }}
{% endif %}
{% for file in target.files %}
|
| Custom message | {{ rule.custom_msg }} |
| Description | {{ rule.description|linebreaks }} |
| Serial number{{ rule.serial_numbers|length|pluralize }} |
|
| Excluded serial number{{ rule.excluded_serial_numbers|length|pluralize }} |
|
| Primary user{{ rule.primary_users|length|pluralize }} |
|
| Excluded primary user{{ rule.excluded_primary_users|length|pluralize }} |
|
| Tag{{ tag_count|pluralize }} | {% for tag in rule.tags.all %} {% inventory_tag tag %} {% endfor %} |
| Excluded tag{{ excluded_tag_count|pluralize }} | {% for tag in rule.excluded_tags.all %} {% inventory_tag tag %} {% endfor %} |
| Ruleset | {{ rule.ruleset }} |