Created
August 13, 2021 07:33
-
-
Save nikolayr/271a4ee16a83240602f2fd7a3dada339 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## inline-comments-export | |
## Macro title: Inline Comments Export | |
## Macro has a body: N | |
## | |
## Developed by: Stefan Baader, Nikolai Ruban | |
## Date created: 24/11/2018,2021 | |
## Installed by: | |
## @noparams | |
#set( $margin = 0 ) | |
#set( $inline_comments = $content.getComments() ) | |
########################################### | |
#macro( showInlineComments $allcomments ) | |
#foreach( $comment in $allcomments ) | |
#if( $comment.isInlineComment() ) | |
<hr> | |
<div> | |
#set( $cprops = $comment.getProperties() ) | |
<p style="font-size:x-small; color:grey; ">Author: $comment.getContentEntityObject().getCreator().getFullName()</p> | |
<p>Comment: $comment.getContentEntityObject().getBodyContent().getBody()</p> | |
<p>Selection: $cprops.getStringProperty("inline-original-selection")</p> | |
<p style="font-size:x-small; color:grey;">Status: $comment.getStatus().getValue().getStringValue()</p> | |
<p style="font-size:x-small; color: grey"> | |
#set($date = $comment.getContentEntityObject().getCreationDate() ) | |
$action.formatFriendlyDate($date) | |
</p> | |
</div> | |
#end | |
#set( $commentChilds = $comment.getChildren() ) | |
#showInlineComments ( $commentChilds ) | |
#end | |
#end | |
########################################### | |
<style> | |
@media screen { | |
#showInlineCommentsInBody {display: none;} | |
} | |
</style> | |
<div id="showInlineCommentsInBody"> | |
<h2>Inline Comments</h2> | |
#showInlineComments ( $inline_comments ) | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment