From c9dd4a4eb4c6e709a213a3c2f155043347ce3661 Mon Sep 17 00:00:00 2001 From: Daniele Andreotti Date: Wed, 19 Feb 2025 14:56:48 +0100 Subject: [PATCH] updated trasparenza view --- CHANGES.rst | 2 +- .../plone/policy/browser/trasparenza.py | 24 ++++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4226909..629ac88 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changelog 5.0.15 (unreleased) ------------------- -- Nothing changed yet. +- Updated trasparenza view [daniele]. 5.0.14 (2025-02-06) diff --git a/src/design/plone/policy/browser/trasparenza.py b/src/design/plone/policy/browser/trasparenza.py index 13bfba2..1ed1a7d 100644 --- a/src/design/plone/policy/browser/trasparenza.py +++ b/src/design/plone/policy/browser/trasparenza.py @@ -133,25 +133,21 @@ def generate_listing_query(obj): title_uuid = str(uuid4()) listing_uuid = str(uuid4()) data = {} - query = [ - { - "i": "path", - "o": "plone.app.querystring.operation.string.path", - "v": "{uid}::1".format(uid=getattr(obj, "_plone.uuid")), - } - ] + data["blocks"] = { title_uuid: {"@type": "title"}, listing_uuid: { "@type": "listing", "block": listing_uuid, - "query": [], - "querystring": { - "query": query, - "sort_on": obj.get("sort_on", "getObjPositionInParent"), - "sort_order": obj.get("sort_reversed", False), - "b_size": obj.get("item_count", "30"), - }, + "headlineTag": "h2", + "variation": "simpleCard", + "show_icon": "true", + "hide_dates": "false", + "show_section": "true", + "show_type": "false", + "show_description": "true", + "show_detail_link": "false", + "show_path_filters": "false", }, } data["blocks_layout"] = {"items": [title_uuid, listing_uuid]}