1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-10-31 23:26:18 +00:00
TiddlyWiki5/plugins/tiddlywiki/comments/header-view-template-segment.tid

41 lines
1.2 KiB
Plaintext
Raw Normal View History

title: $:/plugins/tiddlywiki/comments/header-view-template-segment
tags: $:/tags/ViewTemplate
list-before: $:/core/ui/ViewTemplate/body
2019-11-02 09:31:36 +00:00
\define display-original-comment()
<$link><$text text=<<currentTiddler>>/></$link>
\end
\define find-original-comment(exclude)
<$list filter="[<currentTiddler>role[comment]]" emptyMessage=<<display-original-comment>> variable="ignore">
<$list filter="[list<currentTiddler>sort[title]] -[enlist<__exclude__>]">
<$set name="newExclude" filter="[enlist<__exclude__>] [<currentTiddler>]">
<$macrocall $name="find-original-comment" exclude=<<newExclude>>/>
</$set>
</$list>
</$list>
\end
<$list filter="[all[current]role[comment]]" variable="ignore">
<div class="tc-is-comment-header">
2019-11-02 09:31:36 +00:00
<p>
2019-11-02 12:37:07 +00:00
This tiddler is a comment on
<$list filter="[list<currentTiddler>sort[title]]">
<span class="tc-small-gap-right"><<find-original-comment>></span>
2019-11-02 09:31:36 +00:00
</$list>
</p>
<$list filter="[list<currentTiddler>role[comment]sort[title]limit[1]]" variable="ignore">
<p>
Parent comments:
</p>
<ul>
<$list filter="[list<currentTiddler>role[comment]sort[title]]">
<li>
<$link to=<<currentTiddler>>><$text text=<<currentTiddler>>/></$link>
</li>
</$list>
</ul>
2019-11-02 09:31:36 +00:00
</$list>
</div>
</$list>