Add indentation to $:/TagManager (#6923)

This commit is contained in:
Mario Pietsch 2022-11-14 18:42:17 +01:00 committed by GitHub
parent 10cb585dae
commit aa5183a08e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 75 additions and 63 deletions

View File

@ -3,89 +3,101 @@ icon: $:/core/images/tag-button
color: #bbb color: #bbb
\define lingo-base() $:/language/TagManager/ \define lingo-base() $:/language/TagManager/
\define iconEditorTab(type) \define iconEditorTab(type)
\whitespace trim \whitespace trim
<$link to=""><<lingo Icons/None>></$link> <$link to=""><<lingo Icons/None>></$link>
<$list filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[sort[title]] +[$type$is[system]]"> <$list filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[sort[title]] +[$type$is[system]]">
<$link to={{!!title}}> <$link to={{!!title}}>
<$transclude/> <$view field="title"/> <$transclude/> <$view field="title"/>
</$link> </$link>
</$list> </$list>
\end \end
\define iconEditor(title) \define iconEditor(title)
\whitespace trim \whitespace trim
<div class="tc-drop-down-wrapper"> <div class="tc-drop-down-wrapper">
<$button popupTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} class="tc-btn-invisible tc-btn-dropdown">{{$:/core/images/down-arrow}}</$button> <$button popupTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} class="tc-btn-invisible tc-btn-dropdown">
<$reveal stateTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} type="popup" position="belowleft" text="" default=""> {{$:/core/images/down-arrow}}
<div class="tc-drop-down"> </$button>
<$linkcatcher actions="""<$action-setfield $tiddler=<<__title__>> icon=<<navigateTo>>/>"""> <$reveal stateTitle={{{ [[$:/state/popup/icon/]addsuffix<__title__>] }}} type="popup" position="belowleft" text="" default="">
<<iconEditorTab type:"!">> <div class="tc-drop-down">
<hr/> <$linkcatcher actions="""<$action-setfield $tiddler=<<__title__>> icon=<<navigateTo>>/>""">
<<iconEditorTab type:"">> <<iconEditorTab type:"!">>
</$linkcatcher> <hr/>
</div> <<iconEditorTab type:"">>
</$reveal> </$linkcatcher>
</div>
</$reveal>
</div> </div>
\end \end
\define toggleButton(state) \define toggleButton(state)
\whitespace trim \whitespace trim
<$reveal stateTitle=<<__state__>> type="match" text="closed" default="closed"> <$reveal stateTitle=<<__state__>> type="match" text="closed" default="closed">
<$button setTitle=<<__state__>> setTo="open" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected"> <$button setTitle=<<__state__>> setTo="open" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected">
{{$:/core/images/info-button}} {{$:/core/images/info-button}}
</$button> </$button>
</$reveal> </$reveal>
<$reveal stateTitle=<<__state__>> type="match" text="open" default="closed"> <$reveal stateTitle=<<__state__>> type="match" text="open" default="closed">
<$button setTitle=<<__state__>> setTo="closed" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected"> <$button setTitle=<<__state__>> setTo="closed" class="tc-btn-invisible tc-btn-dropdown" selectedClass="tc-selected">
{{$:/core/images/info-button}} {{$:/core/images/info-button}}
</$button> </$button>
</$reveal> </$reveal>
\end \end
\whitespace trim \whitespace trim
<table class="tc-tag-manager-table"> <table class="tc-tag-manager-table">
<tbody> <tbody>
<tr> <tr>
<th><<lingo Colour/Heading>></th> <th><<lingo Colour/Heading>></th>
<th class="tc-tag-manager-tag"><<lingo Tag/Heading>></th> <th class="tc-tag-manager-tag"><<lingo Tag/Heading>></th>
<th><<lingo Count/Heading>></th> <th><<lingo Count/Heading>></th>
<th><<lingo Icon/Heading>></th> <th><<lingo Icon/Heading>></th>
<th><<lingo Info/Heading>></th> <th><<lingo Info/Heading>></th>
</tr> </tr>
<$list filter="[tags[]!is[system]sort[title]]"> <$list filter="[tags[]!is[system]sort[title]]">
<tr> <tr>
<td><$edit-text field="color" tag="input" type="color"/></td> <td><$edit-text field="color" tag="input" type="color"/></td>
<td>{{||$:/core/ui/TagTemplate}}</td> <td>{{||$:/core/ui/TagTemplate}}</td>
<td><$count filter="[all[current]tagging[]]"/></td> <td><$count filter="[all[current]tagging[]]"/></td>
<td> <td>
<$macrocall $name="iconEditor" title={{!!title}}/> <$macrocall $name="iconEditor" title={{!!title}}/>
</td> </td>
<td> <td>
<$macrocall $name="toggleButton" state={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} /> <$macrocall $name="toggleButton" state={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} />
</td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td colspan="4"> <td colspan="4">
<$reveal stateTitle={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} type="match" text="open" default=""> <$reveal stateTitle={{{ [[$:/state/tag-manager/]addsuffix<currentTiddler>] }}} type="match" text="open" default="">
<table> <table>
<tbody> <tbody>
<tr><td><<lingo Colour/Heading>></td><td><$edit-text field="color" tag="input" type="text" size="9"/></td></tr> <tr>
<tr><td><<lingo Icon/Heading>></td><td><$edit-text field="icon" tag="input" size="45"/></td></tr> <td><<lingo Colour/Heading>></td>
</tbody> <td><$edit-text field="color" tag="input" type="text" size="9"/></td>
</table> </tr>
</$reveal> <tr>
</td> <td><<lingo Icon/Heading>></td>
</tr> <td><$edit-text field="icon" tag="input" size="45"/></td>
</$list> </tr>
<tr> </tbody>
<td></td> </table>
<td style="position:relative;"> </$reveal>
{{$:/core/ui/UntaggedTemplate}} </td>
</td> </tr>
<td> </$list>
<small class="tc-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small> <tr>
</td> <td></td>
<td></td> <td style="position:relative;">
<td></td> {{$:/core/ui/UntaggedTemplate}}
</tr> </td>
<td>
<small class="tc-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small>
</td>
<td></td>
<td></td>
</tr>
</tbody> </tbody>
</table> </table>