diff --git a/ckanext/smdh/templates/package/resource_read.html b/ckanext/smdh/templates/package/resource_read.html index cc3540f..e9994e6 100644 --- a/ckanext/smdh/templates/package/resource_read.html +++ b/ckanext/smdh/templates/package/resource_read.html @@ -1,7 +1,49 @@ {% ckan_extends %} {% block resource_actions_inner %} - {{ super() }} + {% if h.check_access('package_update', {'id':pkg.id }) and not is_activity_archive %} +
  • {% link_for _('Manage'), named_route=pkg.type ~ '_resource.edit', id=pkg.name, resource_id=res.id, class_='btn + btn-default', icon='wrench' %}
  • + {% endif %} + {% if res.url and h.is_url(res.url) %} +
  • +
    + + {% 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') }} + {% elif not h.is_stream_resource(res) %} + {{ _('Download') }} + {% else %} + Download Preview + {% endif %} + + {% block download_resource_button %} + {% if res.datastore_active %} + + + {% endif %} + {% endblock %} +
    +
  • + {% endif %} + {% if h.check_access('package_update', {'id':pkg.id }) and not is_activity_archive %}
  • {% set loading_text = _('Loading...') %}