{% extends "package/base.html" %} {% set res = resource %} {% block head_extras -%} {{ super() }} {% set description = h.markdown_extract(h.get_translated(res, 'description'), extract_length=200) if res.description else h.markdown_extract(h.get_translated(package, 'notes'), extract_length=200) %} {% endblock -%} {% block subtitle -%} {{- ui.subtitle_item(h.resource_display_name(res)) }} {{ ui.subtitle_item(h.dataset_display_name(package)) }} {{- super() }} {%- endblock %} {% block breadcrumb_content -%} {{ super() }} {{- ui.breadcrumb(h.resource_display_name(res)|truncate(30), href="", active=true) }} {%- endblock %} {%- block content_action -%} {% block resource_actions_inner %} {% if res.url and h.is_url(res.url) %} {%- call ui.util.call(ui.button_group, direction="row") -%} {%- call ui.util.call(ui.button, _extra_class="resource-url-analytics", href=res.url) -%} {% if res.resource_type in ('listing', 'service') %} {{ ui.icon("eye") }} {{ _('View') }} {% elif res.resource_type == 'api' %} {{ ui.icon("key") }} {{ _('API Endpoint') }} {% elif not res.has_views and not res.url_type == 'upload' %} {{ ui.icon("open_in_new") }} {{ _('Go to resource') }} {% else %} {{ ui.icon("arrow-circle-down") }} {{ _('Download') }} {% endif %} {%- endcall %} {% block download_resource_button %}{% endblock download_resource_button %} {%- endcall %} {% endif %} {% endblock %} {% block action_manage %} {% block action_manage_inner %}{% endblock %} {{ ui.content_action(_('Manage'), href=h.url_for(pkg.type ~ '_resource.edit', id=pkg.name, resource_id=res.id), style="secondary", icon="settings") if h.check_access('package_update', {'id':pkg.id }) }} {% endblock action_manage %} {%- endblock %} {% block primary_content %} {% block resource %} {% endblock %} {% block resource_additional_information %} {% if res %}
{% block resource_additional_information_inner %}
{{ ui.heading(_('Additional Information'), level=2) }} {%- call ui.util.call(ui.table, striped=true, bordered=true, data={"module": "table-toggle-more"}) -%} {{ _('Field') }} {{ _('Value') }} {{ _('Data last updated') }} {{ h.render_datetime(res.last_modified) or h.render_datetime(res.created) or _('unknown') }} {{ _('Metadata last updated') }} {{ h.render_datetime(res.metadata_modified) or h.render_datetime(res.created) or _('unknown') }} {{ _('Created') }} {{ h.render_datetime(res.created) or _('unknown') }} {{ _('Format') }} {{ res.format or res.mimetype_inner or res.mimetype or _('unknown') }} {{ _('License') }} {% snippet "snippets/license.html", pkg_dict=pkg, text_only=True %} {% for key, value in h.format_resource_items(res.items()) %} {% if key not in ('created', 'metadata modified', 'last modified', 'format') %} {{ key | capitalize }}{{ value }} {% endif %} {% endfor %} {%- endcall %}
{% endblock %}
{% endif %} {% endblock %} {% endblock %} {% block secondary_content %} {%- call ui.util.call(ui.sidebar_nav, title=_("Dataset")) -%} {{ ui.sidebar_nav_item(pkg.title, href=h.url_for(pkg.type ~ ".read", id=pkg.name)) }} {%- endcall %} {% block resources_list %} {% snippet "package/snippets/resources.html", pkg=pkg, active=res.id, action='read' %} {% endblock %} {% block resource_license %} {% snippet "snippets/social.html" %} {% endblock %} {% endblock %}