[{"created":"20201202200514984","text":"\\define lingo-base() $:/language/projectify/\n\n\\define project-refile-actions()\n<!-- Macro similar to the todo-list drop actions, but used in project lists/cards -->\n<$list filter=\"[<currentTiddler>compare:string:ne<actionTiddler>]\">  \n<$action-listops $tiddler=<<actionTiddler>> $tags=<<project-refile-tags>>/>\n</$list>\n\\end\n\n\\define todo-list-drop-actions(tag)\n<!-- Same as list-tagged-draggable-drop-actions, but removing the item from its old project and adding the todo tag. -->\n<$action-listops $tiddler=<<actionTiddler>> $tags=<<todo-list-drop-tags>>/>\n<!-- Save the current ordering of the tiddlers with this tag -->\n<$set name=\"order\" filter=\"[<__tag__>tagging[]]\">\n<!-- Remove any list-after or list-before fields from the tiddlers with this tag -->\n<$list filter=\"[<__tag__>tagging[]]\">\n<$action-deletefield $field=\"list-before\"/>\n<$action-deletefield $field=\"list-after\"/>\n</$list>\n<!-- Save the new order to the Tag Tiddler -->\n<$action-listops $tiddler=<<__tag__>> $field=\"list\" $filter=\"+[enlist<order>] +[insertbefore:currentTiddler<actionTiddler>]\"/>\n</$set>\n\\end\n\n\\define todo-list-filtered(subFilter)\n  <$vars\n    projectTag={{!!title}}\n    dragHandle=\"yes\"\n    list-tagged-draggable-drop-actions=<<todo-list-drop-actions>>\n  >\n    <div class=\"py-todos\">\n      <$macrocall\n        $name=\"list-tagged-draggable\"\n        tag=<<projectTag>>\n        subFilter=<<__subFilter__>>\n        itemTemplate=\"$:/plugins/nico/projectify/ui/todo/TodoItem\"\n      />\n    </div>\n  </$vars>\n\\end\n  \n\\define todo-list(emptyTemplate)\n  <$list filter=<<py-has-no-open-todo>> variable=\"ignore\">\n    <$transclude tiddler=<<__emptyTemplate__>>/>\n  </$list>\n  <$list filter=<<py-has-scheduled-todos>> variable=\"ignore\">\n    <label class=\"py-label\"><<lingo Scheduled>></label>\n    <$macrocall $name=\"todo-list-filtered\" subFilter=<<py-scheduled-todos-subfilter>>/>\n  </$list>\n  <$list filter=<<py-has-unscheduled-todos>> variable=\"ignore\">\n    <$list filter=<<py-has-scheduled-todos>>>\n      <label class=\"py-label\"><<lingo OtherTasks>></label>\n    </$list>\n  </$list>\n  <$macrocall $name=\"todo-list-filtered\" subFilter=<<py-unscheduled-todos-subfilter>>/>\n\\end\n\n\\define todo-list-completed()\n  <div class=\"py-todos py-completed-todos\">\n    <$list\n      filter=<<py-completed-todos>>\n      template=\"$:/plugins/nico/projectify/ui/todo/TodoItem\"\n    />\n  </div>\n\\end\n","title":"$:/plugins/nico/projectify/macros/todo-list","modified":"20210525024737953","tags":"$:/tags/Macro","type":"text/vnd.tiddlywiki"}]