diff --git a/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html index 3c7695aca..a65b6c61d 100644 --- a/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +++ b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html @@ -397,6 +397,30 @@

{{ _("Request access") }}

+
+
+

Activity Log

+
+ {% for event in logs %} +
+
+ +
+
+
+ User {{ event["_source"]["user"]["id"] }} {{ event["_source"]["message"] }} +
{{ event["_source"]["@timestamp"] }}
+
+
+
+ {% endfor %} +
+
+
+
diff --git a/invenio_app_rdm/records_ui/views/records.py b/invenio_app_rdm/records_ui/views/records.py index 428755fd4..e91476c37 100644 --- a/invenio_app_rdm/records_ui/views/records.py +++ b/invenio_app_rdm/records_ui/views/records.py @@ -227,6 +227,7 @@ def record_detail( else None ) theme = resolved_community.get("theme", {}) if resolved_community else None + logs = current_app.datastream_logger.search("audit", record.id) return render_community_theme_template( current_app.config.get("APP_RDM_RECORD_LANDING_PAGE_TEMPLATE"), @@ -258,6 +259,7 @@ def record_detail( record_owner_id=( record_owner.get("id") ), # record created with system_identity have not owners e.g demo + logs=logs, )