{% load template_tags %} Application Area {% include 'html_export/milligram.htm' %} {% include 'html_export/custom_style.htm' %}
{% include 'html_export/custom_header.htm' %}

Application Area

{% for resource in resources %} {% with resource_data=resource.resource %}

{{ resource.displayname }}

{# System Ref #} {% if resource_data|has_key:"System Reference Numbers" %}

System Reference Numbers

Primary Reference Number: {{ resource_data|val_from_key:"System Reference Numbers"|val_from_key:"PrimaryReferenceNumber"|val_from_key:"Primary Reference Number"|val_from_key:"@display_value" }}
Legacy ID: {{ resource_data|val_from_key:"System Reference Numbers"|val_from_key:"LegacyID"|val_from_key:"Legacy ID"|val_from_key:"@display_value" }}


{% endif %} {# References #} {% if resource_data|has_key:"References" %}

References

Reference Number
Reference Number Type
{% for ref in resource_data|val_from_key:"References" %}
{{ ref|val_from_key:"Reference Number"|val_from_key:"@display_value" }}
{{ ref|val_from_key:"Reference Number Type"|val_from_key:"@display_value" }}
{% endfor %}

{% endif %} {# Application Area Names #} {% if resource_data|has_key:"Application Area Names" %}

Application Area Name

Name: {{ resource_data|val_from_key:"Application Area Names"|val_from_key:"Application Area Name"|val_from_key:"@display_value"}}
Name Type: {{ resource_data|val_from_key:"Application Area Names"|val_from_key:"Application Area Name Type"|val_from_key:"@display_value" }}


{% endif %} {# Location Data #} {% if resource_data|has_key:"Localities/Administrative Areas" or "Addresses" %}

Location Information

Localities/Administrative Areas

{% if resource_data|has_key:"Localities/Administrative Areas" %} {% for area in resource_data|val_from_key:"Localities/Administrative Areas" %} {# there is a bug that passes a dict if there are no addresses in this branch... let's check for a key to stop this from causing odd artifacts #} {% if area|val_from_key:"Area Type"|has_key:"@display_value" %} {{ area|val_from_key:"Area Type"|val_from_key:"@display_value" }}: {{ area|val_from_key:"Area Names"|val_from_key:"Area Name"|val_from_key:"@display_value" }}
{% else %} {{ area|val_from_key:"Area Names"|val_from_key:"Area Name"|val_from_key:"@display_value" }}
{% endif %} {% endfor %} {% endif %}

{# there is a bug that passes a dict if there are no addresses in this branch... let's check for a key to stop this from causing odd artifacts #} {% with address_check=resource_data|val_from_key:"Addresses" %} {% if address_check.0|has_key:"Full Address" %}

Addresses

Full Address
Locality
{% for address in resource_data|val_from_key:"Addresses" %}
{{ address|val_from_key:"Full Address"|val_from_key:"@display_value" }}
{{ address|val_from_key:"Locality"|val_from_key:"Locality Value"|val_from_key:"@display_value" }}
{% endfor %}
{% endif %} {% endwith %}

{% endif %} {# Designation and Protection Assignment #} {% if resource_data|has_key:"Designation and Protection Assignment" %}

Designation and Protection Assignment

Designation Name
Designation or Protection Type
Grade
{% for desig in resource_data|val_from_key:"Designation and Protection Assignment" %}
{{ desig|val_from_key:"Designation Names"|val_from_key:"Designation Name"|val_from_key:"@display_value" }}
{{ desig|val_from_key:"Designation or Protection Type"|val_from_key:"@display_value" }}
{{ desig|val_from_key:"Grade"|val_from_key:"@display_value" }}
{% endfor %}

{% endif %} {# Associated Application Areas #} {% if resource_data|has_key:"Associated Application Area" %}

Associated Application Areas

{{ resource_data|val_from_key:"Associated Application Area" |val_from_key:"@display_value" }}

{% endif %} {# Associated Consultations #} {% if resource_data|has_key:"Associated Consultations" %}

Associated Consultations

{{ resource_data|val_from_key:"Associated Consultations"|val_from_key:"@display_value" }}

{% endif %} {# Associated Monuments/Areas/Artefacts/Maritime Vessels/Historic Aircraft #} {% if resource_data|has_key:"Associated Monuments, Areas and Artefacts" %}

Associated Monuments, Areas and Artefacts

{{ resource_data|val_from_key:"Associated Monuments, Areas and Artefacts"|val_from_key:"@display_value" }}

{% endif %} {# Associated Activities #} {% if resource_data|has_key:"Associated Activities" %}

Associated Activities

{{ resource_data|val_from_key:"Associated Activities"|val_from_key:"@display_value" }}

{% endif %} {% endwith%} {% endfor %}