From 0ea8b1a6661e3d9bbf502648085178d4cbc23836 Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 11 Nov 2014 14:27:24 +0000 Subject: [PATCH] Foundry: Moved logic for date formating from news.xsl to general template in template-parser.xsl to make it resuable. git-svn-id: https://svn.libreccm.org/ccm/trunk@2965 8810af33-2d31-482b-a856-94f89814c4df --- .../foundry/foundry/lib/template-parser.xsl | 109 ++++++++ .../lib/template-tags/content-items.xsl | 4 +- .../lib/template-tags/content-items/news.xsl | 248 +----------------- .../web/themes/foundry/foundry/lib/utils.xsl | 2 +- .../templates/content-items/news-detail.xml | 8 +- 5 files changed, 126 insertions(+), 245 deletions(-) diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl index e199c444c..36f507065 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl @@ -615,6 +615,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items.xsl index 7a09174d9..6d41f349d 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items.xsl @@ -552,7 +552,7 @@ - - + + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/news.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/news.xsl index ebaa11051..ecfa37e29 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/news.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/news.xsl @@ -57,251 +57,23 @@ - - - - - - - - - - - - -

- Outputs the news date in the short format as provided in the data tree by CCM. -

-
-
- - + + + + - + + + + - - - -

- Outputs the news date in the long format as provided in the data tree by CCM. -

-
-
- - - - - - - - - - - - - - - - -

- A short hand template to output the news date in ISO8601 style (yyyy-mm-dd). -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- Outputs the year of a news date. If the short attribute is set to - true only the last two columns are shown. -

-
- - -

- If set to true only the last two digits of the year are shown. -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -

- Outputs the month part of the news date. If the value has only one digit it is - prefixed by a zero by default. -

-
- - -

- If set to false one digit values (months from 1 to 9) are not - prefixed with a zero. -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -

- Outputs the month name as provided in the data tree by CCM. -

-
-
- - - - - - - - - - - - - - - -

- Outputs the day part of the news date. If the value has only one digit it is - prefixed by a zero by default. -

-
- - -

- If set to false one digit values (days from 1 to 9) are not - prefixed with a zero. -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl index 4ad192ec9..bd0630784 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl @@ -110,7 +110,7 @@ XSLT 2.0 functions. - + - + - - + + .. - +