{% set can_edit = h.check_access('package_update', {'id':g.pkg.id }) %} {% set url_action = 'edit' if url_is_edit and can_edit else 'read' %} {% set url = h.url_for(controller='resource', action=url_action, id=g.pkg.name, resource_id=res.id) %}
  • {{ res.format }}
    {% block resource_item_title %} {{ h.resource_display_name(res) | truncate(50) }} {{ h.popular('views', res.tracking_summary.total, min=10) if res.tracking_summary }} {% endblock %} {% block resource_item_description %}

    {% if res.description %} {{ h.markdown_extract(res.description, extract_length=80) }} {% endif %}

    {{ h.get_resource_size(res) }}

    {% endblock %}
    {% block resource_item_explore %} {% if not url_is_edit %}
    {% endif %} {% endblock %}