diff --git a/ckanext/versions/templates/package/resource_version.html b/ckanext/versions/templates/package/resource_version.html index 6ec20fb..e5339e8 100644 --- a/ckanext/versions/templates/package/resource_version.html +++ b/ckanext/versions/templates/package/resource_version.html @@ -1,5 +1,25 @@ {% extends "package/resource_read.html" %} + +{% block resource_actions_inner %} +
  • +
    + + {% if res.resource_type in ('listing', 'service') %} + {{ _('View') }} + {% elif res.resource_type == 'api' %} + {{ _('API Endpoint') }} + {% elif not res.has_views and not res.url_type == 'upload' %} + {{ _('Go to resource') }} + {% else %} + {{ _('Download') }} + {% endif %} + + {% block download_resource_button %}{% endblock download_resource_button %} +
    +
  • +{% endblock %} + {% block action_manage %} {% endblock action_manage %} @@ -19,7 +39,6 @@ {% endblock %} {% block data_preview %} - {% endblock %} diff --git a/ckanext/versions/templates/package/snippets/version_info.html b/ckanext/versions/templates/package/snippets/version_info.html index 4daee17..1da4b99 100644 --- a/ckanext/versions/templates/package/snippets/version_info.html +++ b/ckanext/versions/templates/package/snippets/version_info.html @@ -1,33 +1,35 @@ {% set versions = h.get_package_version_list(pkg.id) %} {% if versions|length > 0 %} -

    Versions

    +
    +

    Versions

    - - - - - - - - - - {% for version in h.get_package_version_list(pkg.id) %} - - - - - - {% endfor %} +
    VersionNotesPublished
    - {% if (loop.first) %} - {{ version.name }} Latest - {% else %} - - {{ version.name }} - - {% endif %} - {{ version.notes or "" }}{{ version.created }}
    + + + + + + + + + {% for version in h.get_package_version_list(pkg.id) %} + + + + + + {% endfor %} - -
    VersionNotesPublished
    + {% if (loop.first) %} + {{ version.name }} Latest + {% else %} + + {{ version.name }} + + {% endif %} + {{ version.notes or "" }}{{ version.created }}
    + + +
    {% endif %} \ No newline at end of file diff --git a/ckanext/versions/templates/package/version.html b/ckanext/versions/templates/package/version.html index e1888d6..ed4aa47 100644 --- a/ckanext/versions/templates/package/version.html +++ b/ckanext/versions/templates/package/version.html @@ -11,7 +11,6 @@ {% endtrans %} {% endblock %} - {{ super() }} {% endblock package_description %} @@ -21,3 +20,13 @@ {% block content_action %} {% endblock %} + +{% block package_additional_info %} + {% if h.scheming_plugin_enabled() %} + {%- set schema = h.scheming_get_dataset_schema(dataset_type) -%} + {% snippet "scheming/package/snippets/additional_info.html", + pkg_dict=pkg, dataset_type=dataset_type, schema=schema %} + {% else %} + {{ block.super }} {# Use block.super to call the parent block in Jinja2 #} + {% endif %} +{% endblock %} \ No newline at end of file