1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 02:50:27 +00:00

Merge pull request #959 from simonbaird/new-journal-here

Add a 'new journal here' button
This commit is contained in:
Jeremy Ruston 2014-10-09 17:34:13 +01:00
commit fcf843d5b1
4 changed files with 27 additions and 2 deletions

View File

@ -40,6 +40,8 @@ NewHere/Caption: new here
NewHere/Hint: Create a new tiddler tagged with this one
NewJournal/Caption: new journal
NewJournal/Hint: Create a new journal tiddler
NewJournalHere/Caption: new journal here
NewJournalHere/Hint: Create a new journal tiddler tagged with this one
NewTiddler/Caption: new tiddler
NewTiddler/Hint: Create a new tiddler
Permalink/Caption: permalink

View File

@ -0,0 +1,21 @@
title: $:/core/ui/Buttons/new-journal-here
tags: $:/tags/ViewToolbar
caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournalHere/Caption}}
description: {{$:/language/Buttons/NewJournalHere/Hint}}
\define journalButton()
<$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" title=<<now "$(journalTitleTemplate)$">> tags="[[$(currentTiddlerTag)$]] $(journalTags)$"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-journal-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/NewJournalHere/Caption}}/>
</$list>
</$button>
\end
<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>
<$set name="journalTags" value={{$:/config/NewJournal/Tags}}>
<$set name="currentTiddlerTag" value=<<currentTiddler>>>
<<journalButton>>
</$set></$set></$set>

View File

@ -5,7 +5,7 @@ description: {{$:/language/Buttons/NewJournal/Hint}}
\define journalButton()
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" title=<<now "$(journalTitleTemplate)$">> tags={{$:/config/NewJournal/Tags}}/>
<$action-sendmessage $message="tm-new-tiddler" title=<<now "$(journalTitleTemplate)$">> tags="$(journalTags)$"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-journal-button}}
</$list>
@ -15,5 +15,6 @@ description: {{$:/language/Buttons/NewJournal/Hint}}
</$button>
\end
<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>
<$set name="journalTags" value={{$:/config/NewJournal/Tags}}>
<<journalButton>>
</$set>
</$set></$set>

View File

@ -4,5 +4,6 @@ core/ui/Buttons/clone: hide
core/ui/Buttons/close-others: hide
core/ui/Buttons/more-tiddler-actions: hide
core/ui/Buttons/new-here: hide
core/ui/Buttons/new-journal-here: hide
core/ui/Buttons/permalink: hide
core/ui/Buttons/permaview: hide