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

Activities

{% 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 %} {# Record Status #} {% if resource_data|has_key:"Record_Status_Assignment" %}

Record Status

Status: {{ resource_data|val_from_key:"Record_Status_Assignment"|val_from_key:"Record Status"|val_from_key:"@display_value" }}


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

Activity Names

    {% for activity in resource_data|val_from_key:"Activity Names" %}
  • {{ activity|val_from_key:"Activity Name"|val_from_key:"@display_value" }}
  • {% endfor %}

{% endif %} {# Activity Types #} {% if resource_data|has_key:"Activity Type" %}

Activity Types

{{ resource_data|val_from_key:"Activity Type"|val_from_key:"@display_value" }}

{% endif %} {# Activity Timespan #} {% if resource_data|has_key:"Activity Timespan" %}

Activity Timespan

Start Date
End Date
Date Qualifier
{{ resource_data|val_from_key:"Activity Timespan"|val_from_key:"Activity Start Date"|val_from_key:"@display_value" }}
{{ resource_data|val_from_key:"Activity Timespan"|val_from_key:"Activity End Date"|val_from_key:"@display_value" }}
{{ resource_data|val_from_key:"Activity Timespan"|val_from_key:"Activity Date Qualifier"|val_from_key:"@display_value" }}

{% endif %} {# Location Data #} {% if resource_data|has_key:"Location Data" %}

Location Information

National Grid References

{% if resource_data|val_from_key:"Location Data"|has_key:"National Grid References" %} {% with ngr_check=resource_data|val_from_key:"Location Data"|val_from_key:"National Grid References" %} {% if ngr_check.0|has_key:"National Grid Reference" %} {% for ngr in resource_data|val_from_key:"Location Data"|val_from_key:"National Grid References" %} {{ ngr|val_from_key:"National Grid Reference"|val_from_key:"@display_value" }} {% endfor %} {% else %} {{ resource_data|val_from_key:"Location Data"|val_from_key:"National Grid References"|val_from_key:"National Grid Reference"|val_from_key:"@display_value" }} {% endif %} {% endwith %} {% endif %}

Localities/Administrative Areas

{% if resource_data|val_from_key:"Location Data"|has_key:"Localities/Administrative Areas" %} {% for area in resource_data|val_from_key:"Location 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:"Location 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:"Location 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 %} {# Descriptions #} {% if resource_data|has_key:"Activity Descriptions" %}

Activity Descriptions

{% for desc in resource_data|val_from_key:"Activity Descriptions" %} {% if desc|val_from_key:"Activity Description Type"|val_from_key:"@display_value" == "Summary" %}

Description Type :{{ desc|val_from_key:"Activity Description Type"|val_from_key:"@display_value" }}
{{ desc|val_from_key:"Activity Description"|val_from_key:"@display_value"|safe }}

{% endif %} {% endfor %} {% for desc in resource_data|val_from_key:"Activity Descriptions" %} {% if desc|val_from_key:"Activity Description Type"|val_from_key:"@display_value" == "Full" %}

Description Type :{{ desc|val_from_key:"Activity Description Type"|val_from_key:"@display_value" }}
{{ desc|val_from_key:"Activity Description"|val_from_key:"@display_value"|safe }}

{% endif %} {% endfor %} {% for desc in resource_data|val_from_key:"Activity Descriptions" %} {% if desc|val_from_key:"Activity Description Type"|val_from_key:"@display_value" != "Summary" %} {% if desc|val_from_key:"Activity Description Type"|val_from_key:"@display_value" != "Full" %}

Description Type: {{ desc|val_from_key:"Activity Description Type"|val_from_key:"@display_value" }}
{{ desc|val_from_key:"Activity Description"|val_from_key:"@display_value"|safe }}

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

{% endif %} {# Bibliographic Source Citation #} {% if resource_data|has_key:"Bibliographic Source Citation" %}

Bibliographic Source Citations

Source Number
Source Title
{% for biblio in resource_data|val_from_key:"Bibliographic Source Citation" %}
{{ biblio|val_from_key:"Source Number"|val_from_key:"Source Number Value"|val_from_key:"@display_value" }}
{{ biblio|val_from_key:"@display_value" }}
{% endfor %}

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

Associated Monuments/Areas/Artefacts/Maritime Vessels/Historic Aircraft

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

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

Parent Activities

{{ resource_data|val_from_key:"Parent_Activity"|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 %} {# External Cross References #} {% if resource_data|has_key:"External Cross References" %}

External Cross References

External Cross Reference
External Cross Reference Source
URL
{% for exref in resource_data|val_from_key:"External Cross References" %}
{{ exref|val_from_key:"External Cross Reference"|val_from_key:"@display_value" }}
{{ exref|val_from_key:"External Cross Reference Source"|val_from_key:"@display_value" }}
{% with exref|val_from_key:"URL" as URL %} {% if URL|has_key:"url" and URL|has_key:"url_label" %} {{URL|val_from_key:'url_label'}} {% elif URL|has_key:"url_label" %} {{URL|val_from_key:"url_label"}} {% elif URL|has_key:"url" %} {{URL|val_from_key:'url'}} {% else %}
{% endif %} {% endwith %}
{% endfor %}

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