# HG changeset patch
# User Thierry Florac
# Date 1558527394 -7200
# Node ID 8fc7bc61494bfbd770cffddd24165109109e9d2c
# Parent 669391ff83792ff5b893c9e6563a1c2c61489618
Added conditions on iterators contents using new "boolean_iter" TALES expression
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/association/templates/association-default.pt
--- a/src/pyams_default_theme/component/association/templates/association-default.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/association/templates/association-default.pt Wed May 22 14:16:34 2019 +0200
@@ -1,4 +1,6 @@
-
- ยง title
- ${structure:provider:pyams.associations(settings)}
+
+ ${view.title}
+ ${structure:viewlet}
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/association/templates/association-remote-content.pt
--- a/src/pyams_default_theme/component/association/templates/association-remote-content.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/association/templates/association-remote-content.pt Wed May 22 14:16:34 2019 +0200
@@ -1,8 +1,11 @@
+ define="settings view.settings;
+ items view.links;
+ (has_items, links) tales:boolean_iter(items);"
+ condition="has_items">
${title}
-
+
${i18n:target.title}
@@ -14,4 +17,4 @@
-
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/association/templates/association-viewlet.pt
--- a/src/pyams_default_theme/component/association/templates/association-viewlet.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/association/templates/association-viewlet.pt Wed May 22 14:16:34 2019 +0200
@@ -1,7 +1,12 @@
+ tal:define="items view.attachments;
+ (has_attachments, attachments) tales:boolean_iter(items);
+ items view.links;
+ (has_links, links) tales:boolean_iter(items);
+ renderer_style view.description_format + chr(59) + 'glossary'"
+ tal:condition="has_attachments or has_links">
-
+ tal:repeat="item attachments">
@@ -17,7 +22,7 @@
-
+
@@ -29,4 +34,4 @@
href="${href}" target="${target}">${link_info.user_title}
-
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/gallery/templates/renderer-carousel.pt
--- a/src/pyams_default_theme/component/gallery/templates/renderer-carousel.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/gallery/templates/renderer-carousel.pt Wed May 22 14:16:34 2019 +0200
@@ -1,38 +1,41 @@
-${view.title}
-
-
-
-
-
-
-
-
-
- ${structure:tales:media(image_data, alt=alt)}
-
-
-
${i18n:image.title}
-
- ${structure:tales:html(description)}
-
+
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/gallery/templates/renderer-default.pt
--- a/src/pyams_default_theme/component/gallery/templates/renderer-default.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/gallery/templates/renderer-default.pt Wed May 22 14:16:34 2019 +0200
@@ -1,31 +1,35 @@
-
${view.title}
-
-
-
${i18n:image.title}
-
- ${structure:tales:media(image_data, lg_thumb=lg_thumb, lg_width=3, md_thumb=md_thumb, md_width=4,
- sm_thumb=sm_thumb, sm_width=4, xs_thumb=xs_thumb, xs_width=6,
- css_class='img_responsive', alt=alt)}
-
-
${i18n:image.author}
+
+ ${view.title}
+
+
+
${i18n:image.title}
+
+ ${structure:tales:media(image_data, lg_thumb=lg_thumb, lg_width=3, md_thumb=md_thumb, md_width=4,
+ sm_thumb=sm_thumb, sm_width=4, xs_thumb=xs_thumb, xs_width=6,
+ css_class='img_responsive', alt=alt)}
+
+
${i18n:image.author}
+
-
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/keynumber/portlet/templates/horizontal-render.pt
--- a/src/pyams_default_theme/component/keynumber/portlet/templates/horizontal-render.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/keynumber/portlet/templates/horizontal-render.pt Wed May 22 14:16:34 2019 +0200
@@ -1,11 +1,15 @@
-
+
Teaser
- -
+
-
:
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/keynumber/portlet/templates/vertical-render.pt
--- a/src/pyams_default_theme/component/keynumber/portlet/templates/vertical-render.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/keynumber/portlet/templates/vertical-render.pt Wed May 22 14:16:34 2019 +0200
@@ -1,11 +1,15 @@
-
+
Teaser
- -
+
-
:
@@ -17,4 +21,4 @@
text
-
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/keynumber/templates/keynumber-default.pt
--- a/src/pyams_default_theme/component/keynumber/templates/keynumber-default.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/keynumber/templates/keynumber-default.pt Wed May 22 14:16:34 2019 +0200
@@ -1,7 +1,10 @@
-
+
${view.title}
+ tal:repeat="number keynumbers">
${i18n:number.label}
@@ -16,4 +19,4 @@
-
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/paragraph/templates/keypoints-default.pt
--- a/src/pyams_default_theme/component/paragraph/templates/keypoints-default.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/paragraph/templates/keypoints-default.pt Wed May 22 14:16:34 2019 +0200
@@ -1,5 +1,6 @@
+ tal:define="keypoints view.keypoints"
+ tal:condition="keypoints">
${view.title}
@@ -11,4 +12,4 @@
-
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/paragraph/templates/milestone-default.pt
--- a/src/pyams_default_theme/component/paragraph/templates/milestone-default.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/paragraph/templates/milestone-default.pt Wed May 22 14:16:34 2019 +0200
@@ -1,7 +1,10 @@
-
+
${view.title}
-
+
${i18n:item.title}
${i18n:item.label}
@@ -10,4 +13,4 @@
tal:condition="not:repeat.item.end()">>
-
\ No newline at end of file
+
\ No newline at end of file
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/component/paragraph/templates/pictogram-default.pt
--- a/src/pyams_default_theme/component/paragraph/templates/pictogram-default.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/component/paragraph/templates/pictogram-default.pt Wed May 22 14:16:34 2019 +0200
@@ -1,8 +1,11 @@
-
+
${view.title}
+ tal:repeat="picto_item pictograms">
diff -r 669391ff8379 -r 8fc7bc61494b src/pyams_default_theme/features/menu/portlet/navigation/templates/simple-carousel.pt
--- a/src/pyams_default_theme/features/menu/portlet/navigation/templates/simple-carousel.pt Wed Mar 27 09:06:41 2019 +0100
+++ b/src/pyams_default_theme/features/menu/portlet/navigation/templates/simple-carousel.pt Wed May 22 14:16:34 2019 +0200
@@ -1,17 +1,19 @@
+ links list(settings.links.get_visible_items());
+ cache_key tales:cache_key(settings);"
+ tal:condition="links">
-
-
- ${title}
+ links list(settings.links.get_visible_items();"
+ tal:condition="links">
+ ${title}