diff --git a/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.html b/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.html index e876d5ca5..7bc81bd19 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.html +++ b/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.html @@ -27,7 +27,7 @@

User Manual

-
+

About Foundry

Placeholder diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/global-vars.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/global-vars.xsl index 2ac40f07c..1e74dc56b 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/global-vars.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/global-vars.xsl @@ -82,7 +82,7 @@ processor, some are read from the configuration files of Foundry and some are de This variables stores the XML created by CCM for later access. - + 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 060f5c3e9..ac81e41c1 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 @@ -24,24 +24,10 @@ - - - The name of the template file to process. - - - This template is the entry point for the template parser. - - - - - - - - Root element of a template. Generates the doctype statement and and @@ -50,7 +36,7 @@ <!DOCTYPE html> - + @@ -80,7 +66,133 @@ + + + + + + Helper functions for generating the name of the colorset class. + + + + + + + colorset_ + + + + + + + + + Helper functions for retrieving the name of the content type of the current content item + from the result tree XML. + + + + + + + + + + + Helper template for processing arrows/links for sorting items. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper template for processing additional attributes in the data tree XML. They copied + literally from the XML the HTML. + + + + + + + + + + + + + + + + + + + + The name of the template file to process. + + + This template is the entry point for the template parser. + + + + + + + + + + + Helper template for setting the id and class attributes + on a HTML element. + + @@ -100,13 +212,13 @@ - + - + @@ -122,5 +234,6 @@ + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl index f80979b60..8fe3ab2c1 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl @@ -26,7 +26,7 @@ - + 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 125062ab0..3d5336bf5 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 @@ -192,7 +192,7 @@ - + @@ -213,14 +213,14 @@ - + + type="image/png" + rel="shortcut icon"/> @@ -406,12 +406,16 @@

- Generates the title in the HTML head. The other elements are allowed in the - <title> tag: + Generates the title in the HTML head. The other elements are allowed in the + <title> tag:

    -
  • show-text
  • -
  • show-page-title
  • +
  • + show-text +
  • +
  • + show-page-title +
