1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-05 03:33:27 +00:00
TiddlyWiki5/plugins/tiddlywiki/comments/comments-template.tid
Jermolene ec18a55033 Comments plugin: several enhancements
As proposed in #3378

* Experimental support for comments on the entire wiki (enable in the plugin config panel). Implemented as comments on $:/SiteTitle, with the comments appearing at the top of the story river
* Refactor the "add comment" button actions so that they can be reused
* Refactor the comment toolbar to be extensible via a system tag
* Add an $:/AdvancedSearch canned filter for accessing all comments
2018-08-07 21:37:07 +01:00

29 lines
1.0 KiB
Plaintext

title: $:/plugins/tiddlywiki/comments/comments-template
<div class="tc-comments">
<ol class="tc-comment-list">
<$list filter="[all[tiddlers+shadows]comment-target<currentTiddler>sort[created]!has[draft.of]]">
<li>
<div class="tc-comment-entry">
<div class="tc-comment-entry-heading">
<$link>{{!!creator}} at <$view field="modified" format="date" template="0hh:0mm:0ss DDD DDth MMM YYYY"/></$link>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/CommentToolbarButton]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$list>
</div>
<div class="tc-comment-entry-body">
<$reveal type="match" state="!!edit-mode" text="yes">
<$edit-text tiddler=<<currentTiddler>> tag="textarea"/>
</$reveal>
<$reveal type="nomatch" state="!!edit-mode" text="yes">
<$transclude tiddler=<<currentTiddler>> mode="block"/>
<$transclude tiddler="$:/plugins/tiddlywiki/comments/add-comment-button" mode="inline"/>
</$reveal>
</div>
</div>
<$transclude tiddler="$:/plugins/tiddlywiki/comments/comments-template" mode="inline"/>
</li>
</$list>
</ol>
</div>