- Undo renaming 2.2.1 branch to 2.2.1-r1

- Current status of Foundry


git-svn-id: https://svn.libreccm.org/ccm/trunk@2867 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-09-17 06:15:07 +00:00
parent d5deb7c8fe
commit 403678753c
7 changed files with 255 additions and 40 deletions

View File

@ -27,7 +27,7 @@
</section> </section>
<section id="user-manual"> <section id="user-manual">
<h1>User Manual</h1> <h1>User Manual</h1>
<section id="user/about-foundry"> <section id="user_about-foundry">
<h1>About Foundry</h1> <h1>About Foundry</h1>
<p> <p>
Placeholder Placeholder

View File

@ -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. This variables stores the XML created by CCM for later access.
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:variable name="result-tree" select="/bebop:page"/> <xsl:variable name="data-tree" select="/bebop:page"/>
<!-- **************************************************************************** --> <!-- **************************************************************************** -->

View File

@ -24,24 +24,10 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
xslns:func="http://exslt.org/functions"
xmlns:ui="http://www.arsdigita.com/ui/1.0" xmlns:ui="http://www.arsdigita.com/ui/1.0"
version="1.0"> version="1.0">
<foundry:doc section="devel">
<foundry:doc-param name="template-file"
mandantory="yes">
The name of the template file to process.
</foundry:doc-param>
<foundry:doc-desc>
This template is the entry point for the template parser.
</foundry:doc-desc>
</foundry:doc>
<xsl:template name="foundry:process-template">
<xsl:param name="template-file"/>
<xsl:apply-templates select="document(concat($theme-prefix, '/templates/', $template-file))"/>
</xsl:template>
<foundry:doc section="user"> <foundry:doc section="user">
<foundry:doc-desc> <foundry:doc-desc>
Root element of a template. Generates the doctype statement and and Root element of a template. Generates the doctype statement and and
@ -50,7 +36,7 @@
</foundry:doc> </foundry:doc>
<xsl:template match="page-layout"> <xsl:template match="page-layout">
<xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;</xsl:text> <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;</xsl:text>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="lang"> <xsl:attribute name="lang">
<xsl:value-of select="$language"/> <xsl:value-of select="$language"/>
</xsl:attribute> </xsl:attribute>
@ -80,7 +66,133 @@
<xsl:apply-templates/> <xsl:apply-templates/>
</div> </div>
</xsl:template> </xsl:template>
<!--
========================================================
Common helper templates/functions for all templates tags
-->
<foundry:doc section="devel">
<foundry:doc-desc>
Helper functions for generating the name of the colorset class.
</foundry:doc-desc>
</foundry:doc>
<func:function name="foundry:get-colorset">
<func:result>
<xsl:for-each select="$data-tree/nav:categoryMenu/nav:category/nav:category">
<xsl:if test="@isSelected = 'true'">
<xsl:text>colorset_</xsl:text>
<xsl:value-of select="position()"/>
</xsl:if>
</xsl:for-each>
</func:result>
</func:function>
<foundry:doc section="devel">
<foundry:doc-desc>
Helper functions for retrieving the name of the content type of the current content item
from the result tree XML.
</foundry:doc-desc>
</foundry:doc>
<func:function name="foundry:get-content-type-name">
<func:result>
<xsl:value-of select="$data-tree//cms:item/type/label"/>
</func:result>
</func:function>
<foundry:doc section="devel">
<foundry:doc-desc>
Helper template for processing arrows/links for sorting items.
</foundry:doc-desc>
</foundry:doc>
<xsl:template name="foundry:move-buttons">
<span class="move-button">
<xsl:if test="@prevURL">
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@prevURL"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="'moveUp'"/>
</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:value-of select="concat($context-prefix, '/assets/gray-triangle-up.gif')"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="'moveUp'"/>
</xsl:attribute>
</img>
</a>
</xsl:if>
</span>
<span class="move-button">
<xsl:if test="@nextURL">
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@nextURL"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="'moveDown'"/>
</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:value-of select="concat($context-prefix, '/assets/gray-triangle-down.gif')"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="'moveDown'"/>
</xsl:attribute>
</img>
</a>
</xsl:if>
</span>
</xsl:template>
<foundry:doc section="devel">
<foundry:doc-desc>
Helper template for processing additional attributes in the data tree XML. They copied
literally from the XML the HTML.
</foundry:doc-desc>
</foundry:doc>
<xsl:template name="foundry:process-attributes">
<xsl:for-each select="@*">
<xsl:if test="(name() != 'href_no_javascript')
and (name() != 'hint')
and (name() != 'label')">
<xsl:attribute name="{name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:if>
</xsl:for-each>
<xsl:if test="name() = 'bebop:formWidget' and (not(@id) and @name)">
<xsl:attribute name="id">
<xsl:value-of select="@name"/>
</xsl:attribute>
</xsl:if>
</xsl:template>
<foundry:doc section="devel">
<foundry:doc-param name="template-file"
mandantory="yes">
The name of the template file to process.
</foundry:doc-param>
<foundry:doc-desc>
This template is the entry point for the template parser.
</foundry:doc-desc>
</foundry:doc>
<xsl:template name="foundry:process-template">
<xsl:param name="template-file"/>
<xsl:apply-templates select="document(concat($theme-prefix, '/templates/', $template-file))"/>
</xsl:template>
<foundry:doc section="devel">
<foundry:doc-desc>
Helper template for setting the <code>id</code> and <code>class</code> attributes
on a HTML element.
</foundry:doc-desc>
</foundry:doc>
<xsl:template name="mandalay:set-id-and-class"> <xsl:template name="mandalay:set-id-and-class">
<xsl:param name="current-layout-node" select="."/> <xsl:param name="current-layout-node" select="."/>
@ -100,13 +212,13 @@
<xsl:variable name="type-class"> <xsl:variable name="type-class">
<xsl:if test="$current-layout-node/@setTypeClass='true'"> <xsl:if test="$current-layout-node/@setTypeClass='true'">
<xsl:call-template name="mandalay:getContentTypeName"/> <xsl:value-of select="foundry:get-content-type-name()"/>
</xsl:if> </xsl:if>
</xsl:variable> </xsl:variable>
<xsl:variable name="color-class"> <xsl:variable name="color-class">
<xsl:if test="$current-layout-node/@withColorset='true'"> <xsl:if test="$current-layout-node/@withColorset='true'">
<xsl:call-template name="mandalay:getColorset"/> <xsl:value-of select="foundry:get-colorset()"/>
</xsl:if> </xsl:if>
</xsl:variable> </xsl:variable>
@ -122,5 +234,6 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -26,7 +26,7 @@
<xsl:template match="show-page-title"> <xsl:template match="show-page-title">
<xsl:choose> <xsl:choose>
<xsl:when test="name(..) = 'title'"> <xsl:when test="name(./..) = 'title'">
<xsl:value-of select="foundry:title()"/> <xsl:value-of select="foundry:title()"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>

