From 932414637e82233bd1fdc308d541ebc75f79f2a2 Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 14 Oct 2014 12:00:21 +0000 Subject: [PATCH] Foundry Sync/Backup git-svn-id: https://svn.libreccm.org/ccm/trunk@2911 8810af33-2d31-482b-a856-94f89814c4df --- .../doc/static-texts/devel/coding-style.html | 2 +- .../lib/template-tags/content-items.xsl | 1 + .../assets/image-attachments.xsl | 115 ++++++++++++++++++ .../content-items/assets/related-links.xsl | 1 - .../foundry/lib/template-tags/html-tags.xsl | 114 ++++++++++++++--- .../foundry/templates/default-layout.xml | 7 ++ 6 files changed, 219 insertions(+), 21 deletions(-) create mode 100644 ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/image-attachments.xsl diff --git a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/coding-style.html b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/coding-style.html index 9724f1a7e..0b4b43969 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/coding-style.html +++ b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/coding-style.html @@ -13,7 +13,7 @@

Naming

The naming rules described here apply to all names: Names of layout elements, - XSL template names, EXSLT functions, files, ids and classes (in the + XSL template names, XSL functions, files, ids and classes (in the class attribute).

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 9de5dc6be..8de0058ef 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 @@ -30,6 +30,7 @@ version="2.0"> + diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/image-attachments.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/image-attachments.xsl new file mode 100644 index 000000000..9c28e7f41 --- /dev/null +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/image-attachments.xsl @@ -0,0 +1,115 @@ + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl index 2b8eab292..57be79e7e 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl @@ -30,7 +30,6 @@ version="2.0"> - diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/html-tags.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/html-tags.xsl index f077e15bd..1b3f4419f 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/html-tags.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/html-tags.xsl @@ -24,6 +24,7 @@ xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:ui="http://www.arsdigita.com/ui/1.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xsl bebop foundry ui" version="2.0"> @@ -352,44 +353,58 @@ - - + +

+ + +
+ + + +
+ + +
+
+ +

+

-

+

-

+

-

+

-
+
-
+
@@ -476,6 +491,60 @@ + + +

+ The img tag produces an HTML img in the HTML output. + The source URL of the image can either be provided using the attributes + src-static or src-property or by a surrounding tag + like image-attachment. If the image URL is provided by an surrouding + tag these tag usally provides values with the orginal width and height of the image. +

+

+ Depending of the format for URL, the URL is modified. There are three possible + cases: +

+
    +
  1. + The URL starts with http:// or https://. + In this case the URL is used literally. +
  2. +
  3. + The URL starts with a slash (/). In this case the URL points to + an image provided by CCM (from the database). In this case, the + dispatcher-prefix is appended before the URL. Also width and + height parameters are appended to the URL for CCM server side resizing + function. +
  4. +
  5. + Otherwise is is assumed that the image is provided by the theme. In this + cases the theme-prefix is added before the image URL. +
  6. +
+
+ + +

+ An URL to an static image resource. +

+
+ +

+ Name of an XML in the data-tree providing the URL of the image. +

+
+ +

+ The (maximum) width of the image. +

+
+ +

+ The (maximum) height of the image. +

+
+
+
@@ -483,6 +552,8 @@ + + @@ -493,7 +564,7 @@ - + @@ -504,7 +575,7 @@ --> + select="foundry:get-attribute-value(current(), 'width', -1)"/> + select="foundry:get-attribute-value(current(), 'height', -1)"/> + and $img-height > $max-height "> - + @@ -579,29 +650,29 @@ - + + select="concat('width=', $width, '&height=', $height)"/> + $src-raw, + '&', + $img-dimensions)"/> - + @@ -610,6 +681,11 @@ + + + + + diff --git a/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml b/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml index 730066017..4955fafee 100644 --- a/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml +++ b/ccm-sci-bundle/web/themes/foundry/templates/default-layout.xml @@ -51,6 +51,13 @@
+
+ + + + + +