2013-11-15 22:55:32 +00:00
|
|
|
title: $:/core/ui/EditTemplate/tags
|
|
|
|
tags: $:/tags/EditTemplate
|
2013-06-09 18:28:50 +00:00
|
|
|
|
2018-11-25 11:13:42 +00:00
|
|
|
\whitespace trim
|
|
|
|
|
2014-02-16 09:46:43 +00:00
|
|
|
\define lingo-base() $:/language/EditTemplate/
|
2016-11-28 19:17:25 +00:00
|
|
|
|
2013-10-21 21:55:43 +00:00
|
|
|
\define tag-styles()
|
|
|
|
background-color:$(backgroundColor)$;
|
2016-07-01 09:40:37 +00:00
|
|
|
fill:$(foregroundColor)$;
|
|
|
|
color:$(foregroundColor)$;
|
|
|
|
\end
|
2016-11-28 19:17:25 +00:00
|
|
|
|
2020-11-15 12:04:50 +00:00
|
|
|
\define tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
|
2018-11-25 11:13:42 +00:00
|
|
|
\whitespace trim
|
2016-07-01 09:40:37 +00:00
|
|
|
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
2021-05-27 13:07:50 +00:00
|
|
|
<span style=<<tag-styles>> class="tc-tag-label tc-tag-list-item tc-small-gap-right">
|
2019-11-07 12:39:14 +00:00
|
|
|
<$transclude tiddler="""$icon$"""/><$view field="title" format="text" />
|
2021-01-03 11:51:30 +00:00
|
|
|
<$button class="tc-btn-invisible tc-remove-tag-button" style=<<tag-styles>>><$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="-[{!!title}]"/>{{$:/core/images/close-button}}</$button>
|
2016-07-01 09:40:37 +00:00
|
|
|
</span>
|
|
|
|
</$vars>
|
|
|
|
\end
|
2016-11-28 19:17:25 +00:00
|
|
|
|
2020-11-15 12:04:50 +00:00
|
|
|
\define tag-body(colour,palette,icon,tagField:"tags")
|
|
|
|
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$""" tagField=<<__tagField__>>/>
|
2013-10-21 21:55:43 +00:00
|
|
|
\end
|
2016-11-28 19:17:25 +00:00
|
|
|
|
2020-11-15 12:04:50 +00:00
|
|
|
\define edit-tags-template(tagField:"tags")
|
|
|
|
\whitespace trim
|
2014-08-28 17:47:21 +00:00
|
|
|
<div class="tc-edit-tags">
|
2020-11-15 12:04:50 +00:00
|
|
|
<$list filter="[list[!!$tagField$]sort[title]]" storyview="pop">
|
2021-12-06 16:25:51 +00:00
|
|
|
<$macrocall $name="tag-body" colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} tagField=<<__tagField__>>/>
|
2014-04-10 21:49:46 +00:00
|
|
|
</$list>
|
2020-06-11 10:41:35 +00:00
|
|
|
<$vars tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes">
|
2020-11-15 12:04:50 +00:00
|
|
|
<$macrocall $name="tag-picker" tagField=<<__tagField__>>/>
|
2020-06-11 10:41:35 +00:00
|
|
|
</$vars>
|
2016-11-28 19:17:25 +00:00
|
|
|
</div>
|
2020-11-15 12:04:50 +00:00
|
|
|
\end
|
|
|
|
<$set name="saveTiddler" value=<<currentTiddler>>>
|
|
|
|
<$macrocall $name="edit-tags-template" tagField=<<tagField>>/>
|
|
|
|
</$set>
|