Skip to content

Commit

Permalink
MWEBPM-9 : Retrieve agenda id/title or news folder id/title and displ…
Browse files Browse the repository at this point in the history
…ay it in "common templates" carousel
  • Loading branch information
boulch committed Mar 27, 2024
1 parent 781e3fa commit bb46503
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Changelog
1.2.39 (unreleased)
-------------------

- MWEBPM-9 : Retrieve agenda id/title or news folder id/title and display it in "common templates" carousel
[boulch]

- MWEBPM-8 : Add "min" or "max" to queries depending to "only past events"
[thomlamb]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
open_in_new_tab item/open_in_new_tab | nothing;">
<a tal:omit-tag="not: item/url"
tal:attributes="href item/url;
target python:'_blank' if (open_in_new_tab and not can_edit_sections) else ''">
class item/container_id | nothing;
target python:'_blank' if (open_in_new_tab and not can_edit_sections) else ''">
<div class="swiper-image"
tal:condition="python: item_has_image and show_lead_image"
tal:attributes="style string:background-image:url(${item/image});
Expand All @@ -64,6 +65,7 @@
tal:condition="item/category | nothing">
<span tal:content="item/category" />
</div>
<div class="auth_source_container_title" tal:content="item/container_title | nothing"></div>
<div class="swiper_date"
tal:condition="context/show_items_date | nothing">
<tal:if tal:condition="item/effective | nothing">
Expand Down
3 changes: 3 additions & 0 deletions src/imio/smartweb/core/contents/sections/events/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def items(self):
)
params = [
selected_item,
"metadata_fields=container_uid",
"metadata_fields=category_title",
"metadata_fields=start",
"metadata_fields=end",
Expand Down Expand Up @@ -69,6 +70,8 @@ def items(self):
"category": item["category_title"],
"event_date": date_dict,
"url": f"{linking_view_url}/{item_id}?u={item_uid}",
"container_id": item.get("usefull_container_id", None),
"container_title": item.get("usefull_container_title", None),
"has_image": item["has_leadimage"],
"image": f"{item_url}/@@images/image/{orientation}_{image_scale}?cache_key={modified_hash}",
}
Expand Down

0 comments on commit bb46503

Please sign in to comment.