-
Notifications
You must be signed in to change notification settings - Fork 2k
/
info.html
32 lines (28 loc) · 1.46 KB
/
info.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
{#
Displays a sidebard module with information for given package
pkg - The package dict that owns the resources.
active - The active resource.
action - The action that this is coming from.
Example:
{% snippet "package/snippets/info.html", pkg=pkg %}
#}
{% if pkg and h.check_access('package_update', {'id':pkg.id }) %}
<section class="module module-narrow package-info">
<h2 class="module-heading"><i class="icon-sitemap"></i> {{ _("Edit Dataset") }}</h2>
<ul class="unstyled nav nav-simple">
<li class="nav-item{% if action == 'package_edit' %} active{% endif %}">
{% link_for h.dataset_display_name(pkg)|truncate(30), controller='package', action='edit', id=pkg.name %}
</li>
</ul>
{% set resources = pkg.resources or [] %}
<h2 class="module-heading module-heading-secondary"><i class="icon-copy"></i> {{ _("Edit Resources") }}</h2>
<ul class="unstyled nav nav-simple">
{% for resource in resources %}
<li class="nav-item{{ ' active' if active == resource.id }}">
{% link_for h.resource_display_name(resource)|truncate(30), controller='package', action='resource_edit', id=pkg.name, resource_id=resource.id, inner_span=true %}
</li>
{% endfor %}
<li><a href="{{ h.url_for(controller='package', action='new_resource', id=pkg.name) }}" class="btn{% if action == 'resource_new' %} disabled{% endif %}"><i class="icon-plus"></i> {{ _('Add new resource') }}</a></li>
</ul>
</section>
{% endif %}