Skip to content

Commit

Permalink
add a search button to the control panel tiddler fields tab
Browse files Browse the repository at this point in the history
  • Loading branch information
pmario committed Apr 19, 2024
1 parent a081e58 commit dca626d
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions core/wiki/allfields.tid
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
title: $:/snippets/allfields

\whitespace trim
\import [[$:/core/ui/ControlPanel/Basics]]

\define renderfield(title)
<tr class="tc-view-field"><td class="tc-view-field-name">''<$text text=<<__title__>>/>'':</td><td class="tc-view-field-value">//{{$:/language/Docs/Fields/$title$}}//</td></tr>
<tr class="tc-view-field">
<td class="tc-view-field-name">
''<$text text=<<__title__>>/>'':
</td>
<td class="tc-view-field-value">
//<$text text={{$:/language/Docs/Fields/$title$}}/>//
</td>
<td class="tc-view-field-links">
<<show-filter-count "[has[$title$]sort[]]">>
</td>
</tr>
\end
\whitespace trim

\define renderfieldHeader()
<tr class="tc-view-field">
<th class="tc-view-field-name">
''Name'':
</th>
<th class="tc-view-field-value">
''Description''
</th>
<th class="tc-view-field-links">
''Links''
</th>
</tr>
\end

<table class="tc-view-field-table">
<tbody>
<$list filter="[fields[]sort[title]]" variable="listItem">
<$macrocall $name="renderfield" title=<<listItem>>/>
</$list>
</tbody>
<tbody>
<<renderfieldHeader>>
<$list filter="[fields[]sort[title]]" variable="listItem">
<$macrocall $name="renderfield" title=<<listItem>>/>
</$list>
</tbody>
</table>

0 comments on commit dca626d

Please sign in to comment.