Skip to content
Snippets Groups Projects
Select Git revision
  • 8f865789b867611b54a196fff6285fbc7526696f
  • master default protected
  • add-frequency-to-form
  • dev protected
  • ckan-2.11.0
  • add-package-custom-fields
  • fix-adding-datasets-for-users-and-editors
  • add-auth-subroute
  • 71-migrate-custom-fields-to-ckanext-scheming
  • add-author-maintainer-information
  • fix-inline-flex-btns
  • fix-known-spatial-uri-validation
  • py3
  • 47-aktuelle-resource-einer-collection-wird-nicht-mehr-gefunden
  • 10-eingabe-der-dct-accrualperiodicity-in-weboberflache
  • v1.3
  • 2.5.3
  • 2.5.2
  • 2.5.1
  • 2.5.0
  • 2.4.7
  • 2.4.6
  • 2.4.5
  • 2.4.4
  • 2.4.3
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.1
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.4.3
  • 1.4.2
  • 1.4.1
36 results

resources_list.html

Blame
  • resources_list.html 1.19 KiB
    {#
    Renders a list of resources with icons and view links.
    
    resources - A list of resources to render
    pkg - A package object that the resources belong to.
    
    Example:
    
      {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %}
    
    #}
    <section id="dataset-resources" class="resources">
      <h3>{{ _('Files') }}:</h3>
      {% block resource_list %}
        {% if resources %}
          <ul class="{% block resource_list_class %}resource-list{% endblock %}">
            {% block resource_list_inner %}
              {% set can_edit = h.check_access('package_update', {'id':pkg.id }) %}
              {% for resource in resources %}
                {% snippet 'package/snippets/resource_item.html', pkg=pkg, res=resource, can_edit=can_edit %}
              {% endfor %}
            {% endblock %}
          </ul>
        {% else %}
          {% if h.check_access('resource_create', {'package_id': pkg['id']}) %}
              {% trans url=h.url_for('resource.new', id=pkg.name) %}
                <p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a></p>
              {% endtrans %}
          {% else %}
              <p class="empty">{{ _('This dataset has no data') }}</p>
          {% endif %}
        {% endif %}
        {% endblock %}
    </section>