45 lines
1.0 KiB
Plaintext
45 lines
1.0 KiB
Plaintext
title: $:/snippets/allfields
|
|
|
|
\whitespace trim
|
|
\import [[$:/core/ui/ControlPanel/Basics]]
|
|
|
|
\function tf.getLingoText() [[$:/language/Docs/Fields/]] [<title>] +[join[]get[text]]
|
|
|
|
\procedure renderfield(title)
|
|
<tr class="tc-view-field">
|
|
<td class="tc-view-field-name">
|
|
''<$text text=<<title>>/>'':
|
|
</td>
|
|
<td class="tc-view-field-value">
|
|
//<<tf.getLingoText>>//
|
|
</td>
|
|
<td class="tc-view-field-links">
|
|
<!-- show-filter-count expects a filter string. It does no more processing -->
|
|
<$macrocall $name="show-filter-count" filter=`[has[$(title)$]sort[]]`>>
|
|
</td>
|
|
</tr>
|
|
\end
|
|
|
|
\procedure 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">
|
|
''Show Links''
|
|
</th>
|
|
</tr>
|
|
\end
|
|
|
|
<table class="tc-view-field-table">
|
|
<tbody>
|
|
<<renderfieldHeader>>
|
|
<$list filter="[fields[]sort[title]]" variable="listItem">
|
|
<$macrocall $name="renderfield" title=<<listItem>>/>
|
|
</$list>
|
|
</tbody>
|
|
</table>
|