diff --git a/core/images/new-journal-button.tid b/core/images/new-journal-button.tid new file mode 100644 index 000000000..080a2f651 --- /dev/null +++ b/core/images/new-journal-button.tid @@ -0,0 +1,11 @@ +title: $:/core/images/new-journal-button +tags: $:/tags/Image + + + + + + <> + + + \ No newline at end of file diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index dac85e315..04ef57b0a 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -34,6 +34,8 @@ Home/Caption: home Home/Hint: Open the default tiddlers Language/Caption: language Language/Hint: Choose the user interface language +NewJournal/Caption: new journal +NewJournal/Hint: Create a new journal tiddler NewTiddler/Caption: new tiddler NewTiddler/Hint: Create a new tiddler More/Caption: more diff --git a/core/modules/macros/now.js b/core/modules/macros/now.js new file mode 100644 index 000000000..d0a15dce2 --- /dev/null +++ b/core/modules/macros/now.js @@ -0,0 +1,32 @@ +/*\ +title: $:/core/modules/macros/now.js +type: application/javascript +module-type: macro + +Macro to return a formatted version of the current time + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Information about this macro +*/ + +exports.name = "now"; + +exports.params = [ + {name: "format"} +]; + +/* +Run the macro +*/ +exports.run = function(format) { + return $tw.utils.formatDateString(new Date(),format || "0hh:0mm, DDth MMM YYYY"); +}; + +})(); diff --git a/core/ui/PageControls/new-journal.tid b/core/ui/PageControls/new-journal.tid new file mode 100644 index 000000000..4b8ce5001 --- /dev/null +++ b/core/ui/PageControls/new-journal.tid @@ -0,0 +1,14 @@ +title: $:/core/ui/Buttons/new-journal +tags: $:/tags/PageControls +caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}} +description: {{$:/language/Buttons/NewJournal/Hint}} + +<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<>> +<$action-sendmessage $message="tm-new-tiddler" title=<> tags="Journal"/> +<$list filter="[prefix[yes]]"> +{{$:/core/images/new-journal-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/NewJournal/Caption}}/> + + diff --git a/core/wiki/config/PageControlButtons.multids b/core/wiki/config/PageControlButtons.multids index 164c454e3..5029bc1ca 100644 --- a/core/wiki/config/PageControlButtons.multids +++ b/core/wiki/config/PageControlButtons.multids @@ -9,6 +9,7 @@ core/ui/Buttons/import: hide core/ui/Buttons/language: hide core/ui/Buttons/tag-manager: hide core/ui/Buttons/more-page-actions: hide +core/ui/Buttons/new-journal: hide core/ui/Buttons/permaview: hide core/ui/Buttons/storyview: hide core/ui/Buttons/theme: hide diff --git a/core/wiki/tags/PageControls.tid b/core/wiki/tags/PageControls.tid index 233ef5443..81d1e46a7 100644 --- a/core/wiki/tags/PageControls.tid +++ b/core/wiki/tags/PageControls.tid @@ -1,2 +1,2 @@ title: $:/tags/PageControls -list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]] +list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]] diff --git a/editions/tw5.com/tiddlers/NowMacro.tid b/editions/tw5.com/tiddlers/NowMacro.tid new file mode 100644 index 000000000..1d58d72f8 --- /dev/null +++ b/editions/tw5.com/tiddlers/NowMacro.tid @@ -0,0 +1,28 @@ +caption: qualify +created: 20141008141616791 +modified: 20141008142012309 +tags: Macros +title: NowMacro +type: text/vnd.tiddlywiki + +The 'now' macro returns the current date and time, formatted with an optional format string. + +! Parameters + +|!Position |!Name |!Description |!Default | +|1st |format |DateFormat string specifying the format for the date/time |`0hh:0mm, DDth MMM YYYY` | + +! Examples + +For example: + +``` +* <> +* <> +``` + +Returns: + +* <> +* <> +