From daa24a52bdc832ca09e0b9c1335301c8c35c75d1 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 13 Oct 2019 17:53:52 +0200 Subject: [PATCH] Add default new-tiddler and new-journal tags mechanism and... (#4314) * Update Basics.tid * Update ControlPanel.multids * Update NewJournal.multids * Create NewJournalTags.tid * Update new-tiddler.tid * Update new-image.tid * Update new-journal.tid * Update new-here.tid * Update new-journal-here.tid --- core/language/en-GB/ControlPanel.multids | 1 + core/language/en-GB/NewJournal.multids | 1 - core/language/en-GB/NewJournalTags.tid | 2 ++ core/ui/Actions/new-image.tid | 2 +- core/ui/Actions/new-journal.tid | 2 +- core/ui/Actions/new-tiddler.tid | 2 +- core/ui/ControlPanel/Basics.tid | 3 ++- core/ui/ViewToolbar/new-here.tid | 4 ++-- core/ui/ViewToolbar/new-journal-here.tid | 4 ++-- 9 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 core/language/en-GB/NewJournalTags.tid diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 3b086e851..802d9284b 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -15,6 +15,7 @@ Basics/NewJournal/Title/Prompt: Title of new journal tiddlers Basics/NewJournal/Text/Prompt: Text for new journal tiddlers Basics/NewJournal/Tags/Prompt: Tags for new journal tiddlers Basics/NewTiddler/Title/Prompt: Title of new tiddlers +Basics/NewTiddler/Tags/Prompt: Tags for new tiddlers Basics/OverriddenShadowTiddlers/Prompt: Number of overridden shadow tiddlers: Basics/ShadowTiddlers/Prompt: Number of shadow tiddlers: Basics/Subtitle/Prompt: Subtitle: diff --git a/core/language/en-GB/NewJournal.multids b/core/language/en-GB/NewJournal.multids index b7a3f5e62..f5c939068 100644 --- a/core/language/en-GB/NewJournal.multids +++ b/core/language/en-GB/NewJournal.multids @@ -2,4 +2,3 @@ title: $:/config/NewJournal/ Title: DDth MMM YYYY Text: -Tags: Journal diff --git a/core/language/en-GB/NewJournalTags.tid b/core/language/en-GB/NewJournalTags.tid new file mode 100644 index 000000000..0534cba33 --- /dev/null +++ b/core/language/en-GB/NewJournalTags.tid @@ -0,0 +1,2 @@ +title: $:/config/NewJournal/Tags +tags: Journal diff --git a/core/ui/Actions/new-image.tid b/core/ui/Actions/new-image.tid index 372933e90..1e46ebcdb 100644 --- a/core/ui/Actions/new-image.tid +++ b/core/ui/Actions/new-image.tid @@ -6,5 +6,5 @@ description: create a new image tiddler image/$(imageType)$ \end <$vars imageType={{$:/config/NewImageType}}> -<$action-sendmessage $message="tm-new-tiddler" type=<>/> +<$action-sendmessage $message="tm-new-tiddler" type=<> tags={{$:/config/NewTiddler/Tags!!tags}}/> diff --git a/core/ui/Actions/new-journal.tid b/core/ui/Actions/new-journal.tid index 4c5082f78..9f3453926 100644 --- a/core/ui/Actions/new-journal.tid +++ b/core/ui/Actions/new-journal.tid @@ -2,7 +2,7 @@ title: $:/core/ui/Actions/new-journal tags: $:/tags/Actions description: create a new journal tiddler -<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} journalText={{$:/config/NewJournal/Text}}> +<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> <$wikify name="journalTitle" text="""<$macrocall $name="now" format=<>/>"""> <$reveal type="nomatch" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text={{{ [get[]] }}}/> diff --git a/core/ui/Actions/new-tiddler.tid b/core/ui/Actions/new-tiddler.tid index 272b61007..e176f0ab3 100644 --- a/core/ui/Actions/new-tiddler.tid +++ b/core/ui/Actions/new-tiddler.tid @@ -2,4 +2,4 @@ title: $:/core/ui/Actions/new-tiddler tags: $:/tags/Actions description: create a new empty tiddler -<$action-sendmessage $message="tm-new-tiddler"/> +<$action-sendmessage $message="tm-new-tiddler" tags={{$:/config/NewTiddler/Tags!!tags}}/> diff --git a/core/ui/ControlPanel/Basics.tid b/core/ui/ControlPanel/Basics.tid index 4a4379e82..b364c05bb 100644 --- a/core/ui/ControlPanel/Basics.tid +++ b/core/ui/ControlPanel/Basics.tid @@ -22,8 +22,9 @@ caption: {{$:/language/ControlPanel/Basics/Caption}} |<$link to="$:/DefaultTiddlers"><> |<>
<$edit tag="textarea" tiddler="$:/DefaultTiddlers" class="tc-edit-texteditor"/>
//<>// | |<$link to="$:/language/DefaultNewTiddlerTitle"><> |<$edit-text tiddler="$:/language/DefaultNewTiddlerTitle" default="" tag="input"/> | |<$link to="$:/config/NewJournal/Title"><> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> | +|<$link to="$:/config/NewTiddler/Tags"><> |{{$:/config/NewTiddler/Tags||$:/core/ui/EditTemplate/tags}} | |<$link to="$:/config/NewJournal/Text"><> |<$edit tiddler="$:/config/NewJournal/Text" tag="textarea" class="tc-edit-texteditor" default=""/> | -|<$link to="$:/config/NewJournal/Tags"><> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> | +|<$link to="$:/config/NewJournal/Tags"><> |{{$:/config/NewJournal/Tags||$:/core/ui/EditTemplate/tags}} | |<> |{{$:/snippets/minifocusswitcher}} | |<> |{{$:/snippets/minilanguageswitcher}} | |<> |<> | diff --git a/core/ui/ViewToolbar/new-here.tid b/core/ui/ViewToolbar/new-here.tid index 7b3f96c32..d11750e70 100644 --- a/core/ui/ViewToolbar/new-here.tid +++ b/core/ui/ViewToolbar/new-here.tid @@ -5,7 +5,7 @@ description: {{$:/language/Buttons/NewHere/Hint}} \whitespace trim \define newHereActions() -<$set name="tags" filter="[]"> +<$set name="tags" filter="[] [{$:/config/NewTiddler/Tags!!tags}]"> <$action-sendmessage $message="tm-new-tiddler" tags=<>/> \end @@ -21,4 +21,4 @@ description: {{$:/language/Buttons/NewHere/Hint}} \end -<> \ No newline at end of file +<> diff --git a/core/ui/ViewToolbar/new-journal-here.tid b/core/ui/ViewToolbar/new-journal-here.tid index e41fd4063..b540185ca 100644 --- a/core/ui/ViewToolbar/new-journal-here.tid +++ b/core/ui/ViewToolbar/new-journal-here.tid @@ -23,9 +23,9 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}} \end <$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}> -<$set name="journalTags" value={{$:/config/NewJournal/Tags}}> +<$set name="journalTags" value={{$:/config/NewJournal/Tags!!tags}}> <$set name="currentTiddlerTag" value=<>> <> - \ No newline at end of file +