This commit is contained in:
Mario Pietsch 2024-05-03 00:49:27 +02:00 committed by GitHub
commit 351c596168
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 45 additions and 14 deletions

View File

@ -2,23 +2,23 @@ title: $:/core/ui/ControlPanel/Basics
tags: $:/tags/ControlPanel/Info
caption: {{$:/language/ControlPanel/Basics/Caption}}
\define lingo-base() $:/language/ControlPanel/Basics/
\procedure lingo-base() $:/language/ControlPanel/Basics/
\define show-filter-count(filter)
\whitespace trim
\procedure show-filter-count(filter)
<$button class="tc-btn-invisible">
<$action-setfield $tiddler="$:/temp/advancedsearch" $value="""$filter$"""/>
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value="""$filter$"""/>
<$action-setfield $tiddler="$:/temp/advancedsearch" $value=<<filter>>/>
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value=<<filter>>/>
<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/>
<$action-setfield $tiddler="$:/state/tab--1498284803" $value="$:/core/ui/AdvancedSearch/Filter"/>
<$action-navigate $to="$:/AdvancedSearch"/>
<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/>
''<$count filter="""$filter$"""/>''
''<$count filter=<<filter>>/>''
&#32;
{{$:/core/images/advanced-search-button}}
</$button>
\end
\whitespace trim
|tc-max-width tc-edit-max-width|k
|<<lingo Version/Prompt>> |''<<version>>'' |

View File

@ -1,13 +1,44 @@
title: $:/snippets/allfields
\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>
\end
\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>
<$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>