{# Displays a sidebar module with navigation containing the provided resources. If no resources are provided then the module will not be displayed. pkg - The package dict that owns the resources. active - The id of the currently displayed resource. action - The resource action to use (default: 'read', meaning route 'resource.read'). Example: {% snippet "package/snippets/resources.html", pkg=pkg, active=res.id %} #} {% set resources = pkg.resources or [] %} {% set can_edit = pkg and h.check_access('package_update', {'id':pkg.id }) %} {% if pkg and resources %} {% block resources %}
{% block resources_inner %} {% block resources_title %}

{{ _("Resources") }}

{% endblock %} {% block resources_list %} {% endblock %} {% endblock %}
{% endblock %} {% endif %} {% if can_edit and not is_activity_archive %}
{% link_for _('Add new resource'), named_route=pkg.type ~ '_resource.new', id=pkg.name, class_='btn btn-default btn-sm', icon='plus' %}
{% endif %}