{% 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.tpsh_get_resource_size(res) %} {% set res_format = res.format.replace('_SRVC','') %}
  • {% if res.name %} {{ h.resource_display_name(res) }} {% endif %} {% if resource_size %}

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

    {% endif %} {% set number_of_pages = res.get('number_of_pages') %} {% if number_of_pages%}

    {{ _('Number of pages') }}: {{ number_of_pages }}

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