-
Notifications
You must be signed in to change notification settings - Fork 2k
/
resources_list.html
32 lines (28 loc) · 1.04 KB
/
resources_list.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{#
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>{{ _('Data and Resources') }}</h3>
{% block resource_list %}
{% if resources %}
<ul class="{% block resource_list_class %}resource-list{% endblock %}">
{% block resource_list_inner %}
{% for resource in resources %}
{% snippet 'package/snippets/resource_item.html', pkg=pkg, res=resource %}
{% endfor %}
{% endblock %}
</ul>
{% else %}
<p>
{# Comment out "add some" as action doesn't exist yet #}
{% trans url=h.url_for(controller='package', action='new_resource', id=pkg.name) %}
<p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a>
{% endtrans %}
</p>
{% endif %}
{% endblock %}
</section>