From 16c1cbee292604b2b8be36a15d5828893d132b20 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 2 Nov 2019 09:31:36 +0000 Subject: [PATCH] Comment plugin: Add link to top post --- .../comments/header-view-template-segment.tid | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/plugins/tiddlywiki/comments/header-view-template-segment.tid b/plugins/tiddlywiki/comments/header-view-template-segment.tid index 09f45d01d..2569b7947 100644 --- a/plugins/tiddlywiki/comments/header-view-template-segment.tid +++ b/plugins/tiddlywiki/comments/header-view-template-segment.tid @@ -2,15 +2,39 @@ title: $:/plugins/tiddlywiki/comments/header-view-template-segment tags: $:/tags/ViewTemplate list-before: $:/core/ui/ViewTemplate/body +\define display-original-comment() +<$link><$text text=<>/> +\end + +\define find-original-comment(exclude) +<$list filter="[role[comment]]" emptyMessage=<> variable="ignore"> +<$list filter="[listsort[title]] -[enlist<__exclude__>]"> +<$set name="newExclude" filter="[enlist<__exclude__>] []"> +<$macrocall $name="find-original-comment" exclude=<>/> + + + +\end + <$list filter="[all[current]role[comment]]" variable="ignore">
-This tiddler is a comment on: -
    +

    +This tiddler a comment on <$list filter="[listsort[title]]"> +<>  + +

    +<$list filter="[listrole[comment]sort[title]limit[1]]" variable="ignore"> +

    +Parent comments: +

    +
      +<$list filter="[listrole[comment]sort[title]]">
    • <$link to=<>><$text text=<>/>
    +