{% extends "package/read_common.html" %} {% import "_dgu_jinja_util.html" as m with context %} {% set can_update=h.check_access('package_update',{'id':c.pkg.id}) %} {% set can_delete=h.check_access('package_delete', {'id':c.pkg.id}) and not h.is_package_deleted(c.pkg) %} {% set harvest_object=h.get_harvest_object(c.pkg) %} {% set can_harvest=harvest_object and h.check_access('harvest_source_update',{'id':harvest_object.source.id}) %} {% set admin_mode = can_update or can_delete or can_harvest %} {% block title %} {{h.resource_display_name(c.resource)}} - Resources {% endblock %} {% block breadcrumb_content %} {{ h.build_nav('dgu_search', _('Datasets')) }}
  • {{c.pkg_dict.get('title', c.pkg_dict['name'])}}
  • {{h.resource_display_name(c.resource)}}
  • {% endblock %} {% block pre_primary %}
    {% endblock %} {% block optional_head %} {% if h.is_plugin_enabled('recline_preview') %} {% if not h.is_wms(c.resource) %} {% endif %} {% endif %} {{super() }} {% endblock %} {% block dataset_detail %}

    {% if c.resource.get('state') == 'deleted' %}
    Deleted resource
    {% set deleted = m.if_(h.is_location_data(c.pkg_dict),'umaknjena','izbrisana') %}
    Ta datoteka je {{deleted}}.
    {% endif %} {% with %} {% set publisher = h.get_organization_from_resource(c.resource) %} {% set datastore_compatible = h.is_datastore_compatible(c.resource) %}
    {% if c.resource.get('url') %} {% if admin_mode and datastore_compatible and h.is_plugin_enabled('datastore') and h.is_plugin_enabled('datapusher') %}
    Naloži v API
    {% endif %} {% block resource_datastore_info %} {% if h.is_datastore_compatible(c.resource) %} {% snippet 'package/snippets/data_api_button.html', resource=c.resource %} {% endif %} {% endblock %} {% if c.resource.get('resource_type') == 'listing' %}   View {% elif c.resource.get('resource_type') == 'service' %}   View {% elif c.resource.get('resource_type') == 'api' or c.resource.format.upper() == 'API'%}   Povezava API {% else %}
    {% if not h.get_resource_wms(c.resource) %}   Prenesi {% else %}   Poveži {% endif %}
    {% endif %}
    {% endif %} {% endwith %} {#{% if h.is_wms(c.resource) %}#} {# Only display buttons if this resource is WMS. Otherwise, Widget Preview buttons would display for all resources of a WMS dataset otherwise #} {# {{m.map_preview_button_direct(c.pkg_dict,small=False)}} {# Supply both since there is no ID in pkg_dict! #} {# {% endif %}#}

    Datoteka: “{{h.resource_display_name(c.resource)}}”

    {{data_viewer_embed_dialog()}} {% if c.resource.get('description') and c.resource.get('description') != h.resource_display_name(c.resource) %}
    {{c.resource.get('description')}}
    {% endif %}
    {% if not h.is_wms(c.resource)%}

    Predogled

    Predogled je na voljo le za datoteke CSV, XML, XLS, XLSX, JSON, GEOJSON, slike (PNG, JPG, GIF) ter prosto besedilo. {{h.get_resource_additional_info(c.resource)}}{##}

    {% endif %} {% if c.resource.get('format').lower() == 'geojson' %} {% block data_preview %} {{ h.resource_preview(c.resource, c.package) }} {% endblock %} {% else %}
    {% endif %}
    {% if c.resource['last_modified'] %} {% endif %} {% with %} {% set fmt = (c.resource.get('format') or 'not specified').strip().lower() %} {% endwith %} {% if c.resource.get('resource_type') in ('file', None) %} {% endif %} {# render_qa_info_for_resource is DGU's version of h.qa_openness_stars_resource_html #} {% for field_dict, label_attributes, value_attributes in h.get_resource_fields(c.resource, h.as_dict(c.pkg_extras)) %} {% endfor %}
    Zadnja posodobitev: {{h.render_datestamp(c.resource['last_modified'])}}
    Format: {{m.format_box(fmt)}}
    Odprtost: {{h.render_resource_stars(c.resource)}}
    Preverjanje kakovosti:{{h.render_qa_info_for_resource(c.resource)}}
    {{field_dict.get('label') or field_dict['name']}} {{field_dict.get('value') or 'Ni podatka'}}
    {% if admin_mode and datastore_compatible and h.is_plugin_enabled('datastore') and h.is_plugin_enabled('datapusher') %} {% block resource_additional_information_inner %} {% if c.resource.datastore_active %} {% set ddict=h.datastore_dictionary(c.resource.id) %}

    {{ _('Data Dictionary') }}

    {#% for f in ddict %} {% endfor %#}
    {{ _('Column') }} {{ _('Type') }}
    {{ f.id }} {{ f.type }} {{ h.get_translated(f.get('info', {}), 'label') }} {{ h.render_markdown(h.get_translated(f.get('info', {}), 'notes')) }}
    {% endif %} {{ super() }} {% endblock %} {% endif %}
    {% endblock %} {% macro data_viewer_embed_dialog() %} {% endmacro %}