diff --git a/ckanext/odsh/templates/package/snippets/resource_item.html b/ckanext/odsh/templates/package/snippets/resource_item.html index 457eb4d8fca6dabff1ec8849816cf23a09270e64..296f03aa8b72f5ec1628e44c2da33b3cdd76c20e 100644 --- a/ckanext/odsh/templates/package/snippets/resource_item.html +++ b/ckanext/odsh/templates/package/snippets/resource_item.html @@ -6,6 +6,7 @@ {% set rtitle=h.resource_display_name(res) if res.name else ' '%} {% set resource_size = h.tpsh_get_resource_size(res) %} +{% set res_format = res.format.replace('_SRVC','') %} <li class="resource-item" data-id="{{ res.id }}"> <div class="resource-title-container"> @@ -35,9 +36,9 @@ {% endif %} {% endblock %} </div> - {% if res.format %} + {% if res_format %} <a href="{{ download }}" > - <div class="dataformat-label resource-dataformat-label label" style='font-size:{{150/(res.format|length)}}px'>{{res.format}}</div> + <div class="dataformat-label resource-dataformat-label label" style='font-size:{{150/(res_format|length)}}px'>{{res_format}}</div> </a> {% endif %} </div> diff --git a/ckanext/odsh/templates/snippets/package_item.html b/ckanext/odsh/templates/snippets/package_item.html index b0918d3e68682688b5e93514aa556d969b320f13..6586f137ab29e9cad35ae26fffe81162f6acddbe 100644 --- a/ckanext/odsh/templates/snippets/package_item.html +++ b/ckanext/odsh/templates/snippets/package_item.html @@ -121,8 +121,8 @@ Example: {% for resource in h.dict_list_reduce(package.resources, 'format') %} <li> <a href="{{ h.url_for(controller='package', action='read', id=package.name) }}" class="label dataformat-label" - data-format="{{ resource.lower() }}">{{ - resource }}</a> + data-format="{{ resource.lower().replace('_srvc','') }}">{{ + resource.replace('_SRVC','') }}</a> </li> {% endfor %} {% endblock %}