View File

@ -192,7 +192,7 @@
<head> <head>
<meta name="generator"> <meta name="generator">
<xsl:attribute name="content"> <xsl:attribute name="content">
<xsl:value-of select="concat($result-tree/bebop:systemInformation/@appname, ' ', $result-tree/bebop:systemInformation/@version)"/> <xsl:value-of select="concat($data-tree/bebop:systemInformation/@appname, ' ', $data-tree/bebop:systemInformation/@version)"/>
</xsl:attribute> </xsl:attribute>
</meta> </meta>
@ -213,14 +213,14 @@
<xsl:call-template name="bebop:double-click-protection"/> <xsl:call-template name="bebop:double-click-protection"/>
<xsl:apply-templates select="$result-tree//script"/> <xsl:apply-templates select="$data-tree//script"/>
<!-- <!--
Set favicon if exists. This three different variants for including the favicon Set favicon if exists. This three different variants for including the favicon
are necessary to satisfy all browsers. are necessary to satisfy all browsers.
--> -->
<link href="{$theme-prefix}/images/favicon.png" <link href="{$theme-prefix}/images/favicon.png"
type="image/png" type="image/png"
rel="shortcut icon"/> rel="shortcut icon"/>
</head> </head>
</xsl:template> </xsl:template>
@ -406,12 +406,16 @@
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
<p> <p>
Generates the title in the HTML head. The other elements are allowed in the Generates the title in the HTML head. The other elements are allowed in the
<code>&lt;title&gt;</code> tag: <code>&lt;title&gt;</code> tag:
</p> </p>
<ul> <ul>
<li><code>show-text</code></li> <li>
<li><code>show-page-title</code></li> <code>show-text</code>
</li>
<li>
<code>show-page-title</code>
</li>
</ul> </ul>
</foundry:doc-desc> </foundry:doc-desc>
<foundry:doc-see-also> <foundry:doc-see-also>
@ -422,7 +426,7 @@
</foundry:doc> </foundry:doc>
<xsl:template match="title"> <xsl:template match="title">
<title> <title>
<xsl:for-each select="showText | usePageTitle"> <xsl:for-each select="show-text | show-page-title">
<xsl:apply-templates select="."/> <xsl:apply-templates select="."/>
<xsl:if test="position() != last()"> <xsl:if test="position() != last()">
<xsl:value-of select="foundry:get-setting('layout-parser', <xsl:value-of select="foundry:get-setting('layout-parser',

View File

@ -27,8 +27,106 @@
xmlns:ui="http://www.arsdigita.com/ui/1.0" xmlns:ui="http://www.arsdigita.com/ui/1.0"
version="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>&lt;link&gt;</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: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 &lt; '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>&lt;link rel="stylesheet" href="..."/&gt; </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) &gt; 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>
<xsl:template match="load-fancybox"> <xsl:template match="load-fancybox">

View File

@ -365,42 +365,42 @@ EXSLT functions.
<func:result> <func:result>
<xsl:choose> <xsl:choose>
<!-- Use fixed title for some special content items --> <!-- Use fixed title for some special content items -->
<xsl:when test="$resultTree//cms:contentPanel"> <xsl:when test="$data-tree//cms:contentPanel">
<xsl:choose> <xsl:choose>
<!-- Glossary --> <!-- 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:value-of select="foundry:get-static-text('layout/page/title/glossary')"/>
</xsl:when> </xsl:when>
<!-- FAQ --> <!-- 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:value-of select="foundry:get-static-text('layout/page/title/faq')"/>
</xsl:when> </xsl:when>
<!-- Else use title of CI --> <!-- Else use title of CI -->
<xsl:otherwise> <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:call-template>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<!-- Localized title for A-Z list --> <!-- 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:value-of select="foundry:get-static-text('layout/page/title/atoz')"/>
</xsl:when> </xsl:when>
<!-- Localized title for search --> <!-- 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:value-of select="foundry:get-static-text('layout/page/title/search')"/>
</xsl:when> </xsl:when>
<!-- Localized title for log in --> <!-- 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:value-of select="foundry:get-static-text('layout/page/title/login')"/>
</xsl:when> </xsl:when>
<!-- Localited title for sitemap --> <!-- 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:value-of select="foundry:get-static-text('layout/page/title/sitemap')"/>
</xsl:when> </xsl:when>
<!-- Title for content section--> <!-- Title for content section-->
<xsl:otherwise> <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> <xsl:choose>
<!-- Special rule: Use content item title für root-page in navigation --> <!-- Special rule: Use content item title für root-page in navigation -->
<xsl:when test="position() = last() and position() = 1"> <xsl:when test="position() = last() and position() = 1">