Skip to content

Instantly share code, notes, and snippets.

@nikolayr
Created August 13, 2021 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikolayr/271a4ee16a83240602f2fd7a3dada339 to your computer and use it in GitHub Desktop.
Save nikolayr/271a4ee16a83240602f2fd7a3dada339 to your computer and use it in GitHub Desktop.
## 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