From 184aeabcb45dd5cc15ab569c1d7195996347c790 Mon Sep 17 00:00:00 2001 From: Arno Poot Date: Thu, 18 Jul 2013 13:14:29 +0200 Subject: [PATCH] Updated templates to be more consistent and removed trailing spaces Edit --- templates/BreadcrumbsTemplate.ss | 6 ++-- .../CMSPageHistoryController_versions.ss | 10 +++--- templates/Includes/AssetAdmin_Content.ss | 18 +++++------ templates/Includes/AssetAdmin_EditForm.ss | 14 ++++---- .../Includes/AssetAdmin_UploadContent.ss | 2 +- templates/Includes/CMSMain_Content.ss | 8 ++--- templates/Includes/CMSMain_EditForm.ss | 14 ++++---- templates/Includes/CMSMain_ListView.ss | 2 +- templates/Includes/CMSMain_TreeView.ss | 2 +- .../Includes/CMSPageAddController_Content.ss | 18 +++++------ .../CMSPageHistoryController_Tools.ss | 2 +- .../Includes/CMSPagesController_Content.ss | 14 ++++---- .../Includes/CMSSettingsController_Content.ss | 16 +++++----- .../CMSSettingsController_EditForm.ss | 12 +++---- .../Includes/Install_deleteinstallfiles.ss | 6 ++-- .../Includes/Install_successfullyinstalled.ss | 4 +-- templates/Includes/ReportAdmin_Content.ss | 14 ++++---- templates/ReportAdminForm.ss | 32 +++++++++---------- templates/SSReportTableField_printable.ss | 8 ++--- templates/SiteTree_Information.ss | 2 +- templates/forms/SiteTreeURLSegmentField.ss | 4 +-- 21 files changed, 104 insertions(+), 104 deletions(-) diff --git a/templates/BreadcrumbsTemplate.ss b/templates/BreadcrumbsTemplate.ss index beee98e2..1f819c2c 100644 --- a/templates/BreadcrumbsTemplate.ss +++ b/templates/BreadcrumbsTemplate.ss @@ -1,5 +1,5 @@ -<% if Pages %> - <% loop Pages %> - <% if Last %>$MenuTitle.XML<% else %>$MenuTitle.XML »<% end_if %> +<% if $Pages %> + <% loop $Pages %> + <% if $Last %>$MenuTitle.XML<% else %>$MenuTitle.XML »<% end_if %> <% end_loop %> <% end_if %> diff --git a/templates/CMSPageHistoryController_versions.ss b/templates/CMSPageHistoryController_versions.ss index 57e9a4ba..8d48fa2e 100755 --- a/templates/CMSPageHistoryController_versions.ss +++ b/templates/CMSPageHistoryController_versions.ss @@ -7,16 +7,16 @@ <% _t('CMSPageHistoryController_versions.ss.PUBLISHER','Publisher') %> - + - <% loop Versions %> + <% loop $Versions %> checked="checked"<% end_if %> /> - <% with LastEdited %> + <% with $LastEdited %> $Nice <% end_with %> - <% if Author %>$Author.FirstName $Author.Surname.Initial<% else %><% _t('CMSPageHistoryController_versions.ss.UNKNOWN','Unknown') %><% end_if %> - <% if Published %><% if Publisher %>$Publisher.FirstName $Publisher.Surname.Initial<% else %><% _t('CMSPageHistoryController_versions.ss.UNKNOWN','Unknown') %><% end_if %><% else %><% _t('CMSPageHistoryController_versions.ss.NOTPUBLISHED','Not published') %><% end_if %> + <% if $Author %>$Author.FirstName $Author.Surname.Initial<% else %><% _t('CMSPageHistoryController_versions.ss.UNKNOWN','Unknown') %><% end_if %> + <% if $Published %><% if $Publisher %>$Publisher.FirstName $Publisher.Surname.Initial<% else %><% _t('CMSPageHistoryController_versions.ss.UNKNOWN','Unknown') %><% end_if %><% else %><% _t('CMSPageHistoryController_versions.ss.NOTPUBLISHED','Not published') %><% end_if %> <% end_loop %> diff --git a/templates/Includes/AssetAdmin_Content.ss b/templates/Includes/AssetAdmin_Content.ss index a34d7473..7b003f13 100644 --- a/templates/Includes/AssetAdmin_Content.ss +++ b/templates/Includes/AssetAdmin_Content.ss @@ -1,22 +1,22 @@
- <% with EditForm %> + <% with $EditForm %>
<% include BackLink_Button %> - - <% with Controller %> + + <% with $Controller %> <% include CMSBreadcrumbs %> <% end_with %> - +
- <% if Fields.hasTabset %> - <% with Fields.fieldByName('Root') %> + <% if $Fields.hasTabset %> + <% with $Fields.fieldByName('Root') %>
    - <% loop Tabs %> - class="$extraClass"<% end_if %>>$Title + <% loop $Tabs %> + class="$extraClass"<% end_if %>>$Title <% end_loop %>
