- {% block package_info_inner %}
- {% block heading %}
-
{{ h.dataset_display_name(pkg) }}
- {% endblock %}
- {% block nums %}
- {% set num_followers = h.follow_count('dataset', pkg.id) %}
-
-
- - {{ _('Followers') }}
- - {{ h.SI_number_span(num_followers) }}
-
-
- {% endblock %}
- {% block follow_button %}
- {% if not hide_follow_button %}
-
-
- {% endif %}
-{% endblock %}
+
+ {% endif %}
+ {% endblock %}
+
\ No newline at end of file
diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/qrcdode_show.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/qrcdode_show.html
new file mode 100644
index 0000000..a0ec361
--- /dev/null
+++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/qrcdode_show.html
@@ -0,0 +1,6 @@
+{% set qr_code_image = h.d4science_get_qrcode_for_url(package_url) %}
+{% block package_qrcode_for_url %}
+
+{% endblock %}
+
+
\ No newline at end of file
diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resource_item.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resource_item.html
index 31d1c56..0f668fc 100644
--- a/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resource_item.html
+++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resource_item.html
@@ -1,82 +1,108 @@
-{#
- Renders a single resource with icons and view links.
-
- res - A resource dict to render
- pkg - A package dict that the resource belongs to
- can_edit - Whether the user is allowed to edit the resource
- url_is_edit - Whether the link to the resource should be to editing it (set to False to make the link view the resource)
- url - URL of the resource details page(resource edit/read depending on url_is_edit, by default).
-
- Example:
-
- {% snippet "package/snippets/resource_item.html", res=resource, pkg=pkg, can_edit=True, url_is_edit=False %}
-
-#}
-{% set url_action = pkg.type ~ ('_resource.edit' if url_is_edit and can_edit else '_resource.read') %}
-{% set url = url or h.url_for(url_action, id=pkg.name, resource_id=res.id) %}
-
+{% set can_edit = h.check_access('package_update', {'id':pkg.id }) %}
+{% set url_action = 'resource_edit' if url_is_edit and can_edit else 'resource_read' %}
+{# {% set url = h.url_for(controller='package', action=url_action, id=pkg.name, resource_id=res.id) %} #}
+{% set url = h.url_for('dataset_resource.read', id=pkg.name, resource_id=res.id) %}
+{# Added by Francesco Mangiacrapa block custom_view_on_resources see:4851 #}
+{% block custom_view_on_resources %}
+{% set user = c.user %}
+{% if user %}
{% block resource_item_title %}
- {{ h.resource_display_name(res) | truncate(50) }}{{ h.get_translated(res, 'format') }}
- {{ h.popular('views', res.tracking_summary.total, min=10) if res.tracking_summary }}
+ {{ h.resource_display_name(res) | truncate(50) }}{{ res.format }}
+ {{ h.popular('views', res.tracking_summary.total, min=10) }}
{% endblock %}
{% block resource_item_description %}
{% if res.description %}
- {{ h.markdown_extract(h.get_translated(res, 'description'), extract_length=80) }}
+ {{ h.markdown_extract(res.description, extract_length=80) }}
{% endif %}
{% endblock %}
{% block resource_item_explore %}
{% if not url_is_edit %}
+ {# Only if can edit, explorer button is shown with several facility #}
+ {% if can_edit %}
+ {% else %}
+
+ {{ _('Go to resource') }}
+
+ {% endif %}
{% endif %}
{% endblock %}
+{% else %}
+ {% block resource_item_title2 %}
+ {# Updated by Francesco Mangiacrapa, see: #10056 #}
+
+ {{ h.resource_display_name(res) | truncate(50) }}{{ res.format }}
+ {{ h.popular('views', res.tracking_summary.total, min=10) }}
+
+ {% endblock %}
+
+{% endif %}
+{% endblock %}
+
diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resources_list.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resources_list.html
index 9c6dd63..3ab3b78 100644
--- a/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resources_list.html
+++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/package/snippets/resources_list.html
@@ -1,37 +1,77 @@
-{#
+{#
Renders a list of resources with icons and view links.
-
- resources - A list of resources (dicts) to render
- pkg - A package dict that the resources belong to.
-
+
+ resources - A list of resources to render
+ pkg - A package object that the resources belong to.
+
Example:
-
- {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %}
-
+
+ {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %}
+
#}
-
-
- {{ _('Data and Resources') }}
- {% block resource_list %}
- {% if resources %}
-
- {% block resource_list_inner %}
- {% set can_edit = can_edit or h.check_access('package_update', {'id':pkg.id }) %}
- {% for resource in resources %}
- {% snippet 'package/snippets/resource_item.html', pkg=pkg, res=resource, can_edit=can_edit %}
- {% endfor %}
- {% endblock %}
-
- {% else %}
- {% block resource_list_empty %}
- {% if h.check_access('resource_create', {'package_id': pkg['id']}) %}
- {% trans url=h.url_for(pkg.type ~ '_resource.new', id=pkg.name) %}
- This dataset has no data, why not add some?
- {% endtrans %}
- {% else %}
- {{ _('This dataset has no data') }}
- {% endif %}
- {% endblock %}
+
+
+
+
+ {{ _('Data and Resources') }}
+ {% set user = c.user %}
+ {# Added by Francesco Mangiacrapa #10389 #}
+ {% if not user %}
+ To access the resources you must log in
{% endif %}
- {% endblock %}
-
+ {# end #}
+ {% block resource_list %}
+ {% if resources %}
+
+ {% block resource_list_inner %}
+ {% for resource in resources %}
+ {% snippet 'package/snippets/resource_item.html', pkg=pkg, res=resource %}
+ {% endfor %}
+ {% endblock %}
+
+ {% else %}
+ {% if h.check_access('resource_create', {'package_id': pkg['id']}) %}
+ {% trans url=h.url_for(controller='package', action='new_resource', id=pkg.name) %}
+ This dataset has no data, why not add some?
+ {% endtrans %}
+ {% else %}
+ {{ _('This dataset has no data') }}
+ {% endif %}
+ {% endif %}
+ {% endblock %}
+
+
\ No newline at end of file
diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/tag_list.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/tag_list.html
index 77f753e..52c9c8d 100644
--- a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/tag_list.html
+++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/tag_list.html
@@ -13,7 +13,7 @@