{% extends "base.html" %} {% block title %}{{ h.dataset_display_name(package)}}—{{ h.resource_display_name(resource)}} - {{ super() }}{% endblock %} {% block bodytag %} {{- super() -}} class="dt-view" {%- endblock -%} {%- block page -%} {#- pass the datadictionary to javascript, so we can init columns there -#} {%- set datadictionary = h.datastore_dictionary(resource.id) -%} {%- set nbspval = " "|safe -%}
{% for field in datadictionary -%} {% if 'show_fields' not in resource_view or field.id in resource_view.show_fields -%} {%- endif %} {% endfor -%} {% for field in datadictionary -%} {% if 'show_fields' not in resource_view or field.id in resource_view.show_fields -%} {% endif -%} {% endfor -%}
_id {%- if data_dictionary_labels and field.info is defined and field.info.label|length -%} {{ field.info.label|replace(" ", nbspval) }} {%- else -%} {{ field.id|replace(" ", nbspval) }} {%- endif -%}   {%- if data_dictionary_labels and field.info is defined and (field.info.label|length or field.info.notes|length)-%} {%- endif -%}  colspacer
{{- field.id -}}
{{ h.csrf_input() }}
{#- we do this macro instead of the snippet because the snippet pollutes the output with comments/whitespaces which #} {# may be invisible for regular html, but not for tooltips -#} {%- macro local_friendly_datetime(dt_obj) -%} {{- h.render_datetime(dt_obj, with_hours=True) -}} {%- endmacro -%} {#- we create tooltip here instead of javascript so we can leverage the automatic-local-datetime class date conversion CKAN does -#} {%- set res = resource %} {%- endblock -%} {%- block styles -%} {{- super() -}} {% asset 'ckanext-datatablesview/main-css' %} {% asset 'ckanext-datatablesview/main-js' %} {% endblock %} {% block custom_styles %}{% endblock %}