diff --git a/invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html b/invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html index 87f73ef43..6c4e12089 100644 --- a/invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html +++ b/invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html @@ -1,10 +1,10 @@ {% macro render_depth_one_collection(community, tree, collection) %} {% set root_collection=collection[collection.root] %} -
+
{% set logo_url = url_for("static", filename="images/collections/" ~ root_collection.slug ~ ".jpg") %}
- -
+
diff --git a/invenio_app_rdm/communities_ui/views/communities.py b/invenio_app_rdm/communities_ui/views/communities.py index f81f806c8..4ab760bee 100644 --- a/invenio_app_rdm/communities_ui/views/communities.py +++ b/invenio_app_rdm/communities_ui/views/communities.py @@ -54,7 +54,7 @@ def communities_detail(pid_value, community, community_ui): def communities_home(pid_value, community, community_ui): """Community home page.""" query_params = request.args - + collections_service = current_rdm_records.collections_service permissions = community.has_permissions_to(HEADER_PERMISSIONS) if not permissions["can_read"]: raise PermissionDeniedError() @@ -94,6 +94,8 @@ def communities_home(pid_value, community, community_ui): expand=True, ) + collections = collections_service.list_trees(g.identity, community.id, depth=0) + # TODO resultitem does not expose aggregations except labelled facets _metric_aggs = recent_uploads._results.aggregations metrics = { @@ -113,6 +115,7 @@ def communities_home(pid_value, community, community_ui): permissions=permissions, records=records_ui, metrics=metrics, + collections=collections.to_dict(), )