@@ -29,5 +29,5 @@ $forTemplate
<% end_with %> - +
\ No newline at end of file diff --git a/templates/Includes/AssetAdmin_EditForm.ss b/templates/Includes/AssetAdmin_EditForm.ss index 7f4c0432..97666797 100644 --- a/templates/Includes/AssetAdmin_EditForm.ss +++ b/templates/Includes/AssetAdmin_EditForm.ss @@ -1,25 +1,25 @@
- - <% if Message %> + + <% if $Message %>

$Message

<% else %> <% end_if %>
- <% if Legend %>$Legend<% end_if %> - <% loop Fields %> + <% if $Legend %>$Legend<% end_if %> + <% loop $Fields %> $FieldHolder <% end_loop %>
- <% if Actions %> + <% if $Actions %>
- <% loop Actions %> + <% loop $Actions %> $Field <% end_loop %> - <% if CurrentPage.LinkPreview %> + <% if $CurrentPage.LinkPreview %> <% _t('LeftAndMain.PreviewButton', 'Preview') %> » diff --git a/templates/Includes/AssetAdmin_UploadContent.ss b/templates/Includes/AssetAdmin_UploadContent.ss index 348e72e7..a537b584 100644 --- a/templates/Includes/AssetAdmin_UploadContent.ss +++ b/templates/Includes/AssetAdmin_UploadContent.ss @@ -24,5 +24,5 @@ Not implemented yet
- + \ No newline at end of file diff --git a/templates/Includes/CMSMain_Content.ss b/templates/Includes/CMSMain_Content.ss index 26ac2fc6..27104f0f 100644 --- a/templates/Includes/CMSMain_Content.ss +++ b/templates/Includes/CMSMain_Content.ss @@ -1,10 +1,10 @@
-
- <% include CMSBreadcrumbs %> +
+ <% include CMSBreadcrumbs %>
- +
  • @@ -29,5 +29,5 @@ $Tools $EditForm - +
\ No newline at end of file diff --git a/templates/Includes/CMSMain_EditForm.ss b/templates/Includes/CMSMain_EditForm.ss index 591bacd1..9e85950d 100644 --- a/templates/Includes/CMSMain_EditForm.ss +++ b/templates/Includes/CMSMain_EditForm.ss @@ -1,15 +1,15 @@
- <% if Message %> + <% if $Message %>

$Message

<% else %> <% end_if %>
- <% if Legend %>$Legend<% end_if %> - <% loop Fields %> + <% if $Legend %>$Legend<% end_if %> + <% loop $Fields %> $FieldHolder <% end_loop %>
@@ -17,17 +17,17 @@
- <% if Actions %> + <% if $Actions %>
- <% loop Actions %> + <% loop $Actions %> $Field <% end_loop %> - <% if Controller.LinkPreview %> + <% if $Controller.LinkPreview %> <% _t('LeftAndMain.PreviewButton', 'Preview') %> » <% end_if %> - + <% include LeftAndMain_ViewModeSelector SelectID="preview-mode-dropdown-in-content" %>
<% end_if %> diff --git a/templates/Includes/CMSMain_ListView.ss b/templates/Includes/CMSMain_ListView.ss index 1d2388d4..65a18c42 100644 --- a/templates/Includes/CMSMain_ListView.ss +++ b/templates/Includes/CMSMain_ListView.ss @@ -7,7 +7,7 @@
- <% if TreeIsFiltered %> + <% if $TreeIsFiltered %>
<% _t('CMSMain.ListFiltered', 'Filtered list.') %> diff --git a/templates/Includes/CMSMain_TreeView.ss b/templates/Includes/CMSMain_TreeView.ss index c5e1e2d8..2e9cb6b1 100644 --- a/templates/Includes/CMSMain_TreeView.ss +++ b/templates/Includes/CMSMain_TreeView.ss @@ -10,7 +10,7 @@ $ExtraTreeTools
- <% if TreeIsFiltered %> + <% if $TreeIsFiltered %>
<% _t('CMSMain.TreeFiltered', 'Filtered tree.') %> diff --git a/templates/Includes/CMSPageAddController_Content.ss b/templates/Includes/CMSPageAddController_Content.ss index 4457072c..fe5f0d4d 100644 --- a/templates/Includes/CMSPageAddController_Content.ss +++ b/templates/Includes/CMSPageAddController_Content.ss @@ -1,31 +1,31 @@
- <% with AddForm %> + <% with $AddForm %>

