From 9843a51f9c74353c7804ecc6528f1333d4846760 Mon Sep 17 00:00:00 2001 From: Allison Lund <67483756+alliomeria@users.noreply.github.com> Date: Wed, 24 Nov 2021 15:30:49 -0500 Subject: [PATCH 1/5] Update ami_ingest_json.twig.html Updated to include mesh, europeana, and date_embargo_lift --- d8content/metadatadisplays/ami_ingest_json.twig.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/d8content/metadatadisplays/ami_ingest_json.twig.html b/d8content/metadatadisplays/ami_ingest_json.twig.html index 176c9e49..e4d3d5d8 100644 --- a/d8content/metadatadisplays/ami_ingest_json.twig.html +++ b/d8content/metadatadisplays/ami_ingest_json.twig.html @@ -13,9 +13,11 @@ "publisher": {{ data.publisher|json_encode|raw }}, "language": {{ data.language|json_encode|raw }}, "ismemberof": [], + "ispartof": [], "owner": {{ data.owner|json_encode|raw }}, "local_identifier": {{ data.local_identifier|json_encode|raw }}, "date_published": {{ data.date_published|json_encode|raw }}, + "date_embargo_lift": {{ data.date_embargo_lift|json_encode|raw }}, "rights_statements": {{ data.rights_statements|json_encode|raw }}, "rights": {{ data.rights|json_encode|raw }}, "subject_loc": {{ data.subject_loc|json_encode|raw }}, @@ -27,6 +29,10 @@ "edm_agent": {{ data.edm_agent|json_encode|raw }}, "term_aat_getty": {{ data.term_aat_getty|json_encode|raw }}, "viaf": {{ data.viaf|json_encode|raw }}, + "pubmed_mesh": {{ data.pubmed_mesh|json_encode|raw }}, + "europeana_concepts": {{ data.europeana_concepts|json_encode|raw }}, + "europeana_agents": {{ data.europeana_agents|json_encode|raw }}, + "europeana_places": {{ data.europeana_places|json_encode|raw }}, "geographic_location": {{ data.geographic_location|json_encode|raw }}, "subjects_local_personal_names": {{ data.subjects_local_personal_names|json_encode|raw }}, "subjects_local": {{ data.subjects_locals|json_encode|raw }}, From 6f02b253d75385458b7f1b5b2135db0016c1bbfe Mon Sep 17 00:00:00 2001 From: Allison Lund <67483756+alliomeria@users.noreply.github.com> Date: Wed, 24 Nov 2021 15:33:41 -0500 Subject: [PATCH 2/5] Update object_metadata_abstract_search_results.twig.html Updated November 2021: trim output of data.description, add Rights Statement mapping, and show trimmed output for data.rights (local rights statement) --- ...ata_abstract_search_results.twig copy.html | 34 ------ ...metadata_abstract_search_results.twig.html | 112 ++++++++++++++++++ 2 files changed, 112 insertions(+), 34 deletions(-) delete mode 100644 d8content/metadatadisplays/object_metadata_abstract_search_results.twig copy.html create mode 100644 d8content/metadatadisplays/object_metadata_abstract_search_results.twig.html diff --git a/d8content/metadatadisplays/object_metadata_abstract_search_results.twig copy.html b/d8content/metadatadisplays/object_metadata_abstract_search_results.twig copy.html deleted file mode 100644 index d3b3482f..00000000 --- a/d8content/metadatadisplays/object_metadata_abstract_search_results.twig copy.html +++ /dev/null @@ -1,34 +0,0 @@ -
- {% if attribute(data, 'ismemberof') %} - {% if attribute(data, 'ismemberof') is iterable %} - {% for collection in attribute(data, 'ismemberof')%} - {% set parentnode = bamboo_load_entity('node', collection) %} - {% set parentnodeurl = url('entity.node.canonical', {'node': collection}, {'absolute': true}) %} - -{% endfor %} -{% else %} - {% set parentnode = bamboo_load_entity('node', attribute(data, 'ismemberof')) %} - {% set parentnodeurl = url('entity.node.canonical', {'node': attribute(data, 'ismemberof')}, {'absolute': true}) %} - -{% endif %} -{% endif %} -{% if attribute(data, 'ispartof') %} -{% if attribute(data, 'ispartof') is iterable %} - {% for child in attribute(data, 'ispartof')%} - {% set parentnode = bamboo_load_entity('node', child) %} - {% set parentnodeurl = url('entity.node.canonical', {'node': child}, {'absolute': true}) %} - - {% endfor %} - {% else %} - {% set parentnode = bamboo_load_entity('node', attribute(data, 'ispartof')) %} - {% set parentnodeurl = url('entity.node.canonical', {'node': attribute(data, 'ispartof')}, {'absolute': true}) %} - -{% endif %} -{% endif %} --
{{ data.description }}
-{{ data.type }}
-+ {% if attribute(data, 'ismemberof') %} + {% if attribute(data, 'ismemberof') is iterable %} + {% for collection in attribute(data, 'ismemberof')%} + {% set parentnode = bamboo_load_entity('node', collection) %} + {% set parentnodeurl = url('entity.node.canonical', {'node': collection}, {'absolute': true}) %} ++ +{% endfor %} +{% else %} + {% set parentnode = bamboo_load_entity('node', attribute(data, 'ismemberof')) %} + {% set parentnodeurl = url('entity.node.canonical', {'node': attribute(data, 'ismemberof')}, {'absolute': true}) %} + +{% endif %} +{% endif %} +{% if attribute(data, 'ispartof') %} +{% if attribute(data, 'ispartof') is iterable %} + {% for child in attribute(data, 'ispartof')%} + {% set parentnode = bamboo_load_entity('node', child) %} + {% set parentnodeurl = url('entity.node.canonical', {'node': child}, {'absolute': true}) %} + + {% endfor %} + {% else %} + {% set parentnode = bamboo_load_entity('node', attribute(data, 'ispartof')) %} + {% set parentnodeurl = url('entity.node.canonical', {'node': attribute(data, 'ispartof')}, {'absolute': true}) %} + +{% endif %} +{% endif %} +
{{ data.description }}
instead. +{{ data.description }}
+#} +{{ data.type }}
+{% if data.rights|length > 0 or data.rights_statements|length > 0 %} +{{ data.rights }}
instead. +{{ data.rights }}
+#} +{% endif %} +{% if data.rights_statements|length > 0 %} + {% if data.rights_statements in ['In Copyright'] %} + + {% endif %} + {% if data.rights_statements in ['In Copyright - EU Orphan Work'] %} + + {% endif %} + {% if data.rights_statements in ['In Copyright - Educational Use Permitted'] %} + + {% endif %} + {% if data.rights_statements in ['In Copyright - Non-Commercial Use Permitted'] %} + + {% endif %} + {% if data.rights_statements in ['In Copyright - Rights-holder(s) Unlocatable or Unidentifiable'] %} + + {% endif %} + {% if data.rights_statements in ['No Copyright - Contractual Restrictions'] %} + + {% endif %} + {% if data.rights_statements in ['No Copyright - Non-Commercial Use Only'] %} + + {% endif %} + {% if data.rights_statements in ['No Copyright - Other Known Legal Restrictions'] %} + + {% endif %} + {% if data.rights_statements in ['No Copyright - United States'] %} + + {% endif %} + {% if data.rights_statements in ['Copyright Not Evaluated'] %} + + {% endif %} + {% if data.rights_statements in ['Copyright Undetermined'] %} + + {% endif %} + {% if data.rights_statements in ['No Known Copyright'] %} + + {% endif %} +{% endif %} +{% endif %} +{# Fixed Rights Statement example from older Archipelago versions: