--- a/ckanext/datagovau/templates/package/read.html +++ b/ckanext/datagovau/templates/package/read.html @@ -1,13 +1,18 @@ {% ckan_extends %} - +{% block primary_content_inner %} +{{ super() }} +<div class="module-content"> + {{ h.disqus_comments() }} +</div> +{% endblock %} {% block package_additional_info %} -<section class="additional-info" xmlns:dcat="http://www.w3.org/ns/dcat#" - xmlns:dcam="http://purl.org/dc/dcam/" - xmlns:aglsterms="http://www.agls.gov.au/agls/terms/" - xmlns:agentterms="http://www.agls.gov.au/agls/agentterms/" - xmlns:availterms="http://www.agls.gov.au/agls/availterms/" - xmlns:adminterms="http://www.agls.gov.au/agls/adminterms/" - xmlns:dct="http://purl.org/dc/terms/"> +<section class="additional-info" prefix="dc: http://purl.org/dc/elements/1.1/ dcat: http://www.w3.org/ns/dcat# + dcam: http://purl.org/dc/dcam/ + aglsterms: http://www.agls.gov.au/agls/terms/ + agentterms: http://www.agls.gov.au/agls/agentterms/ + availterms: http://www.agls.gov.au/agls/availterms/ + adminterms: http://www.agls.gov.au/agls/adminterms/ + dct: http://purl.org/dc/terms/"> <h3>{{ _('Additional Info') }}</h3> <table class="table table-striped table-bordered table-condensed"> <thead> @@ -38,17 +43,11 @@ <td class="dataset-details"> {{ pkg.agency_program }}</td> </tr> {% endif %} - {% if pkg.get('Agency Program') %} - <tr> - <th scope="row" class="dataset-label">Agency Program</th> - <td class="dataset-details"> {{ pkg.get('Agency Program') }}</td> - </tr> - {% endif %} - {% if pkg.get('DCTERMS.Source.URI') %} + {% if pkg.get('url') %} <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(pkg.get('url'), + pkg.get('url'), rel='dct:source', target='_blank') }} </td> </tr> {% endif %} @@ -67,13 +66,6 @@ <td class="dataset-details" property="dct:spatial"> {{ pkg.spatial_coverage }}</td> </tr> {% endif %} - {% if pkg.get('Geospatial Coverage') %} - - <tr> - <th scope="row" class="dataset-label">Geospatial Coverage</th> - <td class="dataset-details" property="dct:spatial"> {{ pkg.get('Geospatial Coverage') }}</td> - </tr> - {% endif %} {% if pkg.get('granularity') %} <tr> @@ -81,43 +73,19 @@ <td class="dataset-details"> {{ pkg.granularity }}</td> </tr> {% endif %} - {% if pkg.get('Granularity') %} - - <tr> - <th scope="row" class="dataset-label">Data Granularity</th> - <td class="dataset-details"> {{ pkg.get('Granularity') }}</td> - </tr> - {% endif %} {% if pkg.get('jurisdiction') %} - <tr> <th scope="row" class="dataset-label">Government Jurisdiction</th> <td class="dataset-details" property="aglsterms:AglsJuri"> {{ pkg.jurisdiction }}</td> </tr> {% endif %} - {% if pkg.get('AGLSTERMS.Jurisdiction') %} - - <tr> - <th scope="row" class="dataset-label">Government Jurisdiction</th> - <td class="dataset-details" property="aglsterms:AglsJuri"> {{ pkg.get('AGLSTERMS.Jurisdiction') }}</td> - </tr> - {% endif %} {% if pkg.get('temporal_coverage') %} - <tr> <th scope="row" class="dataset-label">Temporal Coverage</th> <td class="dataset-details" property="dct:temporal"> {{ pkg.temporal_coverage }}</td> </tr> {% endif %} - {% if pkg.get('Temporal Coverage') %} - - <tr> - <th scope="row" class="dataset-label">Temporal Coverage</th> - <td class="dataset-details" property="dct:temporal"> {{ pkg.get('Temporal Coverage') }}</td> - </tr> - {% endif %} {% if pkg.get('data_state') %} - <tr> <th scope="row" class="dataset-label">Data State</th> <td class="dataset-details"> {{ pkg.data_state }}</td> @@ -130,26 +98,27 @@ <td class="dataset-details"> {{ pkg.update_freq }}</td> </tr> {% endif %} - {% if pkg.get('Update Frequency') %} - <tr> - <th scope="row" class="dataset-label">Update Frequency</th> - <td class="dataset-details"> {{ pkg.get('Update Frequency') }}</td> - </tr> - {% endif %} - {% if pkg.maintainer_email %} +{% set email =h.get_last_active_user(c.pkg_dict['id']).get('email','') %} <tr> <th scope="row" class="dataset-label">{{ _('Maintainer') }}</th> <td class="dataset-details" property="dc:contributor">{{ - h.mail_to(email_address=pkg.maintainer_email, name=pkg.maintainer) }} + h.mail_to(email_address=(email or ' '), name=h.get_last_active_user(c.pkg_dict['id']).get("display_name",'')) }} </td> </tr> - {% elif pkg.maintainer %} <tr> - <th scope="row" class="dataset-label">{{ _('Maintainer') }}</th> - <td class="dataset-details" property="dc:contributor">{{ pkg.maintainer }}</td> + <th scope="row" class="dataset-label">Publisher/Agency</th> + <td class="dataset-details" property="dc:publisher">{{ c.pkg_dict['organization']['title']}} + </td> </tr> - {% endif %} + <tr> + <th scope="row" class="dataset-label">Type</th> + <td class="dataset-details" property="dc:type">Dataset</td> + </tr> + <tr> + <th scope="row" class="dataset-label">Language</th> + <td class="dataset-details" property="dc:language">English</td> + </tr> </tbody> </table> @@ -158,3 +127,13 @@ {% endblock %} +{% block secondary_content %} + {{ super() }} + + {% set dataset_extent = h.get_pkg_dict_extra(c.pkg_dict, 'spatial', '') %} + {% if dataset_extent %} + {% snippet "spatial/snippets/dataset_map_sidebar.html", extent=dataset_extent %} + {% endif %} + +{% endblock %} +