<% _t('CMSAddPageController.Title','Add page') %>

- +
- <% if Message %> + <% if $Message %>

$Message

<% else %> <% end_if %> - +
- <% if Legend %>$Legend<% end_if %> - <% loop Fields %> + <% if $Legend %>$Legend<% end_if %> + <% loop $Fields %> $FieldHolder <% end_loop %>
- +
- <% if Actions %> + <% if $Actions %>
- <% loop Actions %> + <% loop $Actions %> $Field <% end_loop %>
diff --git a/templates/Includes/CMSPageHistoryController_Tools.ss b/templates/Includes/CMSPageHistoryController_Tools.ss index 1a4671c1..d9328c61 100644 --- a/templates/Includes/CMSPageHistoryController_Tools.ss +++ b/templates/Includes/CMSPageHistoryController_Tools.ss @@ -1,5 +1,5 @@
- +
$VersionsForm
diff --git a/templates/Includes/CMSPagesController_Content.ss b/templates/Includes/CMSPagesController_Content.ss index da373bfc..00e76fe3 100644 --- a/templates/Includes/CMSPagesController_Content.ss +++ b/templates/Includes/CMSPagesController_Content.ss @@ -1,10 +1,10 @@
-
- <% include CMSBreadcrumbs %> +
+ <% include CMSBreadcrumbs %>
- +
  • @@ -25,11 +25,11 @@ $Tools
    - +
    <%-- Lazy-loaded via ajax --%>
    - +
    <%-- Lazy-loaded via ajax --%>
    @@ -38,7 +38,7 @@ Not implemented yet
    --> - +
- +
\ No newline at end of file diff --git a/templates/Includes/CMSSettingsController_Content.ss b/templates/Includes/CMSSettingsController_Content.ss index 1def543a..900872c0 100644 --- a/templates/Includes/CMSSettingsController_Content.ss +++ b/templates/Includes/CMSSettingsController_Content.ss @@ -1,18 +1,18 @@
- <% with EditForm %> -
- <% with Controller %> + <% with $EditForm %> +
+ <% with $Controller %> <% include CMSBreadcrumbs %> - <% end_with %> + <% end_with %>
- <% if Fields.hasTabset %> - <% with Fields.fieldByName('Root') %> + <% if $Fields.hasTabset %> + <% with $Fields.fieldByName('Root') %>
diff --git a/templates/Includes/CMSSettingsController_EditForm.ss b/templates/Includes/CMSSettingsController_EditForm.ss index dcbd4135..b7f5f3ca 100644 --- a/templates/Includes/CMSSettingsController_EditForm.ss +++ b/templates/Includes/CMSSettingsController_EditForm.ss @@ -1,25 +1,25 @@ - <% if Message %> + <% if $Message %>

$Message

<% else %> <% end_if %>
- <% if Legend %>$Legend<% end_if %> - <% loop Fields %> + <% if $Legend %>$Legend<% end_if %> + <% loop $Fields %> $FieldHolder <% end_loop %>
- <% if Actions %> + <% if $Actions %>
- <% loop Actions %> + <% loop $Actions %> $Field <% end_loop %> - <% if Controller.LinkPreview %> + <% if $Controller.LinkPreview %> <% _t('LeftAndMain.PreviewButton', 'Preview') %> » diff --git a/templates/Includes/Install_deleteinstallfiles.ss b/templates/Includes/Install_deleteinstallfiles.ss index 7961dc56..28ded533 100644 --- a/templates/Includes/Install_deleteinstallfiles.ss +++ b/templates/Includes/Install_deleteinstallfiles.ss @@ -1,10 +1,10 @@ -<% if UnsuccessfulFiles %> +<% if $UnsuccessfulFiles %>

<%t ContentController.UnableDeleteInstall "Unable to delete installation files. Please delete the files below manually" %>:

    - <% loop UnsuccessfulFiles %> + <% loop $UnsuccessfulFiles %>
  • $File
  • <% end_loop %>
@@ -13,7 +13,7 @@ <%t ContentController.InstallFilesDeleted "Installation files have been successfully deleted." %>

- <%t ContentController.StartEditing 'You can start editing your content by opening the CMS.' link="admin/" %> + <%t ContentController.StartEditing 'You can start editing your content by opening the CMS.' link="admin/" %>
    <%t ContentController.Email "Email" %>: $Username
    <%t ContentController.Password "Password" %>: $Password
