{% ckan_extends %}
{#- A resource with a Website (Plus) view: its stored thumbnail or its
service's logo in place of the format icon, and the service's name in
place of the format (the dataset's format itself is unchanged, so the
service's name isn't marked up as dc:format). The rest of CKAN's title
markup is kept as each CKAN version renders it. -#}
{% block resource_item_title %}
{%- set thumb = h.webpageviewplus_thumbnail(pkg, res) -%}
{%- if thumb -%}
{%- set label -%}
{%- if thumb.src -%}
{%- if thumb.service -%}
{{ thumb.service }}
{%- else -%}
{{ h.get_translated(res, 'format') }}
{%- endif -%}
{%- else -%}
{{ thumb.service }}
{%- endif -%}
{%- endset -%}
{% asset 'webpageviewplus/thumbnails-css' %}
{{ h.webpageviewplus_replace_format_label(super(), label) }}
{%- else -%}
{{ super() }}
{%- endif -%}
{% endblock %}