{% comment %} This is reused when displaying Data Elements, but we want to minimise the amount of information around the Value Domain So we've split this out into its own template. {% endcomment %} {% load aristotle_tags %}
{% if item.description %} {% endif %} {% if item.data_type %} {% endif %} {% if item.unit_of_measure %} {% endif %} {% if item.format %} {% endif %} {% if item.maximum_length %} {% endif %}
Description {{ item.description }}
Data Type {{ item.data_type }}
Unit Of Measure {{ item.unit_of_measure }} {% if item.unit_of_measure.symbol %}({{ item.unit_of_measure.symbol }}){% endif %}
Format {{ item.format }}
Maximum character length {{ item.maximum_length }}
{% if item.permissiblevalue_set.count > 0 or item.supplementaryvalue_set.count > 0 or item|can_edit:request.user %} Permissible Values {% for perm in item.permissiblevalue_set.all %} {% if forloop.first %} {% endif %} {% empty %} {% if item|can_edit:request.user %} {% endif %} {% endfor %} {% for perm in item.supplementaryvalue_set.all %} {% if forloop.first %} {% endif %} {% empty %} {% if item|can_edit:request.user %} {% endif %} {% endfor %}
ValueMeaning
Permissible Values {% if item|can_edit:request.user %} edit {% endif %} {{ perm.value }} {{ perm.meaning }}
{% if item|can_edit:request.user %} Add Permissible Values {% endif %}
Supplementary Values {% if item|can_edit:request.user %} edit {% endif %} {{ perm.value }} {{ perm.meaning }}
{% if item|can_edit:request.user %} Add Supplementary Values {% endif %}
{% bootstrap_modal "value_domain_modal" size='lg' %} {% endif %}