diff --git a/templates/Includes/Install_successfullyinstalled.ss b/templates/Includes/Install_successfullyinstalled.ss index 1752472b..9db1001b 100644 --- a/templates/Includes/Install_successfullyinstalled.ss +++ b/templates/Includes/Install_successfullyinstalled.ss @@ -2,7 +2,7 @@ <%t ContentController.InstallSuccessCongratulations "SilverStripe has been successfully installed!" %>

-<% if Project == 'tutorial' %> +<% if $Project == 'tutorial' %> <%t ContentController.PostInstallTutorialIntro 'This website is a simplistic version of a SilverStripe 3 site. To extend this, please take a look at {link}.' link='our tutorials' %> <% end_if %> @@ -10,7 +10,7 @@     <%t ContentController.Password "Password" %>: $Password

- <%t ContentController.StartEditing 'You can start editing your content by opening the CMS.' link="admin/" %> + <%t ContentController.StartEditing 'You can start editing your content by opening the CMS.' link="admin/" %>

diff --git a/templates/Includes/ReportAdmin_Content.ss b/templates/Includes/ReportAdmin_Content.ss index ff6c2419..9ee88de3 100644 --- a/templates/Includes/ReportAdmin_Content.ss +++ b/templates/Includes/ReportAdmin_Content.ss @@ -1,20 +1,20 @@
- <% with EditForm %> + <% with $EditForm %>
- <% include BackLink_Button %> - <% with Controller %> + <% include BackLink_Button %> + <% with $Controller %> <% include CMSBreadcrumbs %> - <% end_with %> + <% end_with %>
<% end_with %>
- + $EditForm - +
- +
\ No newline at end of file diff --git a/templates/ReportAdminForm.ss b/templates/ReportAdminForm.ss index bc8e262b..e239fe76 100644 --- a/templates/ReportAdminForm.ss +++ b/templates/ReportAdminForm.ss @@ -1,41 +1,41 @@ - +
$FieldMap.ReportTitle.FieldHolder $FieldMap.ReportDescription.FieldHolder - - <% if FieldMap.Filters.Children %> + + <% if $FieldMap.Filters.Children %>

<% _t('ReportAdminForm.FILTERBY', 'Filter by') %>

- +
- <% loop FieldMap.Filters %> - <% loop Children %> + <% loop $FieldMap.Filters %> + <% loop $Children %> $FieldHolder <% end_loop %> <% end_loop %>
- +
- <% if FieldMap.action_updatereport %> + <% if $FieldMap.action_updatereport %> $FieldMap.action_updatereport.Field <% end_if %>
- +
 
<% end_if %> - + $FieldMap.ReportContent.FieldHolder - - <% loop HiddenFields %>$Field<% end_loop %> - + + <% loop $HiddenFields %>$Field<% end_loop %> +
- - + +
\ No newline at end of file diff --git a/templates/SSReportTableField_printable.ss b/templates/SSReportTableField_printable.ss index ca000527..533f8235 100644 --- a/templates/SSReportTableField_printable.ss +++ b/templates/SSReportTableField_printable.ss @@ -8,13 +8,13 @@ <%-- --%> - <% with Form.Controller %> + <% with $Form.Controller %>

$CurrentReport.Title

- <% with CurrentReport.getCmsFields %> - <% if Name == Filters %> + <% with $CurrentReport.getCmsFields %> + <% if $Name == Filters %>

Filters

    - <% loop FieldSet %> + <% loop $FieldSet %>
  • $Title = $performReadonlyTransformation.Field
  • <% end_loop %>
diff --git a/templates/SiteTree_Information.ss b/templates/SiteTree_Information.ss index adfd11e5..5b122564 100644 --- a/templates/SiteTree_Information.ss +++ b/templates/SiteTree_Information.ss @@ -1,6 +1,6 @@

<% _t('SiteTree.LASTSAVED', 'Last saved') %> $LastEdited.Ago(0) - <% if ExistsOnLive %> + <% if $ExistsOnLive %>
<% _t('SiteTree.LASTPUBLISHED', 'Last published') %> $Live.LastEdited.Ago(0) <% else %>
<% _t('SiteTree.NOTPUBLISHED', 'Not published') %> diff --git a/templates/forms/SiteTreeURLSegmentField.ss b/templates/forms/SiteTreeURLSegmentField.ss index 86ebe260..619875e9 100644 --- a/templates/forms/SiteTreeURLSegmentField.ss +++ b/templates/forms/SiteTreeURLSegmentField.ss @@ -7,12 +7,12 @@

- + - <% if HelpText %>

$HelpText

<% end_if %> + <% if $HelpText %>

$HelpText

<% end_if %>
\ No newline at end of file