0 Votes

Changes for page SubmitIncidentMacro

Last modified by Ryan C on 2025/06/08 05:22

From version 2.9
edited by Ryan C
on 2025/06/08 03:48
Change comment: There is no comment for this version
To version 2.8
edited by Ryan C
on 2025/06/08 03:46
Change comment: There is no comment for this version

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -15,17 +15,13 @@
15 15   #end
16 16  #end
17 17  
18 -## Build incident block
18 +## Build incident block line by line
19 19  #set($block = "(% style=\"margin-bottom:20px; width:100%\" %)\n")
20 -#if ($resolvedImage && $resolvedImage != "")
21 - #set($block = "${block}|[[image:${resolvedImage}||data-xwiki-image-style=\"thumbnail-clickable\" style=\"border:1px solid #ccc\" width=\"200\"]]| \n")
22 -#else
23 - #set($block = "${block}|No image provided.| \n")
24 -#end
20 +#set($block = "${block}|[[image:${resolvedImage}||data-xwiki-image-style=\"thumbnail-clickable\" style=\"border:1px solid #ccc\" width=\"200\"]]| \n")
25 25  #set($block = "${block}\n=== [[$headline>>$url]] ===\n\n")
26 26  #set($block = "${block}$desc\n[[Read More>>$url]]")
27 27  
28 -## Append to current document
24 +## Append to current page
29 29  #set($doc = $xwiki.getDocument($doc.fullName))
30 30  #set($content = $doc.getContent())
31 31  $doc.setContent("${content}\n\n${block}")