Syncing Foundry files
git-svn-id: https://svn.libreccm.org/ccm/trunk@2899 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d337647696
commit
6f89ff9d92
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<css-files>
|
||||
</css-files>
|
||||
|
|
@ -8,6 +8,14 @@
|
|||
</applications>
|
||||
|
||||
<content-items>
|
||||
<default>content-items/default.xml</default>
|
||||
<detail>
|
||||
<content-item content-type="com.arsdigita.cms.contenttypes.Article">
|
||||
content-items/article-detail.xml
|
||||
</content-item>
|
||||
<default>content-items/detail-default.xml</default>
|
||||
</detail>
|
||||
<list>
|
||||
<default>content-items/list-default.xml</default>
|
||||
</list>
|
||||
</content-items>
|
||||
</template>
|
||||
</templates>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,20 @@
|
|||
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
|
||||
|
||||
<jsp:directive.page import="javax.xml.transform.TransformerFactory"/>
|
||||
<jsp:directive.page import="javax.xml.transform.Transformer"/>
|
||||
<jsp:directive.page import="javax.xml.transform.stream.StreamSource"/>
|
||||
<jsp:directive.page import="javax.xml.transform.stream.StreamResult"/>
|
||||
|
||||
<jsp:scriptlet>
|
||||
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
|
||||
TransformerFactory factory = TransformerFactory.newInstance();
|
||||
Transformer transformer = factory.newTransformer(new StreamSource("../start.xsl"));
|
||||
System.out.println(request.getContextPath());
|
||||
transformer.setParameter("theme-prefix", request.getRequestURI() + "/../");
|
||||
transformer.transform(new StreamSource("foundry-documentation.xml"),
|
||||
new StreamResult(response.getOutputStream()));
|
||||
|
||||
</jsp:scriptlet>
|
||||
</jsp:root>
|
||||
|
|
@ -201,12 +201,12 @@
|
|||
<xsl:when test="$internal = true()">
|
||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||
'foundry/templates/',
|
||||
$template-file))"/>
|
||||
normalize-space($template-file)))"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||
'/templates/',
|
||||
$template-file))"/>
|
||||
normalize-space($template-file)))"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
||||
exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
|
||||
version="2.0">
|
||||
|
||||
<xsl:import href="content-items/article.xsl"/>
|
||||
|
||||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
|
|
@ -85,32 +87,66 @@
|
|||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:template match="content-item">
|
||||
<xsl:variable name="mode">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./@mode = 'detail'">
|
||||
<xsl:value-of select="'detail'"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./@mode = 'list'">
|
||||
<xsl:value-of select="'list'"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'detail'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$data-tree/cms:contentPanel or $data-tree/nav:greetingItem">
|
||||
<xsl:variable name="contentitem-tree">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$data-tree/nav:greetingItem">
|
||||
<xsl:value-of select="$data-tree/nav:greetingItem/cms:item"/>
|
||||
<xsl:copy-of select="$data-tree/nav:greetingItem/cms:item/*"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$data-tree/cms:contentPanel/cms:item"/>
|
||||
<xsl:copy-of select="$data-tree/cms:contentPanel/cms:item/*"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="oid" select="$contentitem-tree/masterVersion/@oid"/>
|
||||
|
||||
<xsl:variable name="content-section"
|
||||
select="$contentitem-tree/../cms:pathInfo/cms:sectionPath"/>
|
||||
<xsl:variable name="content-section">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$data-tree/nav:greetingItem">
|
||||
<xsl:value-of select="$data-tree/nav:greetingItem/cms:pathInfo/cms:sectionPath"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$data-tree/cms:contentPanel/cms:pathInfo/cms:sectionPath"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="category" select="foundry:read-current-category()"/>
|
||||
|
||||
<xsl:variable name="content-type" select="$contentitem-tree/object-type"/>
|
||||
<xsl:variable name="content-type" select="$contentitem-tree/objectType"/>
|
||||
|
||||
<xsl:variable name="template-map"
|
||||
select="document($theme-prefix/conf/templates.xml)/templates/content-items"/>
|
||||
<xsl:variable name="template-map">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mode = 'list'">
|
||||
<xsl:copy-of select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/content-items/list/*"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:copy-of select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/content-items/detail/*"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$template-map/content-item[@oid = $oid]">
|
||||
<xsl:message>
|
||||
<xsl:value-of select="foundry:message-info('Found template for this special item.')"/>
|
||||
</xsl:message>
|
||||
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="$template-map/content-item[@oid = $oid]"/>
|
||||
|
|
@ -122,7 +158,7 @@
|
|||
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
||||
and @category = $category
|
||||
and @content-type = $content-type]">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="$template-map/content-item[@content-section = $content-section
|
||||
and @category = $category
|
||||
|
|
@ -148,7 +184,7 @@
|
|||
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
||||
and not(@category)
|
||||
and @content-type = $content-type]">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="$template-map/content-item[@content-section = $content-section
|
||||
and not(@category)
|
||||
|
|
@ -161,7 +197,7 @@
|
|||
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
||||
and not(@category)
|
||||
and not(@content-type)]">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="$template-map/content-item[@content-section = $content-section
|
||||
and not(@category)
|
||||
|
|
@ -174,7 +210,7 @@
|
|||
<xsl:when test="$template-map/content-item[not(@content-section)
|
||||
and @category = $category
|
||||
and @content-type = $content-type]">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="$template-map/content-item[not(@content-section)
|
||||
and @category = $category
|
||||
|
|
@ -187,7 +223,7 @@
|
|||
<xsl:when test="$template-map/content-item[not(@content-section)
|
||||
and @category = $category
|
||||
and not(@content-type)]">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="$template-map/content-item[not(@content-section)
|
||||
and @category = $category
|
||||
|
|
@ -200,7 +236,7 @@
|
|||
<xsl:when test="$template-map/content-item[not(@content-section)
|
||||
and not(@category)
|
||||
and @content-type = $content-type]">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="$template-map/content-item[not(@content-section)
|
||||
and not(@category)
|
||||
|
|
@ -211,17 +247,30 @@
|
|||
</xsl:when>
|
||||
|
||||
<xsl:when test="$template-map/default">
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:message>
|
||||
<xsl:value-of select="foundry:message-info('No template for item found. Using default')"/>
|
||||
</xsl:message>
|
||||
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="'contentitem-default.xml'"/>
|
||||
select="$template-map/default"/>
|
||||
<xsl:with-param name="contentitem-tree"
|
||||
select="$contentitem-tree"/>
|
||||
<xsl:with-param name="internal" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
<xsl:value-of select="foundry:message-info('No template for item found and not default configured. Using internal default')"/>
|
||||
</xsl:message>
|
||||
|
||||
<xsl:call-template name="foundry:process-contentitem-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="concat('contentitem-default-', $mode ,'.xml')"/>
|
||||
<xsl:with-param name="contentitem-tree"
|
||||
select="$contentitem-tree"/>
|
||||
<xsl:with-param name="internal" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
|
|
@ -236,7 +285,7 @@
|
|||
<xsl:when test="$internal = true()">
|
||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||
'foundry/templates/',
|
||||
$template-file))">
|
||||
normalize-space($template-file)))">
|
||||
<xsl:with-param name="contentitem-tree"
|
||||
tunnel="yes"
|
||||
select="$contentitem-tree"/>
|
||||
|
|
@ -245,7 +294,7 @@
|
|||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||
'/templates/',
|
||||
$template-file))">
|
||||
normalize-space($template-file)))">
|
||||
<xsl:with-param name="contentitem-tree"
|
||||
tunnel="yes"
|
||||
select="$contentitem-tree"/>
|
||||
|
|
@ -253,5 +302,9 @@
|
|||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="content-item-layout">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
|
||||
|
||||
This file is part of the Foundry Theme Engine for LibreCCM
|
||||
|
||||
Foundry is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Foundry is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foundry If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||
xmlns:foundry="http://foundry.libreccm.org"
|
||||
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
||||
exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
|
||||
version="2.0">
|
||||
|
||||
<xsl:template match="/content-item-layout//lead-text">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:value-of select="$contentitem-tree/lead"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/content-item-layout//main-text">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:value-of select="$contentitem-tree/textAsset/content"
|
||||
disable-output-escaping="yes"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -24,9 +24,6 @@
|
|||
exclude-result-prefixes="xsl foundry"
|
||||
version="2.0">
|
||||
|
||||
<xsl:template match="content-item">
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="user"
|
||||
type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
|
|
|
|||
|
|
@ -205,6 +205,41 @@
|
|||
<xsl:template match="body">
|
||||
<body>
|
||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||
|
||||
<xsl:if test="foundry:debug-enabled()">
|
||||
<div id="foundry-debug-panel">
|
||||
<div id="foundry-debug-panel-content">
|
||||
<h1>Foundry Debug Panel</h1>
|
||||
<div>
|
||||
<h2>Foundry system information</h2>
|
||||
<dl>
|
||||
<dt>Version</dt>
|
||||
<dd>
|
||||
<xsl:value-of select="$foundry-version"/>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Server related environment variables</h2>
|
||||
<dl>
|
||||
<dt>theme-prefix</dt>
|
||||
<dd>
|
||||
<xsl:value-of select="$theme-prefix"/>
|
||||
</dd>
|
||||
<dt>context-prefix</dt>
|
||||
<dd>
|
||||
<xsl:value-of select="$context-prefix"/>
|
||||
</dd>
|
||||
<dt>dispatcher-prefix</dt>
|
||||
<dd>
|
||||
<xsl:value-of select="$dispatcher-prefix"/>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<span id="top"/>
|
||||
<a href="#startcontent" accesskey="S" class="nav-hide">
|
||||
<xsl:attribute name="title">
|
||||
|
|
@ -212,6 +247,7 @@
|
|||
</xsl:attribute>
|
||||
<xsl:value-of select="foundry:get-static-text('', 'layout/page/skipnav/link')"/>
|
||||
</a>
|
||||
|
||||
<xsl:apply-templates/>
|
||||
</body>
|
||||
</xsl:template>
|
||||
|
|
@ -394,7 +430,12 @@
|
|||
</meta>-->
|
||||
|
||||
<xsl:apply-templates/>
|
||||
|
||||
|
||||
<!-- Load the CSS files for Foundry's debug mode if debug mode is active -->
|
||||
<xsl:if test="foundry:debug-enabled()">
|
||||
<link rel="stylesheet" type="text/css" href="{$theme-prefix}/foundry/styles/debug-mode.css"/>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Not implemented yet <xsl:call-template name="bebop:double-click-protection"/> -->
|
||||
|
||||
<xsl:apply-templates select="$data-tree//script"/>
|
||||
|
|
@ -664,7 +705,7 @@
|
|||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tbody">
|
||||
<xsl:template match="tbody">
|
||||
<tbody>
|
||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||
<xsl:apply-templates/>
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ XSLT 2.0 functions.
|
|||
</foundry:doc-params>
|
||||
<foundry:doc-result type="xs:string">
|
||||
<p>
|
||||
A message string of the for <code>[Foundry $level] $message</code> with
|
||||
A message string of the form <code>[Foundry $level] $message</code> with
|
||||
<code>$level</code> and <code>$message</code> replaced by the values of the
|
||||
parameters.
|
||||
</p>
|
||||
|
|
@ -183,6 +183,12 @@ XSLT 2.0 functions.
|
|||
The message text.
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result type="xs:string">
|
||||
<p>
|
||||
A message string of the form <code>[Foundry INFO] $message</code> with
|
||||
<code>$message</code> replaced by the value of the parameter.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Helper function to generate an info message. This function be used together with
|
||||
|
|
@ -215,6 +221,12 @@ XSLT 2.0 functions.
|
|||
The message text.
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result type="xs:string">
|
||||
<p>
|
||||
A message string of the form <code>[Foundry WARNING] $message</code> with
|
||||
<code>$message</code> replaced by the value of the parameter.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Helper function to generate an info message. This function be used together with
|
||||
|
|
@ -242,13 +254,19 @@ XSLT 2.0 functions.
|
|||
<xsl:sequence select="foundry:message('WARNING', $message)"/>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-params>
|
||||
<foundry:doc-param name="message"
|
||||
mandatory="yes">
|
||||
The message text.
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result type="xs:string">
|
||||
<p>
|
||||
A message string of the form <code>[Foundry ERROR] $message</code> with
|
||||
<code>$message</code> replaced by the value of the parameter.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Helper function to generate an info message. This function be used together with
|
||||
|
|
@ -277,7 +295,7 @@ XSLT 2.0 functions.
|
|||
<xsl:sequence select="foundry:message('ERROR', $message)"/>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-params>
|
||||
<foundry:doc-param name="node">
|
||||
The node from which the value of the attribute is read.
|
||||
|
|
@ -290,8 +308,10 @@ XSLT 2.0 functions.
|
|||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result>
|
||||
The value of the attribute if it is set on the current element, the
|
||||
<code>default-value</code> otherwise.
|
||||
<p>
|
||||
The value of the attribute if it is set on the current element, the
|
||||
<code>default-value</code> otherwise.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
|
|
@ -334,6 +354,31 @@ XSLT 2.0 functions.
|
|||
</xsl:choose>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Convenient function for calling <code>foundry:get-setting</code> with only the
|
||||
module name and setting name.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-params>
|
||||
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||
<p>
|
||||
The module of the settings. May be an empty string (<code>''</code>).
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="setting" mandatory="yes" type="string">
|
||||
<p>
|
||||
The name of the setting to retrieve.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result type="string">
|
||||
<p>
|
||||
The value of the setting.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:get-setting" as="xs:string">
|
||||
<xsl:param name="module" as="xs:string"/>
|
||||
<xsl:param name="setting" as="xs:string"/>
|
||||
|
|
@ -341,6 +386,36 @@ XSLT 2.0 functions.
|
|||
<xsl:sequence select="foundry:get-setting($module, $setting, '', '')"/>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Convenient function for calling <code>foundry:get-setting</code> with only the
|
||||
module name, the setting name and an default value.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-params>
|
||||
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||
<p>
|
||||
The module of the settings. May be an empty string (<code>''</code>).
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="setting" mandatory="yes" type="string">
|
||||
<p>
|
||||
The name of the setting to retrieve.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="default" mandatory="yes" type="string">
|
||||
<p>
|
||||
A default value which is used when the setting is not configured.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result type="string">
|
||||
<p>
|
||||
The value of the setting or the default value if the setting is not configured.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:get-setting" as="xs:string">
|
||||
<xsl:param name="module" as="xs:string"/>
|
||||
<xsl:param name="setting" as="xs:string"/>
|
||||
|
|
@ -351,36 +426,34 @@ XSLT 2.0 functions.
|
|||
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc-params>
|
||||
<foundry:doc-param name="module"
|
||||
mandatory="yes">
|
||||
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||
<p>
|
||||
The module of the settings. At the moment this corresponds to the name of the file
|
||||
in the <code>conf</code> directory. The empty string as value corresponds to the
|
||||
<code>global.xml</code> file.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="setting"
|
||||
mandatory="yes">
|
||||
<foundry:doc-param name="setting" mandatory="yes" type="string">
|
||||
<p>
|
||||
The name of the setting to retrieve.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="default"
|
||||
mandatory="no">
|
||||
<foundry:doc-param name="default" mandatory="no" type="string">
|
||||
<p>
|
||||
The value to use if there is no entry for the setting in the settings file.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="node"
|
||||
mandatory="no">
|
||||
<foundry:doc-param name="node" mandatory="no" type="string">
|
||||
<p>
|
||||
A node from the layout template which overrides the value from the configuration.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result>
|
||||
The value of the requested setting or if no value has been set the provided default
|
||||
value. If no default value has been provided the result is an empty string.
|
||||
<foundry:doc-result type="string">
|
||||
<p>
|
||||
The value of the requested setting or if no value has been set the provided default
|
||||
value. If no default value has been provided the result is an empty string.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
This function retrieves the value of a setting from the theme configuration. For
|
||||
|
|
@ -441,39 +514,40 @@ XSLT 2.0 functions.
|
|||
<xsl:sequence select="foundry:get-static-text($module, $id, $html, $lang)"/>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-params>
|
||||
<foundry:doc-param name="module"
|
||||
mandatory="yes">
|
||||
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||
<p>
|
||||
he module of the settings. At the moment this corresponds to the name of the file
|
||||
in the <code>texts</code> directory. The empty string as value corresponds to the
|
||||
<code>global.xml</code> file.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="id"
|
||||
mandatory="yes">
|
||||
<foundry:doc-param name="id" mandatory="yes" type="string">
|
||||
The name of the text to retrieve.
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="lang"
|
||||
mandatory="no">
|
||||
<foundry:doc-param name="lang" mandatory="no" type="string">
|
||||
<p>
|
||||
The language to retrieve. Normally there is no need to set this parameter because
|
||||
it is determined automatically.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result>
|
||||
The requested static text. If there is no value for the requested static text in the
|
||||
module provided by the module parameter the value depends if the debug mode is
|
||||
enabled or not. If the debug mode is <em>not</em> not enabled the result is an empty
|
||||
string. If the debug mode is enabled, a identifier of the text (the value of the
|
||||
<code>id</code> parameter) is displayed. If you point the mouse pointer of the
|
||||
placeholder, the complete path of the text is shown as hovering box.
|
||||
<foundry:doc-result type="string">
|
||||
<p>
|
||||
The requested static text. If there is no value for the requested static text in the
|
||||
module provided by the module parameter the value depends if the debug mode is
|
||||
enabled or not. If the debug mode is <em>not</em> not enabled the result is an empty
|
||||
string. If the debug mode is enabled, a identifier of the text (the value of the
|
||||
<code>id</code> parameter) is displayed. If you point the mouse pointer of the
|
||||
placeholder, the complete path of the text is shown as hovering box.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
Retrieves at static text. For more informations about static texts in Foundry please
|
||||
refer to the static texts section in the Foundry documentation.
|
||||
<p>
|
||||
Retrieves at static text. For more informations about static texts in Foundry please
|
||||
refer to the static texts section in the Foundry documentation.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:get-static-text" as="xs:string">
|
||||
|
|
@ -544,31 +618,43 @@ XSLT 2.0 functions.
|
|||
</xsl:choose>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-result>
|
||||
<code>true</code> if the debug mode if active, <code>false</code> otherwise.
|
||||
<p>
|
||||
<code>true</code> if the debug mode if active, <code>false</code> otherwise.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
A helper function to determine if the debug mode should be enabled. The debug mode
|
||||
of foundry is automatically enabled if the theme is viewed as development theme.
|
||||
<p>
|
||||
A helper function to determine if the debug mode should be enabled. The debug mode
|
||||
of foundry is automatically enabled if the theme is viewed as development theme.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:debug-enabled" as="xs:boolean">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($theme-prefix, 'devel-themedir')">
|
||||
<xsl:message>
|
||||
debug mode active
|
||||
</xsl:message>
|
||||
<xsl:sequence select="true()"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
debug mode NOT active
|
||||
</xsl:message>
|
||||
<xsl:sequence select="false()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="function-template">
|
||||
<foundry:doc-desc>
|
||||
Helper template for processing additional attributes. This are copied from the result
|
||||
tree XML created by CCM to the HTML output generated by Foundry without any further
|
||||
processing.
|
||||
<p>
|
||||
Helper template for processing additional attributes. This are copied from the result
|
||||
tree XML created by CCM to the HTML output generated by Foundry without any further
|
||||
processing.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:template name="foundry:process-attributes">
|
||||
|
|
@ -588,15 +674,22 @@ XSLT 2.0 functions.
|
|||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="function">
|
||||
<xsl:doc-desc>
|
||||
A helper function for reading the current category from the <code>datatree</code>. The
|
||||
function joins the titles of all categories in <code>nav:categoryPath</code> to a
|
||||
string. The tokens a separated by a slash (<code>/</code>).
|
||||
<p>
|
||||
A helper function for reading the current category from the <code>datatree</code>. The
|
||||
function joins the titles of all categories in <code>nav:categoryPath</code> to a
|
||||
string. The tokens a separated by a slash (<code>/</code>).
|
||||
</p>
|
||||
</xsl:doc-desc>
|
||||
<foundry:doc-result>
|
||||
<p>
|
||||
The path of the current category.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:read-current-category">
|
||||
<xsl:sequence select="string-join($data-tree/nav:categoryPath/@title, '/')"/>
|
||||
<xsl:sequence select="string-join($data-tree/nav:categoryPath/nav:category/@title, '/')"/>
|
||||
</xsl:function>
|
||||
|
||||
<xsl:function name="foundry:shying" as="xs:string">
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
</xsl:message>
|
||||
<xsl:call-template name="foundry:process-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="document(concat($theme-prefix, '/conf/templates.xml'))/applications/application[@name=$application and not(@class)]"/>
|
||||
select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/applications/application[@name=$application and not(@class)]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
|
@ -73,10 +73,10 @@
|
|||
<xsl:value-of select="foundry:message-info('Using default layout')"/>
|
||||
</xsl:message>
|
||||
<xsl:choose>
|
||||
<xsl:when test="document(concat($theme-prefix, '/conf/templates.xml'))/applications/default">
|
||||
<xsl:when test="document(concat($theme-prefix, '/conf/templates.xml'))/templates/applications/default">
|
||||
<xsl:call-template name="foundry:process-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="document(concat($theme-prefix, '/conf/templates.xml'))/applications/default"/>
|
||||
select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/applications/default"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
|
@ -99,41 +99,14 @@
|
|||
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="devel">
|
||||
<!--<foundry:doc section="devel">
|
||||
<foundry:doc-desc>
|
||||
The entry point for creating Foundry documentation.
|
||||
<p>
|
||||
The entry point for creating Foundry documentation.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
</foundry:doc>-->
|
||||
<xsl:template match="/foundry:documentation">
|
||||
<!--<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=UTF-8"/>
|
||||
<title>Foundry Theming Engine for LibreCCM - Documentation</title>
|
||||
<style type="text/css">
|
||||
.missing-static-text {
|
||||
border: 2px solid red;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
Header
|
||||
</header>
|
||||
<nav>
|
||||
Navigation
|
||||
</nav>
|
||||
<main>
|
||||
<xsl:apply-templates/>
|
||||
</main>
|
||||
<footer>
|
||||
Footer
|
||||
</footer>
|
||||
</body>
|
||||
</html>-->
|
||||
|
||||
<xsl:apply-templates select="document(concat($theme-prefix, '/foundry/templates/doc/foundry-documentation.xml'))"/>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
#foundry-debug-panel {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
#foundry-debug-panel #foundry-debug-panel-content{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#foundry-debug-panel:hover {
|
||||
width: 100%;
|
||||
height: 24em;
|
||||
background-color: #000;
|
||||
/*border: 1px solid #0ff;*/
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
#foundry-debug-panel:hover #foundry-debug-panel-content {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
margin: 0.2em 1em;
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
color: #0ff;
|
||||
}
|
||||
|
||||
#foundry-debug-panel:hover #foundry-debug-panel-content dl {
|
||||
|
||||
}
|
||||
|
||||
#foundry-debug-panel:hover #foundry-debug-panel-content dt {
|
||||
float: left;
|
||||
width: 15em;
|
||||
}
|
||||
|
||||
#foundry-debug-panel:hover #foundry-debug-panel-content dt::after {
|
||||
content: " = ";
|
||||
}
|
||||
|
||||
#foundry-debug-panel:hover #foundry-debug-panel-content dd {
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
#foundry-debug-panel:hover #foundry-debug-panel-content dd::after {
|
||||
clear: both;
|
||||
content: " ";
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<content-item-layout>
|
||||
|
||||
<div class="lead">
|
||||
<lead-text/>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
<main-text/>
|
||||
</div>
|
||||
|
||||
</content-item-layout>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<content-item-layout>
|
||||
<div>
|
||||
<show-property name="pageDescription"/>
|
||||
|
||||
</div>
|
||||
</content-item-layout>
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
<show-text>layout/page/head/title</show-text>
|
||||
<show-page-title/>
|
||||
</title>
|
||||
<load-css-files/>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
|
|
@ -14,7 +15,7 @@
|
|||
<navigation-title/>
|
||||
</a>
|
||||
</navigation-home-link>
|
||||
<h1><show-text>layout/page/head/title</show-text></h1>
|
||||
<h1><show-text>layout/page/head/title</show-text>: <show-page-title/></h1>
|
||||
<navigation>
|
||||
<div class="nav-wrapper">
|
||||
<navigation-links>
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
<main>
|
||||
<div>
|
||||
<h1>TEST</h1>
|
||||
<content-item/>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Reference in New Issue