... |
... |
@@ -94,15 +94,29 @@ |
94 |
94 |
== Images and Videos == |
95 |
95 |
|
96 |
96 |
{{velocity}} |
|
97 |
+#panelheader('Gallery') |
|
98 |
+ |
97 |
97 |
#set($attachments = $doc.getAttachmentList()) |
|
100 |
+#set($imageCount = 0) |
98 |
98 |
|
99 |
|
-{{gallery}} |
100 |
100 |
#foreach($attachment in $attachments) |
101 |
101 |
#if($attachment.filename.endsWith(".jpg") || $attachment.filename.endsWith(".png") || $attachment.filename.endsWith(".webp")) |
102 |
|
- image:$attachment.filename |
|
104 |
+ #set($imageCount = $imageCount + 1) |
103 |
103 |
#end |
104 |
104 |
#end |
105 |
|
-{{/gallery}} |
|
107 |
+ |
|
108 |
+#if($imageCount > 0) |
|
109 |
+ {{gallery}} |
|
110 |
+ #foreach($attachment in $attachments) |
|
111 |
+ #if($attachment.filename.endsWith(".jpg") || $attachment.filename.endsWith(".png") || $attachment.filename.endsWith(".webp")) |
|
112 |
+ image:$attachment.filename |
|
113 |
+ #end |
|
114 |
+ #end |
|
115 |
+ {{/gallery}} |
|
116 |
+#end |
|
117 |
+ |
|
118 |
+#panelfooter() |
106 |
106 |
{{/velocity}} |
107 |
107 |
|
|
121 |
+ |
108 |
108 |
{{putFootnotes/}} |