Some bugfixes for the Foundry master theme
git-svn-id: https://svn.libreccm.org/ccm/trunk@2979 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
2156e9b5a6
commit
b5f0c78969
|
|
@ -62,9 +62,13 @@ processor, some are read from the configuration files of Foundry and some are de
|
|||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:variable name="theme-mode" select="foundry:get-setting('global',
|
||||
'theme-mode',
|
||||
'master')"/>
|
||||
<!--
|
||||
We have to duplicate the logic of foundry:get-setting here because otherwise
|
||||
theme-mode would depend on its own value.
|
||||
-->
|
||||
<xsl:variable name="theme-mode"
|
||||
select="document(concat($theme-prefix, '/conf/global.xml'))/foundry:configuration/setting[@id='theme-mode']"/>
|
||||
|
||||
<foundry:doc section="devel" type="env-var">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@
|
|||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="body">
|
||||
<body>
|
||||
<body id="site-body">
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes"/>
|
||||
|
||||
<xsl:if test="foundry:debug-enabled()">
|
||||
|
|
@ -427,6 +427,10 @@
|
|||
<dd>
|
||||
<xsl:value-of select="$foundry-version"/>
|
||||
</dd>
|
||||
<dt>Theme mode</dt>
|
||||
<dd>
|
||||
<xsl:value-of select="$theme-mode"/>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id="foundry-debug-panel-layout" class="foundry-debug-panel-box">
|
||||
|
|
@ -486,7 +490,7 @@
|
|||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<span id="top"/>
|
||||
<!--<span id="top"/>-->
|
||||
<a href="#startcontent" accesskey="S" class="nav-hide">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="foundry:get-static-text('', 'layout/page/skipnav/title')"/>
|
||||
|
|
@ -1140,7 +1144,7 @@
|
|||
<xsl:if test="foundry:debug-enabled()">
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{foundry:gen-path('foundry/styles/debug-mode.css')}"/>
|
||||
href="{foundry:gen-path('styles/debug-mode.css', 'internal')}"/>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Not implemented yet <xsl:call-template name="bebop:double-click-protection"/> -->
|
||||
|
|
|
|||
|
|
@ -166,45 +166,17 @@
|
|||
<xsl:param name="media" select="''"/>
|
||||
<xsl:param name="origin" select="''"/>
|
||||
|
||||
<!--<xsl:variable name="style-dir">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$origin = ''">
|
||||
<xsl:value-of select="'styles/'"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$origin = 'internal'">
|
||||
<xsl:value-of select="'foundry/styles/'"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with($origin, '/') and ends-with($origin, '/')">
|
||||
<xsl:value-of select="substring($origin, 2)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="starts-with($origin, '/')">
|
||||
<xsl:value-of select="concat(substring($origin, 2), '/')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="ends-with($origin, '/')">
|
||||
<xsl:value-of select="$origin"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat($origin, '/')"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>-->
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($media) > 0">
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{foundry:gen-path(concat('css/', $media, '/', $filename, $origin))}"
|
||||
href="{foundry:gen-path(concat('styles/', $media, '/', $filename, $origin))}"
|
||||
media="{$media}" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{foundry:gen-path(concat('css/', $filename, $origin))}" />
|
||||
href="{foundry:gen-path(concat('styles/', $filename, $origin))}" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
|
|
|||
|
|
@ -186,13 +186,6 @@
|
|||
<xsl:param name="path" as="xs:string"/>
|
||||
<xsl:param name="origin" as="xs:string"/>
|
||||
|
||||
<!--<xsl:variable name="theme-mode" select="foundry:get-setting('global',
|
||||
'theme-mode',
|
||||
'master')"/>
|
||||
<xsl:variable name="master-theme" select="foundry:get-setting('global',
|
||||
'master-theme',
|
||||
'foundry')"/>-->
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$origin = ''">
|
||||
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
||||
|
|
@ -201,7 +194,7 @@
|
|||
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$origin = 'master' and $theme-mode = 'child'">
|
||||
<xsl:sequence select="concat($dispatcher-prefix,
|
||||
<xsl:sequence select="concat($context-prefix,
|
||||
'/themes/',
|
||||
$master-theme,
|
||||
'/',
|
||||
|
|
@ -211,8 +204,8 @@
|
|||
<xsl:sequence select="concat($theme-prefix, '/foundry/', $path)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$origin = 'internal' and $theme-mode = 'child'">
|
||||
<xsl:sequence select="concat($dispatcher-prefix,
|
||||
'/themes/foundry/',
|
||||
<xsl:sequence select="concat($context-prefix,
|
||||
'/themes/foundry/foundry/',
|
||||
$path)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
|
|
|||
Loading…
Reference in New Issue