Load old data from extras key/value store
--- a/ckanext/datagovau/templates/package/read.html
+++ b/ckanext/datagovau/templates/package/read.html
@@ -44,11 +44,11 @@
<td class="dataset-details"> {{ pkg.get('Agency Program') }}</td>
</tr>
{% endif %}
- {% if pkg.get('DCTERMS.Source.URI') %}
+ {% if h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI') %}
<tr>
<th scope="row" class="dataset-label">{{ _('Source') }}</th>
- <td class="dataset-details" property="dct:source">{{ h.link_to(pkg.get('DCTERMS.Source.URI'),
- pkg.get('DCTERMS.Source.URI'), rel='dct:source', target='_blank') }}
+ <td class="dataset-details" property="dct:source">{{ h.link_to(h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI'),
+ h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI'), rel='dct:source', target='_blank') }}
</td>
</tr>
{% endif %}
@@ -67,11 +67,11 @@
<td class="dataset-details" property="dct:spatial"> {{ pkg.spatial_coverage }}</td>
</tr>
{% endif %}
- {% if pkg.get('Geospatial Coverage') %}
+ {% if h.get_pkg_dict_extra(pkg,'Geospatial Coverage') %}
<tr>
<th scope="row" class="dataset-label">Geospatial Coverage</th>
- <td class="dataset-details" property="dct:spatial"> {{ pkg.get('Geospatial Coverage') }}</td>
+ <td class="dataset-details" property="dct:spatial"> {{ h.get_pkg_dict_extra(pkg,'Geospatial Coverage') }}</td>
</tr>
{% endif %}
{% if pkg.get('granularity') %}
@@ -81,11 +81,11 @@
<td class="dataset-details"> {{ pkg.granularity }}</td>
</tr>
{% endif %}
- {% if pkg.get('Granularity') %}
+ {% if h.get_pkg_dict_extra(pkg,'Granularity') %}
<tr>
<th scope="row" class="dataset-label">Data Granularity</th>
- <td class="dataset-details"> {{ pkg.get('Granularity') }}</td>
+ <td class="dataset-details"> {{ h.get_pkg_dict_extra(pkg,'Granularity') }}</td>
</tr>
{% endif %}
{% if pkg.get('jurisdiction') %}
@@ -95,11 +95,11 @@
<td class="dataset-details" property="aglsterms:AglsJuri"> {{ pkg.jurisdiction }}</td>
</tr>
{% endif %}
- {% if pkg.get('AGLSTERMS.Jurisdiction') %}
+ {% if h.get_pkg_dict_extra(pkg,'AGLSTERMS.Jurisdiction') %}
<tr>
<th scope="row" class="dataset-label">Government Jurisdiction</th>
- <td class="dataset-details" property="aglsterms:AglsJuri"> {{ pkg.get('AGLSTERMS.Jurisdiction') }}</td>
+ <td class="dataset-details" property="aglsterms:AglsJuri"> {{ h.get_pkg_dict_extra(pkg,'AGLSTERMS.Jurisdiction') }}</td>
</tr>
{% endif %}
{% if pkg.get('temporal_coverage') %}
@@ -109,11 +109,11 @@
<td class="dataset-details" property="dct:temporal"> {{ pkg.temporal_coverage }}</td>
</tr>
{% endif %}
- {% if pkg.get('Temporal Coverage') %}
+ {% if h.get_pkg_dict_extra(pkg,'Temporal Coverage') %}
<tr>
<th scope="row" class="dataset-label">Temporal Coverage</th>
- <td class="dataset-details" property="dct:temporal"> {{ pkg.get('Temporal Coverage') }}</td>
+ <td class="dataset-details" property="dct:temporal"> {{ h.get_pkg_dict_extra(pkg,'Temporal Coverage') }}</td>
</tr>
{% endif %}
{% if pkg.get('data_state') %}
@@ -130,10 +130,10 @@
<td class="dataset-details"> {{ pkg.update_freq }}</td>
</tr>
{% endif %}
- {% if pkg.get('Update Frequency') %}
+ {% if h.get_pkg_dict_extra(pkg,'Update Frequency') %}
<tr>
<th scope="row" class="dataset-label">Update Frequency</th>
- <td class="dataset-details"> {{ pkg.get('Update Frequency') }}</td>
+ <td class="dataset-details"> {{ h.get_pkg_dict_extra(pkg,'Update Frequency') }}</td>
</tr>
{% endif %}
--- a/ckanext/datagovau/templates/package/read.rdf
+++ b/ckanext/datagovau/templates/package/read.rdf
@@ -80,16 +80,16 @@
<dct:rights py:if="c.pkg_dict.get('license_url', None)" rdf:resource="${c.pkg_dict['license_url']}"/>
- <foaf:homepage py:if="c.pkg_dict.get('DCTERMS.Source.URI')">${c.pkg_dict.get('DCTERMS.Source.URI') }
+ <foaf:homepage py:if="h.get_pkg_dict_extra(c.pkg_dict,'DCTERMS.Source.URI')">${h.get_pkg_dict_extra(c.pkg_dict,'DCTERMS.Source.URI') }
</foaf:homepage>
<dcat:contactPoint py:if="c.pkg_dict.get('contact_point')">${c.pkg_dict.contact_point }</dcat:contactPoint>
<dct:spatial py:if="c.pkg_dict.get('spatial_coverage')">${ c.pkg_dict.spatial_coverage }</dct:spatial>
- <dct:spatial py:if="c.pkg_dict.get('Geospatial Coverage')">${ c.pkg_dict.get('Geospatial Coverage') }</dct:spatial>
+ <dct:spatial py:if="h.get_pkg_dict_extra(c.pkg_dict,'Geospatial Coverage')">${ h.get_pkg_dict_extra(c.pkg_dict,'Geospatial Coverage') }</dct:spatial>
<aglsterms:AglsJuri py:if="c.pkg_dict.get('jurisdiction')">${ c.pkg_dict.jurisdiction }</aglsterms:AglsJuri>
- <aglsterms:AglsJuri py:if="c.pkg_dict.get('AGLSTERMS.Jurisdiction')">${ c.pkg_dict.get('AGLSTERMS.Jurisdiction') }</aglsterms:AglsJuri>
- <dct:temporal py:if="c.pkg_dict.temporal_coverage">${ c.pkg_dict.temporal_coverage }</dct:temporal>
- <dct:temporal py:if="c.pkg_dict.get('Temporal Coverage')">${ c.pkg_dict.get('Temporal Coverage') }</dct:temporal>
+ <aglsterms:AglsJuri py:if="h.get_pkg_dict_extra(c.pkg_dict,'AGLSTERMS.Jurisdiction')">${ h.get_pkg_dict_extra(c.pkg_dict,'AGLSTERMS.Jurisdiction') }</aglsterms:AglsJuri>
+ <dct:temporal py:if="c.pkg_dict.get('temporal_coverage')">${ c.pkg_dict.get('temporal_coverage') }</dct:temporal>
+ <dct:temporal py:if="h.get_pkg_dict_extra(c.pkg_dict,'Temporal Coverage')">${ h.get_pkg_dict_extra(c.pkg_dict,'Temporal Coverage') }</dct:temporal>
<dct:relation py:if="c.pkg_dict.get('data_state')">
<rdf:Description>
<rdfs:label>Data State</rdfs:label>
@@ -103,17 +103,17 @@
<rdf:value>${ c.pkg_dict.get('update_freq') }</rdf:value>
</rdf:Description>
</dct:relation>
- <dct:relation py:if="c.pkg_dict.get('Update Frequency')">
+ <dct:relation py:if="h.get_pkg_dict_extra(c.pkg_dict,'Update Frequency')">
<rdf:Description>
<rdfs:label>Update Frequency</rdfs:label>
- <rdf:value>${ c.pkg_dict.get('Update Frequency') }</rdf:value>
+ <rdf:value>${ h.get_pkg_dict_extra(c.pkg_dict,'Update Frequency') }</rdf:value>
</rdf:Description>
</dct:relation>
- <dct:relation py:if="c.pkg_dict.get('Agency Program')">
+ <dct:relation py:if="h.get_pkg_dict_extra(c.pkg_dict,'Agency Program')">
<rdf:Description>
<rdfs:label>Agency Program</rdfs:label>
- <rdf:value>${ c.pkg_dict.get('Agency Program') }</rdf:value>
+ <rdf:value>${ h.get_pkg_dict_extra(c.pkg_dict,'Agency Program') }</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation py:if="c.pkg_dict.get('agency_program')">
@@ -123,10 +123,10 @@
</rdf:Description>
</dct:relation>
- <dct:relation py:if="c.pkg_dict.get('Granularity')">
+ <dct:relation py:if="h.get_pkg_dict_extra(c.pkg_dict,'Granularity')">
<rdf:Description>
<rdfs:label>Data Granularity</rdfs:label>
- <rdf:value>${ c.pkg_dict.get('Granularity') }</rdf:value>
+ <rdf:value>${ h.get_pkg_dict_extra(c.pkg_dict,'Granularity') }</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation py:if="c.pkg_dict.get('granularity')">
--- a/ckanext/datagovau/templates/package/read_base.html
+++ b/ckanext/datagovau/templates/package/read_base.html
@@ -14,11 +14,11 @@
<meta name="DCTERMS.Creator" scheme="AGLSTERMS.AglsAgent" content="{{ pkg['organization']['title'] }}" />
<meta name="DCTERMS.Modified" scheme="DCTERMS.ISO8601" content="{{pkg['metadata_modified']}}" />
<meta name="DCTERMS.Published" scheme="DCTERMS.ISO8601" content="{{pkg['metadata_created']}}" />
-{% if pkg.get('DCTERMS.Source.URI') %}<meta name="DCTERMS.Source.URI" content="{{pkg.get('DCTERMS.Source.URI')}}" />{% endif %}
+{% if h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI') %}<meta name="DCTERMS.Source.URI" content="{{h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI')}}" />{% endif %}
<meta name="DCTERMS.License" content="{{pkg['license_url']}}" />
-<meta name="DCTERMS.Coverage.Temporal" content="{{pkg.temporal_coverage or pkg.get('Temporal Coverage')}}" />
-<meta name="DCTERMS.Coverage.Spatial" content="{{pkg.spatial_coverage or pkg.get('Geospatial Coverage')}}" />
-<meta name="AGLSTERMS.Jurisdiction" scheme="AGLSTERMS.AglsJuri" content="{{pkg.jurisdiction or pkg.get('AGLSTERMS.Jurisdiction')}}" />
+<meta name="DCTERMS.Coverage.Temporal" content="{{pkg.temporal_coverage or h.get_pkg_dict_extra(pkg,'Temporal Coverage')}}" />
+<meta name="DCTERMS.Coverage.Spatial" content="{{pkg.spatial_coverage or h.get_pkg_dict_extra(pkg,'Geospatial Coverage')}}" />
+<meta name="AGLSTERMS.Jurisdiction" scheme="AGLSTERMS.AglsJuri" content="{{pkg.jurisdiction or h.get_pkg_dict_extra(pkg,'AGLSTERMS.Jurisdiction')}}" />
<meta name="DCAT.Theme" scheme="VO" content="{% for x in pkg.groups %}{{x['title']}},{% endfor %}" />
<meta name="DCTERMS.Identifier" content="{{h.url_for(controller='package',action='read',id=c.pkg_dict['name'], qualified=True)}}" />
<meta name="DCTERMS.Title" content="{{pkg['title']}}" />
--- a/ckanext/datagovau/templates/package/resource_read.html
+++ b/ckanext/datagovau/templates/package/resource_read.html
@@ -14,11 +14,11 @@
<meta name="DCTERMS.Creator" scheme="AGLSTERMS.AglsAgent" content="{{ pkg['organization']['title'] }}" />
<meta name="DCTERMS.Modified" scheme="DCTERMS.ISO8601" content="{{res['revision_timestamp']}}" />
<meta name="DCTERMS.Published" scheme="DCTERMS.ISO8601" content="{{res['created']}}" />
-{% if pkg.get('DCTERMS.Source.URI') %}<meta name="DCTERMS.Source.URI" content="{{pkg.get('DCTERMS.Source.URI')}}" />{% endif %}
+{% if h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI') %}<meta name="DCTERMS.Source.URI" content="{{h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI')}}" />{% endif %}
<meta name="DCTERMS.License" content="{{pkg['license_url']}}" />
-<meta name="DCTERMS.Coverage.Temporal" content="{{pkg.temporal_coverage or pkg.get('Temporal Coverage')}}" />
-<meta name="DCTERMS.Coverage.Spatial" content="{{pkg.spatial_coverage or pkg.get('Geospatial Coverage')}}" />
-<meta name="AGLSTERMS.Jurisdiction" scheme="AGLSTERMS.AglsJuri" content="{{pkg.jurisdiction or pkg.get('AGLSTERMS.Jurisdiction')}}" />
+<meta name="DCTERMS.Coverage.Temporal" content="{{pkg.temporal_coverage or h.get_pkg_dict_extra(pkg,'Temporal Coverage')}}" />
+<meta name="DCTERMS.Coverage.Spatial" content="{{pkg.spatial_coverage or h.get_pkg_dict_extra(pkg,'Geospatial Coverage')}}" />
+<meta name="AGLSTERMS.Jurisdiction" scheme="AGLSTERMS.AglsJuri" content="{{pkg.jurisdiction or h.get_pkg_dict_extra(pkg,'AGLSTERMS.Jurisdiction')}}" />
<meta name="DCAT.Theme" scheme="VO" content="{% for x in pkg.groups %}{{x['title']}},{% endfor %}" />
<meta name="DCAT.byteSize" content="{{res.get('size')}}" />
<meta name="DCAT.mediaType" content="{{res.get('mimetype')}}" />