{% set url_action = 'edit' if url_is_edit and can_edit else 'read' %} {% set url = h.url_for('resource.'+url_action, id=pkg.name, resource_id=res.id) %} {# hack for correcting slave url if resource was uploaded #} {% set download = h.odsh_public_resource_url(res) or url %} {% set rtitle=h.resource_display_name(res) if res.name else ' '%} {% set resource_size = h.get_resource_size(res) %} {% set res_format = h.format_resource_format(res.format) %}
  • {% if res.name %} {% endif %} {% block resource_item_description %} {% if res.description or resource_size %}
    {% if res.description %}

    {{ h.markdown_extract(res.description, extract_length=0) }}

    {% endif %} {% if resource_size %}

    {{ _('File size') }}: {{ resource_size }}

    {% endif %}
    {% endif %} {% endblock %}
    {% block resource_item_explore_links %} {% if can_edit %}
    {% endif %} {% endblock %}
    {% if res_format %}
    {{ res_format }}
    {% endif %}