{% set can_edit = h.check_access('package_update', {'id':pkg.id }) %} {% set url_action = 'resource_edit' if url_is_edit and can_edit else 'resource_read' %} {% set url = h.url_for(controller='package', action=url_action, id=pkg.name, resource_id=res.id) %}
  • {# Added by Francesco Mangiacrapa block custom_view_on_resources see:4851 #} {% block custom_view_on_resources %} {% set user = c.user %} {% if user %} {% block resource_item_title %} {{ h.resource_display_name(res) | truncate(50) }}{{ res.format }} {{ h.popular('views', res.tracking_summary.total, min=10) }} {% endblock %} {% block resource_item_description %}

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

    {% endblock %} {% block resource_item_explore %} {% if not url_is_edit %} {# Only if can edit, explorer button is shown with several facility #} {% if can_edit %} {% else %} {{ _('Go to resource') }} {% endif %} {% endif %} {% endblock %} {% else %} {% block resource_item_title2 %} {# Updated by Francesco Mangiacrapa, see: #10056 #} {{ h.resource_display_name(res) | truncate(50) }}{{ res.format }} {{ h.popular('views', res.tracking_summary.total, min=10) }} {% endblock %}
    {% block resource_item_description2 %}

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

    {% endblock %} The resource: '{{ h.resource_display_name(res) | truncate(30) }}' is not accessible as guest user. You must login to access it!
    {% endif %} {% endblock %}