From 28591965b1343580447da2b1909796f348662d08 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 16 Dec 2016 17:25:03 +0000 Subject: [PATCH] Yet more refactoring of the tag macro vs template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change re-instates the existing behaviour whereby omitting the parameter to the “tag” macro will default to the current tiddler --- core/ui/TagTemplate.tid | 14 +++++++++++++- core/wiki/macros/tag.tid | 16 +--------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/core/ui/TagTemplate.tid b/core/ui/TagTemplate.tid index 569e6ad0f..0280df4d6 100644 --- a/core/ui/TagTemplate.tid +++ b/core/ui/TagTemplate.tid @@ -1,3 +1,15 @@ title: $:/core/ui/TagTemplate -<$macrocall $name="tag" tag=<>/> + +<$set name="transclusion" value=<>> +<$macrocall $name="tag-pill-body" tag=<> icon={{!!icon}} colour={{!!color}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<>"""/> +<$reveal state=<> type="popup" position="below" animate="yes" class="tc-drop-down"> +<$transclude tiddler="$:/core/ui/ListItemTemplate"/> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem"> +<$transclude tiddler=<>/> + +
+<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/> + + +
diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid index dc23f3238..0afa74c53 100644 --- a/core/wiki/macros/tag.tid +++ b/core/wiki/macros/tag.tid @@ -26,19 +26,5 @@ $actions$<$transclude tiddler="""$icon$"""/> <$view tiddler="""$tag$""" field="t \end \define tag(tag) - -<$set name="transclusion" value="""$tag$"""> -<$macrocall $name="tag-pill-body" tag="""$tag$""" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<>"""/> -<$reveal state=<> type="popup" position="below" animate="yes" class="tc-drop-down"> -<$tiddler tiddler="""$tag$"""> -<$transclude tiddler="$:/core/ui/ListItemTemplate"/> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem"> -<$transclude tiddler=<>/> - -
-<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/> - - - -
+{{$tag$||$:/core/ui/TagTemplate}} \end