From c89b351cb4ea40a46ced029ef84a2641faccdd2f Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 31 Jan 2024 10:40:35 +0100 Subject: [PATCH] add new store.info.template and store.info.tiddler.template tiddlers the info.tiddler.template is tagged: $:/tags/InfoTiddlerTemplate so several tagged tiddlers can be injected, if needed. Important: The templates have to use the TW HTML template syntax On branch 6684-add-last-saved-timestamp Changes to be committed: new file: core/templates/store.info.template.html.tid new file: core/templates/store.info.tiddler.template.tid --- core/templates/store.info.template.html.tid | 21 ++++++++++++++++++ .../templates/store.info.tiddler.template.tid | 22 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 core/templates/store.info.template.html.tid create mode 100644 core/templates/store.info.tiddler.template.tid diff --git a/core/templates/store.info.template.html.tid b/core/templates/store.info.template.html.tid new file mode 100644 index 000000000..b1aaf53ec --- /dev/null +++ b/core/templates/store.info.template.html.tid @@ -0,0 +1,21 @@ +title: $:/core/templates/store.info.template.html + +\whitespace trim + +<$list filter="[[$:/isEncrypted]get[text]else[no]match[no]]"> + <$list filter="[[storeAreaFormat]is[variable]getvariable[]else[json]match[json]]"> + + `` + + diff --git a/core/templates/store.info.tiddler.template.tid b/core/templates/store.info.tiddler.template.tid new file mode 100644 index 000000000..ec5d42b0d --- /dev/null +++ b/core/templates/store.info.tiddler.template.tid @@ -0,0 +1,22 @@ +title: $:/core/templates/store.info.tiddler.template +tags: $:/tags/InfoTiddlerTemplate + + +\whitespace trim +\procedure readableFormat() [UTC]YYYY-0MM-0DD 0hh:0mm:0ss.0XXX UTC TZD + + +<$let + timestamp={{{ [] }}} + timeReadable={{{ [format:date] }}} +> + <% if [{$:/info/browser}match[yes]] %> + `{"title": "$:/info/last-saved/timestamp", "created":"`<>`", "modified":"`<>`", "text":"`<>`"}` + <$text text=<>/> + `{"title": "$:/info/last-saved/date", "created":"`<>`", "modified":"`<>`", "text":"`<>`"}` + <% elseif [{$:/info/node}match[yes]] %> + `{"title": "$:/info/server-created-wiki/timestamp", "created":"`<>`", "modified":"`<>`", "text":"`<>`"}` + <$text text=<>/> + `{"title": "$:/info/server-created-wiki/date", "created":"`<>`", "modified":"`<>`", "text":"`<>`"}` + <% endif %> + \ No newline at end of file