Skip to content

Commit

Permalink
Merge pull request #8 from datopian/fix/resource_truncate
Browse files Browse the repository at this point in the history
Truncate to 70 characters
  • Loading branch information
sagargg committed Oct 3, 2023
2 parents 629c899 + 2876dd1 commit 262291f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ckanext/ubdc/templates/package/snippets/resource_item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Extend the Resource Item Title to truncate to 70 Characters -->
{% ckan_extends %}

{% block resource_item_title %}
<a class="heading" href="{{ url }}" title="{{ res.name or res.description }}">
{{ h.resource_display_name(res) | truncate(70) }}<span class="format-label" property="dc:format"
data-format="{{ res.format.lower() or 'data' }}">{{ h.get_translated(res, 'format') }}</span>
{{ h.popular('views', res.tracking_summary.total, min=10) if res.tracking_summary }}
</a>
{% endblock %}

0 comments on commit 262291f

Please sign in to comment.