{% set url = h.url_for(controller='package', action='resource_read', id=pkg.name, resource_id=res.id) %} {% set format = res.format.lower() or 'data' %} {% set is_web_format = h.is_web_format(res) %} {% set is_preview_format = h.is_preview_format(res) %} {% set is_map_format = h.is_map_format(res) %} {% set is_cartodb_format = h.is_cartodb_format(res) %} {% set is_plotly_format = h.is_plotly_format(res) %} {% set is_arcgis_format = h.is_arcgis_format(res) %} {% set arcgis_format_query = h.arcgis_format_query(res) %} {% set plotly_url = "https://plot.ly/external/" %} {% set cartodb_url = "http://oneclick.cartodb.com/" %} {% set arcgis_url = "http://www.arcgis.com/home/webmap/viewer.html" %} {% set filesize = res.size %} {% set tooltip = _("ZIP files may contain data and documentation in one or more formats. In Data.gov’s Geospatial catalog, most of the files are multi-part shapefiles.") if format == 'zip' %}
  • {% block resource_item_title %} {% if res.name == 'Comma Seperated Values File' %} Comma Separated Values File{{ res.format }} {{ h.popular('views', res.tracking_summary.total, min=10) }} {% else %} {{ h.resource_display_name(res) | truncate(50) }}{{ res.format }} {{ h.popular('views', res.tracking_summary.total, min=10) }} {% endif %} {% endblock %}

    {% if res.description %} {{ h.markdown_extract(res.description, extract_length=80) }} {% else %}   {% endif %} {# {% if filesize != 0 and filesize != None and not is_map_format and not is_web_format %}  ( {{ filesize|float/1000 }} KB ) {% endif %} #}

    {% if res.archiver %} {% set archiver = res.archiver %} {% endif %}     {% if res.qa %} {% set qa = res.qa %}
    {% if qa.openness_score != None %} {% snippet "qa/stars.html", stars=qa.openness_score %} {% trans %}Openness score{% endtrans %}
    {% else %} {% trans %}No openness information yet.{% endtrans %} {% endif %}
    {% endif %} {% block resource_item_explore %} {% set resource_url = url if is_map_format or is_preview_format else res.url %}
    {% if is_map_format %} {{ _('View Map') }} {% elif is_web_format %} {% if is_arcgis_format %} {% endif %} {{ _('Visit page') }} {% elif is_preview_format %} {{ _('Download') }} {% elif is_cartodb_format and is_plotly_format %} {{ _('Download') }} {% elif is_cartodb_format %} {{ _('Download') }} {% elif is_plotly_format %} {{ _('Download') }} {% else %} {{ _('Download') }} {% endif %}
    {% endblock %}