- 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-94f89814c4dfmaster
parent
d5deb7c8fe
commit
403678753c
|
|
@ -27,7 +27,7 @@
|
|||
</section>
|
||||
<section id="user-manual">
|
||||
<h1>User Manual</h1>
|
||||
<section id="user/about-foundry">
|
||||
<section id="user_about-foundry">
|
||||
<h1>About Foundry</h1>
|
||||
<p>
|
||||
Placeholder
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:variable name="result-tree" select="/bebop:page"/>
|
||||
<xsl:variable name="data-tree" select="/bebop:page"/>
|
||||
|
||||
<!-- **************************************************************************** -->
|
||||
|
||||
|
|
|
|||
|
|
@ -24,24 +24,10 @@
|
|||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
xmlns:foundry="http://foundry.libreccm.org"
|
||||
xslns:func="http://exslt.org/functions"
|
||||
xmlns:ui="http://www.arsdigita.com/ui/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-desc>
|
||||
Root element of a template. Generates the doctype statement and and
|
||||
|
|
@ -50,7 +36,7 @@
|
|||
</foundry:doc>
|
||||
<xsl:template match="page-layout">
|
||||
<xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:attribute name="lang">
|
||||
<xsl:value-of select="$language"/>
|
||||
</xsl:attribute>
|
||||
|
|
@ -80,7 +66,133 @@
|
|||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</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:param name="current-layout-node" select="."/>
|
||||
|
||||
|
|
@ -100,13 +212,13 @@
|
|||
|
||||
<xsl:variable name="type-class">
|
||||
<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:variable>
|
||||
|
||||
<xsl:variable name="color-class">
|
||||
<xsl:if test="$current-layout-node/@withColorset='true'">
|
||||
<xsl:call-template name="mandalay:getColorset"/>
|
||||
<xsl:value-of select="foundry:get-colorset()"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
|
|
@ -122,5 +234,6 @@
|
|||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<xsl:template match="show-page-title">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name(..) = 'title'">
|
||||
<xsl:when test="name(./..) = 'title'">
|
||||
<xsl:value-of select="foundry:title()"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@
|
|||
<head>
|
||||
<meta name="generator">
|
||||
<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>
|
||||
</meta>
|
||||
|
||||
|
|
@ -213,14 +213,14 @@
|
|||
|
||||
<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
|
||||
are necessary to satisfy all browsers.
|
||||
-->
|
||||
<link href="{$theme-prefix}/images/favicon.png"
|
||||
type="image/png"
|
||||
rel="shortcut icon"/>
|
||||
type="image/png"
|
||||
rel="shortcut icon"/>
|
||||
</head>
|
||||
</xsl:template>
|
||||
|
||||
|
|
@ -406,12 +406,16 @@
|
|||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Generates the title in the HTML head. The other elements are allowed in the
|
||||
<code><title></code> tag:
|
||||
Generates the title in the HTML head. The other elements are allowed in the
|
||||
<code><title></code> tag:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>show-text</code></li>
|
||||
<li><code>show-page-title</code></li>
|
||||
<li>
|
||||
<code>show-text</code>
|
||||
</li>
|
||||
<li>
|
||||
<code>show-page-title</code>
|
||||
</li>
|
||||
</ul>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
|
|
@ -422,7 +426,7 @@
|
|||
</foundry:doc>
|
||||
<xsl:template match="title">
|
||||
<title>
|
||||
<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',
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in New Issue