@@ -422,7 +426,7 @@ - <xsl:for-each select="showText | usePageTitle"> + <xsl:for-each select="show-text | show-page-title"> <xsl:apply-templates select="."/> <xsl:if test="position() != last()"> <xsl:value-of select="foundry:get-setting('layout-parser', diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl index c9f290c8b..52f784f24 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl @@ -27,8 +27,106 @@ xmlns:ui="http://www.arsdigita.com/ui/1.0" version="1.0"> + <foundry:doc section="user" + type="template-tag"> + <foundry:doc-desc> + Invokes the foundry CSS loader. The CSS loader will parse the file + <code>settings/css-files.xml</code> to determine for which CSS an + <code><link></code> element should be added to the HTML output. For a full + explanation please refer to the <a href="#user_css-files">CSS files section</a>. + </foundry:doc-desc> + </foundry:doc> <xsl:template match="load-css-files"> - <xsl:call-template name="foundry:load-css-files"/> + <xsl:variable name="application"> + <xsl:choose> + <xsl:when test="$resultTree/@application"> + <xsl:value-of select="$resultTree/@application"/> + </xsl:when> + <xsl:when test="$resultTree/@class"> + <xsl:value-of select="$resultTree/@class"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'none'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]"> + <xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]/css-file"> + <xsl:call-template name="foundry:load-css-file"> + <xsl:with-param name="filename" select="."/> + <xsl:with-param name="media" select="./@media"/> + </xsl:call-template> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/default/css-file"> + <xsl:call-template name="foundry:load-css-file"> + <xsl:with-param name="filename" select="."/> + <xsl:with-param name="media" select="./@media"/> + </xsl:call-template> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + + <!-- Include IE Hacks only for very old IEs (IE 6) --> + <!-- jensp 2014-09-16 This is copied from Mandalay. Maybe remove and relay and use + conditional comments in the other CSS files instead? --> + <xsl:if test="$msie_version >= '5' and $msie_version < '7'"> + <xsl:choose> + <xsl:when test="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]"> + <xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]/iehacks"> + <xsl:call-template name="foundry:load-css-file"> + <xsl:with-param name="filename" select="."/> + <xsl:with-param name="media" select="./@media"/> + </xsl:call-template> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/default/iehacks"> + <xsl:call-template name="foundry:load-css-file"> + <xsl:with-param name="filename" select="."/> + <xsl:with-param name="media" select="./@media"/> + </xsl:call-template> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + + </xsl:template> + + <foundry:doc section="devel"> + <foundry:doc-desc> + A helper template for generating the + <code><link rel="stylesheet" href="..."/> </code> elements for loading the CSS + files. + </foundry:doc-desc> + <foundry:doc-param name="filename" mandatory="yes"> + The name of the CSS file to load + </foundry:doc-param> + <foundry:doc-param name="media" mandatory="no"> + The media for which the file should be loaded. If no set, the CSS file is used for all + media types. + </foundry:doc-param> + </foundry:doc> + <xsl:template name="foundry:load-css-file"> + <xsl:param name="filename"/> + <xsl:param name="media" select="''"/> + + <xsl:choose> + <xsl:when test="string-length($media) > 0"> + <link rel="stylesheet" + type="text/css" + href="{$theme-prefix}/css/{$media}/{$filename}" + media="{$media}" /> + </xsl:when> + <xsl:otherwise> + <link rel="stylesheet" + type="text/css" + href="{$theme-prefix}/css/{$filename}" /> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="load-fancybox"> 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 bd5feee56..9f2547969 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/utils.xsl @@ -365,42 +365,42 @@ EXSLT functions. <func:result> <xsl:choose> <!-- Use fixed title for some special content items --> - <xsl:when test="$resultTree//cms:contentPanel"> + <xsl:when test="$data-tree//cms:contentPanel"> <xsl:choose> <!-- Glossary --> - <xsl:when test="$resultTree/cms:contentPanel/cms:item/type/label = 'Glossary Item'"> + <xsl:when test="$data-tree/cms:contentPanel/cms:item/type/label = 'Glossary Item'"> <xsl:value-of select="foundry:get-static-text('layout/page/title/glossary')"/> </xsl:when> <!-- FAQ --> - <xsl:when test="$resultTree/cms:contentPanel/cms:item/type/label = 'FAQ Item'"> + <xsl:when test="$data-tree/cms:contentPanel/cms:item/type/label = 'FAQ Item'"> <xsl:value-of select="foundry:get-static-text('layout/page/title/faq')"/> </xsl:when> <!-- Else use title of CI --> <xsl:otherwise> - <xsl:value-of select="foundry:shying($result-tree//cms:contentPanel/cms:item/title)"/> + <xsl:value-of select="foundry:shying($data-tree//cms:contentPanel/cms:item/title)"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> <!-- Localized title for A-Z list --> - <xsl:when test="$resultTree/bebop:title = 'AtoZ'"> + <xsl:when test="$data-tree/bebop:title = 'AtoZ'"> <xsl:value-of select="foundry:get-static-text('layout/page/title/atoz')"/> </xsl:when> <!-- Localized title for search --> - <xsl:when test="$resultTree/bebop:title = 'Search'"> + <xsl:when test="$data-tree/bebop:title = 'Search'"> <xsl:value-of select="foundry:get-static-text('layout/page/title/search')"/> </xsl:when> <!-- Localized title for log in --> - <xsl:when test="$resultTree/@application = 'login'"> + <xsl:when test="$data-tree/@application = 'login'"> <xsl:value-of select="foundry:get-static-text('layout/page/title/login')"/> </xsl:when> <!-- Localited title for sitemap --> - <xsl:when test="$resultTree/@id = 'sitemapPage'"> + <xsl:when test="$data-tree/@id = 'sitemapPage'"> <xsl:value-of select="foundry:get-static-text('layout/page/title/sitemap')"/> </xsl:when> <!-- Title for content section--> <xsl:otherwise> - <xsl:for-each select="$resultTree/nav:categoryMenu//nav:category[@isSelected='true']"> + <xsl:for-each select="$data-tree/nav:categoryMenu//nav:category[@isSelected='true']"> <xsl:choose> <!-- Special rule: Use content item title für root-page in navigation --> <xsl:when test="position() = last() and position() = 1">