File tree Expand file tree Collapse file tree 3 files changed +59
-29
lines changed
ckanext/versions/templates/package Expand file tree Collapse file tree 3 files changed +59
-29
lines changed Original file line number Diff line number Diff line change 1
1
{% extends "package/resource_read.html" %}
2
2
3
+
4
+ {% block resource_actions_inner %}
5
+ < li >
6
+ < div class ="btn-group ">
7
+ < a class ="btn btn-primary resource-url-analytics " href ="{{ res.url }} ">
8
+ {% if res.resource_type in ('listing', 'service') %}
9
+ < i class ="fa fa-eye "> </ i > {{ _('View') }}
10
+ {% elif res.resource_type == 'api' %}
11
+ < i class ="fa fa-key "> </ i > {{ _('API Endpoint') }}
12
+ {% elif not res.has_views and not res.url_type == 'upload' %}
13
+ < i class ="fa fa-external-link "> </ i > {{ _('Go to resource') }}
14
+ {% else %}
15
+ < i class ="fa fa-arrow-circle-down "> </ i > {{ _('Download') }}
16
+ {% endif %}
17
+ </ a >
18
+ {% block download_resource_button %}{% endblock download_resource_button %}
19
+ </ div >
20
+ </ li >
21
+ {% endblock %}
22
+
3
23
{% block action_manage %}
4
24
{% endblock action_manage %}
5
25
19
39
{% endblock %}
20
40
21
41
{% block data_preview %}
22
-
23
42
{% endblock %}
24
43
25
44
Original file line number Diff line number Diff line change 1
1
{% set versions = h.get_package_version_list(pkg.id) %}
2
2
{% if versions|length > 0 %}
3
3
4
- < h3 > Versions</ h3 >
4
+ < section class ="version-info ">
5
+ < h3 > Versions</ h3 >
5
6
6
- < table class ="table table-striped table-bordered table-condensed ">
7
- < thead >
8
- < tr >
9
- < th scope ="col "> Version</ th >
10
- < th scope ="col "> Notes</ th >
11
- < th scope ="col "> Published</ th >
12
- </ tr >
13
- </ thead >
14
- < tbody >
15
- {% for version in h.get_package_version_list(pkg.id) %}
16
- < tr >
17
- < td >
18
- {% if (loop.first) %}
19
- {{ version.name }} < span class ="badge bg-success pull-right "> Latest</ span >
20
- {% else %}
21
- < a href ="{{ url_for('dataset_version.view_dataset', id=pkg.id, version_id=version.id) }} ">
22
- {{ version.name }}
23
- </ a >
24
- {% endif %}
25
- </ td >
26
- < td > {{ version.notes or "" }}</ td >
27
- < td > {{ version.created }}</ td >
28
- </ tr >
29
- {% endfor %}
7
+ < table class ="table table-striped table-bordered table-condensed ">
8
+ < thead >
9
+ < tr >
10
+ < th scope ="col "> Version</ th >
11
+ < th scope ="col "> Notes</ th >
12
+ < th scope ="col "> Published</ th >
13
+ </ tr >
14
+ </ thead >
15
+ < tbody >
16
+ {% for version in h.get_package_version_list(pkg.id) %}
17
+ < tr >
18
+ < td >
19
+ {% if (loop.first) %}
20
+ {{ version.name }} < span class ="badge bg-success pull-right "> Latest</ span >
21
+ {% else %}
22
+ < a href ="{{ url_for('dataset_version.view_dataset', id=pkg.id, version_id=version.id) }} ">
23
+ {{ version.name }}
24
+ </ a >
25
+ {% endif %}
26
+ </ td >
27
+ < td > {{ version.notes or "" }}</ td >
28
+ < td > {{ version.created }}</ td >
29
+ </ tr >
30
+ {% endfor %}
30
31
31
- </ tbody >
32
- </ table >
32
+ </ tbody >
33
+ </ table >
34
+ </ section >
33
35
{% endif %}
Original file line number Diff line number Diff line change 11
11
{% endtrans %}
12
12
</ div >
13
13
{% endblock %}
14
-
15
14
{{ super() }}
16
15
{% endblock package_description %}
17
16
21
20
22
21
{% block content_action %}
23
22
{% endblock %}
23
+
24
+ {% block package_additional_info %}
25
+ {% if h.scheming_plugin_enabled() %}
26
+ {%- set schema = h.scheming_get_dataset_schema(dataset_type) -%}
27
+ {% snippet "scheming/package/snippets/additional_info.html",
28
+ pkg_dict=pkg, dataset_type=dataset_type, schema=schema %}
29
+ {% else %}
30
+ {{ block.super }} {# Use block.super to call the parent block in Jinja2 #}
31
+ {% endif %}
32
+ {% endblock %}
You can’t perform that action at this time.
0 commit comments