mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +00:00
Comment plugin: Add link to top post
This commit is contained in:
parent
e84c422e50
commit
16c1cbee29
|
@ -2,15 +2,39 @@ title: $:/plugins/tiddlywiki/comments/header-view-template-segment
|
||||||
tags: $:/tags/ViewTemplate
|
tags: $:/tags/ViewTemplate
|
||||||
list-before: $:/core/ui/ViewTemplate/body
|
list-before: $:/core/ui/ViewTemplate/body
|
||||||
|
|
||||||
|
\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">
|
<$list filter="[all[current]role[comment]]" variable="ignore">
|
||||||
<div class="tc-is-comment-header">
|
<div class="tc-is-comment-header">
|
||||||
This tiddler is a comment on:
|
<p>
|
||||||
<ul>
|
This tiddler a comment on
|
||||||
<$list filter="[list<currentTiddler>sort[title]]">
|
<$list filter="[list<currentTiddler>sort[title]]">
|
||||||
|
<<find-original-comment>>
|
||||||
|
</$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>
|
<li>
|
||||||
<$link to=<<currentTiddler>>><$text text=<<currentTiddler>>/></$link>
|
<$link to=<<currentTiddler>>><$text text=<<currentTiddler>>/></$link>
|
||||||
</li>
|
</li>
|
||||||
</$list>
|
</$list>
|
||||||
</ul>
|
</ul>
|
||||||
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
</$list>
|
</$list>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user