From 28b0b58a11fbde689fa2e4f6e9ae23e2cc103b56 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 31 May 2013 15:38:27 +0100 Subject: [PATCH] Make a distinction between templates and UI Templates are the low-level bits and pieces that allow TW5 to generate HTML and CSS renderings of tiddlers. The UI folder contains the user-visible UI of TW5 --- core/modules/startup.js | 2 +- core/templates/{StaticContent.tid => static.content.tid} | 2 +- core/templates/static.template.html.tid | 2 +- core/templates/static.tiddler.html.tid | 2 +- core/templates/tiddlywiki5.template.html.tid | 2 +- core/ui/EditTemplate.tid | 2 +- core/ui/MissingTemplate.tid | 2 +- core/ui/MoreSideBar.tid | 6 +++--- core/ui/PageTemplate.tid | 6 +++--- core/ui/SideBar.tid | 6 +++--- core/ui/TagTemplate.tid | 2 +- core/ui/TiddlerInfo.tid | 2 +- core/ui/ToolsPanel.tid | 2 +- core/ui/ViewTemplate.tid | 6 +++--- core/wiki/ControlPanel.tid | 2 +- core/wiki/moreSideBarTabSet.tid | 2 +- core/wiki/sideBarTabSet.tid | 2 +- plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid | 2 +- 18 files changed, 26 insertions(+), 26 deletions(-) rename core/templates/{StaticContent.tid => static.content.tid} (83%) diff --git a/core/modules/startup.js b/core/modules/startup.js index c0c3ae61c..43560511e 100644 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -112,7 +112,7 @@ exports.startup = function() { }); } // Display the PageTemplate - var templateTitle = "$:/templates/PageTemplate", + var templateTitle = "$:/core/ui/PageTemplate", parser = $tw.wiki.parseTiddler(templateTitle), renderTree = new $tw.WikiRenderTree(parser,{wiki: $tw.wiki, context: {tiddlerTitle: templateTitle}, document: document}); renderTree.execute(); diff --git a/core/templates/StaticContent.tid b/core/templates/static.content.tid similarity index 83% rename from core/templates/StaticContent.tid rename to core/templates/static.content.tid index ceb153979..2b12452d9 100644 --- a/core/templates/StaticContent.tid +++ b/core/templates/static.content.tid @@ -1,4 +1,4 @@ -title: $:/templates/StaticContent +title: $:/templates/static.content type: text/vnd.tiddlywiki diff --git a/core/templates/static.template.html.tid b/core/templates/static.template.html.tid index b523aee8d..169d74750 100644 --- a/core/templates/static.template.html.tid +++ b/core/templates/static.template.html.tid @@ -18,6 +18,6 @@ type: text/vnd.tiddlywiki-html -{{$:/templates/PageTemplate||$:/core/templates/html-tiddler}} +{{$:/core/ui/PageTemplate||$:/core/templates/html-tiddler}} diff --git a/core/templates/static.tiddler.html.tid b/core/templates/static.tiddler.html.tid index c6054b792..6bd2fa066 100644 --- a/core/templates/static.tiddler.html.tid +++ b/core/templates/static.tiddler.html.tid @@ -13,7 +13,7 @@ title: $:/core/templates/static.tiddler.html
-`<$view tiddler="$:/templates/ViewTemplate" format="htmlwikified"/>` +`<$view tiddler="$:/core/ui/ViewTemplate" format="htmlwikified"/>`
diff --git a/core/templates/tiddlywiki5.template.html.tid b/core/templates/tiddlywiki5.template.html.tid index 721f65300..c763b4012 100644 --- a/core/templates/tiddlywiki5.template.html.tid +++ b/core/templates/tiddlywiki5.template.html.tid @@ -26,7 +26,7 @@ title: $:/core/templates/tiddlywiki5.template.html diff --git a/core/ui/EditTemplate.tid b/core/ui/EditTemplate.tid index 94545584d..23a6bb287 100644 --- a/core/ui/EditTemplate.tid +++ b/core/ui/EditTemplate.tid @@ -1,4 +1,4 @@ -title: $:/templates/EditTemplate +title: $:/core/ui/EditTemplate modifier: JeremyRuston <$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}} <$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}} <$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}} diff --git a/core/ui/MissingTemplate.tid b/core/ui/MissingTemplate.tid index e58d63c5a..d2a1bb71f 100644 --- a/core/ui/MissingTemplate.tid +++ b/core/ui/MissingTemplate.tid @@ -1,4 +1,4 @@ -title: $:/templates/MissingTemplate +title: $:/core/ui/MissingTemplate <$button popup="$:/state/missingpopup" qualifyTiddlerTitles="yes" class="btn-invisible tw-missing-tiddler-label"><$view field="title" format="text" /> <$reveal state="$:/state/missingpopup" type="popup" position="below" qualifyTiddlerTitles="yes" >
diff --git a/core/ui/MoreSideBar.tid b/core/ui/MoreSideBar.tid index 23508c4e7..930aa41a2 100644 --- a/core/ui/MoreSideBar.tid +++ b/core/ui/MoreSideBar.tid @@ -1,4 +1,4 @@ -title: $:/templates/MoreSideBar +title: $:/core/ui/MoreSideBar
@@ -28,10 +28,10 @@ title: $:/templates/MoreSideBar {{$:/snippets/recentchanges}} <$reveal type="match" state="$:/state/moreSideBarTabSet" text="tagsTab" qualifyTiddlerTitles="yes"> -<$list filter="[tags[]sort[title]]" itemClass="tw-menu-list-item" template="$:/templates/TagTemplate"/> +<$list filter="[tags[]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/TagTemplate"/> <$reveal type="match" state="$:/state/moreSideBarTabSet" text="missingTab" qualifyTiddlerTitles="yes"> -<$list filter="[is[missing]sort[title]]" itemClass="tw-menu-list-item" template="$:/templates/MissingTemplate"/> +<$list filter="[is[missing]sort[title]]" itemClass="tw-menu-list-item" template="$:/core/ui/MissingTemplate"/> <$reveal type="match" state="$:/state/moreSideBarTabSet" text="draftsTab" qualifyTiddlerTitles="yes"> <$list filter="[has[draft.of]sort[title]]" itemClass="tw-menu-list-item" /> diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index e02d2a191..22b0a4040 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -1,4 +1,4 @@ -title: $:/templates/PageTemplate +title: $:/core/ui/PageTemplate <$navigator story="$:/StoryList" history="$:/HistoryList"> @@ -10,7 +10,7 @@ title: $:/templates/PageTemplate {{SiteTitle}}.title
{{SiteSubtitle}} -{{$:/templates/SideBar}} +{{$:/core/ui/SideBar}} @@ -18,7 +18,7 @@ title: $:/templates/PageTemplate
-<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/templates/ViewTemplate" editTemplate="$:/templates/EditTemplate" listview="classic" itemClass="tw-tiddler-frame"/> +<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/ViewTemplate" editTemplate="$:/core/ui/EditTemplate" listview="classic" itemClass="tw-tiddler-frame"/>
diff --git a/core/ui/SideBar.tid b/core/ui/SideBar.tid index f9a3fa6a2..1548153a2 100644 --- a/core/ui/SideBar.tid +++ b/core/ui/SideBar.tid @@ -1,4 +1,4 @@ -title: $:/templates/SideBar +title: $:/core/ui/SideBar @@ -41,10 +41,10 @@ title: $:/templates/SideBar {{$:/snippets/recentchanges}} <$reveal type="match" state="$:/state/sideBarTabSet" text="toolsTab" qualifyTiddlerTitles="yes"> -{{$:/templates/ToolsPanel}} +{{$:/core/ui/ToolsPanel}} <$reveal type="match" state="$:/state/sideBarTabSet" text="moreTab" qualifyTiddlerTitles="yes"> -{{$:/templates/MoreSideBar}} +{{$:/core/ui/MoreSideBar}}
diff --git a/core/ui/TagTemplate.tid b/core/ui/TagTemplate.tid index 6c7d3a75f..b4db35a0f 100644 --- a/core/ui/TagTemplate.tid +++ b/core/ui/TagTemplate.tid @@ -1,4 +1,4 @@ -title: $:/templates/TagTemplate +title: $:/core/ui/TagTemplate <$button popup="$:/state/tagpopup" qualifyTiddlerTitles="yes" class="btn-invisible"><$setstyle name="background-color" value={{!!color}} class="tw-tag-label"><$view field="title" format="text" /> <$reveal state="$:/state/tagpopup" type="popup" position="below" qualifyTiddlerTitles="yes" >
diff --git a/core/ui/TiddlerInfo.tid b/core/ui/TiddlerInfo.tid index e83d7e92b..692da8456 100644 --- a/core/ui/TiddlerInfo.tid +++ b/core/ui/TiddlerInfo.tid @@ -1,4 +1,4 @@ -title: $:/templates/TiddlerInfo +title: $:/core/ui/TiddlerInfo
<$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="refTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">References<$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="taggingTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Tagging<$button type="set" set="$:/state/tiddlerDropDownTabSet" setTo="fieldsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Fields
diff --git a/core/ui/ToolsPanel.tid b/core/ui/ToolsPanel.tid index f0aa336a4..8b7319275 100644 --- a/core/ui/ToolsPanel.tid +++ b/core/ui/ToolsPanel.tid @@ -1,4 +1,4 @@ -title: $:/templates/ToolsPanel +title: $:/core/ui/ToolsPanel Import: <$import class="tw-drop-zone"/> diff --git a/core/ui/ViewTemplate.tid b/core/ui/ViewTemplate.tid index 728ae7992..893af5e37 100644 --- a/core/ui/ViewTemplate.tid +++ b/core/ui/ViewTemplate.tid @@ -1,4 +1,4 @@ -title: $:/templates/ViewTemplate +title: $:/core/ui/ViewTemplate modifier: JeremyRuston <$button popup="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/core/images/info-button}}<$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}<$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}} @@ -7,13 +7,13 @@ modifier: JeremyRuston <$reveal type="nomatch" text="" default="" state="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes" class="tw-tiddler-info" animate="yes"> -<$transclude template="$:/templates/TiddlerInfo"/> +<$transclude template="$:/core/ui/TiddlerInfo"/>
<$view field="modifier" format="link"/> <$view field="modified" format="relativedate"/>
-
<$list filter="[is[current]tags[]]" template="$:/templates/TagTemplate" />
+
<$list filter="[is[current]tags[]]" template="$:/core/ui/TagTemplate" />
<$view field="text" format="wikified"> diff --git a/core/wiki/ControlPanel.tid b/core/wiki/ControlPanel.tid index 29140a34f..989a3ff84 100644 --- a/core/wiki/ControlPanel.tid +++ b/core/wiki/ControlPanel.tid @@ -28,4 +28,4 @@ The tiddlers in TiddlyWiki documents can be securely encrypted by specifying a p {{$:/snippets/themeswitcher}} -{{$:/templates/ServerControlPanel}} +{{$:/core/ui/ServerControlPanel}} diff --git a/core/wiki/moreSideBarTabSet.tid b/core/wiki/moreSideBarTabSet.tid index 90b97dd75..71523b404 100644 --- a/core/wiki/moreSideBarTabSet.tid +++ b/core/wiki/moreSideBarTabSet.tid @@ -1,3 +1,3 @@ -title: $:/state/moreSideBarTabSet-tiddlerTitle:$:/templates/MoreSideBar;templateTitle:$:/templates/MoreSideBar;-tiddlerTitle:$:/templates/SideBar;templateTitle:$:/templates/SideBar;-tiddlerTitle:$:/templates/PageTemplate;- +title: $:/state/moreSideBarTabSet-tiddlerTitle:$:/core/ui/MoreSideBar;templateTitle:$:/core/ui/MoreSideBar;-tiddlerTitle:$:/core/ui/SideBar;templateTitle:$:/core/ui/SideBar;-tiddlerTitle:$:/core/ui/PageTemplate;- tagsTab \ No newline at end of file diff --git a/core/wiki/sideBarTabSet.tid b/core/wiki/sideBarTabSet.tid index ca6fe1dc9..14ad9f886 100644 --- a/core/wiki/sideBarTabSet.tid +++ b/core/wiki/sideBarTabSet.tid @@ -1,3 +1,3 @@ -title: $:/state/sideBarTabSet-tiddlerTitle:$:/templates/SideBar;templateTitle:$:/templates/SideBar;-tiddlerTitle:$:/templates/PageTemplate;- +title: $:/state/sideBarTabSet-tiddlerTitle:$:/core/ui/SideBar;templateTitle:$:/core/ui/SideBar;-tiddlerTitle:$:/core/ui/PageTemplate;- openTab \ No newline at end of file diff --git a/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid b/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid index 3c9834e71..d07a295f3 100644 --- a/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid +++ b/plugins/tiddlywiki/tiddlyweb/ServerControlPanel.tid @@ -1,4 +1,4 @@ -title: $:/templates/ServerControlPanel +title: $:/core/ui/ServerControlPanel ----