From ad84a1e39ad3b9b8afcaa2f535d87aa873a88df2 Mon Sep 17 00:00:00 2001 From: Ayman Izzeldin Date: Wed, 9 Oct 2024 15:50:02 +0100 Subject: [PATCH] fix cooperative template extension (#8) use super to call to other extension instead of overwriting the whole block --- .../package/snippets/resource_item.html | 35 ++----------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/ckanext/generalpublic/templates/package/snippets/resource_item.html b/ckanext/generalpublic/templates/package/snippets/resource_item.html index aa371ca..fa7ecd2 100644 --- a/ckanext/generalpublic/templates/package/snippets/resource_item.html +++ b/ckanext/generalpublic/templates/package/snippets/resource_item.html @@ -2,38 +2,7 @@ {% block resource_item_explore_links %} {%if h.is_public(pkg.id) or c.userobj%} -
  • - - {% if not is_activity_archive and res.has_views %} - - {{ _('Preview') }} - {% else %} - - {{ _('More information') }} - {% endif %} - -
  • - {% if res.url and h.is_url(res.url) %} -
  • - - {% if res.has_views or res.url_type == 'upload' %} - - {{ _('Download') }} - {% else %} - - {{ _('Go to resource') }} - {% endif %} - -
  • - {% endif %} - {% if can_edit %} -
  • - - - {{ _('Edit') }} - -
  • - {% endif %} + {{ super() }} {% else %}
  • @@ -42,4 +11,4 @@
  • {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %}