Fixes for several loader functions in Foundry
git-svn-id: https://svn.libreccm.org/ccm/trunk@2980 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b5f0c78969
commit
c3115830e8
|
|
@ -4,11 +4,11 @@
|
||||||
<!--
|
<!--
|
||||||
<application name = "" page-class=""></application>
|
<application name = "" page-class=""></application>
|
||||||
-->
|
-->
|
||||||
<application name="admin" internal="true">admin-layout.xml</application>
|
<application name="admin" origin="internal">admin-layout.xml</application>
|
||||||
<application name="login" internal="true">admin-layout.xml</application>
|
<application name="login" origin="internal">admin-layout.xml</application>
|
||||||
<application name="navigation" class="portalPage">portal-workspace.xml</application>
|
<application name="navigation" class="portalPage">portal-workspace.xml</application>
|
||||||
<application name="navigation" class="portalGridPage">portal-workspace-grid.xml</application>
|
<application name="navigation" class="portalGridPage">portal-workspace-grid.xml</application>
|
||||||
<application name="none" class="cms-admin" internal="true">admin-layout.xml</application>
|
<application name="none" class="cms-admin" origin="internal">admin-layout.xml</application>
|
||||||
<application name="portal">portal-workspace.xml</application>
|
<application name="portal">portal-workspace.xml</application>
|
||||||
<default>default-layout.xml</default>
|
<default>default-layout.xml</default>
|
||||||
</applications>
|
</applications>
|
||||||
|
|
|
||||||
|
|
@ -483,20 +483,22 @@
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template name="foundry:process-template">
|
<xsl:template name="foundry:process-template">
|
||||||
<xsl:param name="template-file" as="xs:string"/>
|
<xsl:param name="template-file" as="xs:string"/>
|
||||||
<xsl:param name="internal" as="xs:boolean" select="false()"/>
|
<xsl:param name="origin" as="xs:string" select="''"/>
|
||||||
|
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('process-template called with template-file = ', $template-file, ' and origin = ', $origin)"/>
|
||||||
|
</xsl:message>
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('using template file: ', foundry:gen-path(
|
||||||
|
concat('templates/',
|
||||||
|
normalize-space($template-file)),
|
||||||
|
$origin))"/>
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$internal = true()">
|
|
||||||
<xsl:apply-templates select="document(foundry:gen-path(
|
|
||||||
concat('foundry/templates/',
|
|
||||||
normalize-space($template-file))))"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:apply-templates select="document(foundry:gen-path(
|
<xsl:apply-templates select="document(foundry:gen-path(
|
||||||
concat('templates/',
|
concat('templates/',
|
||||||
normalize-space($template-file))))"/>
|
normalize-space($template-file)),
|
||||||
</xsl:otherwise>
|
$origin))"/>
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="foundry:process-title-attribute">
|
<xsl:template name="foundry:process-title-attribute">
|
||||||
|
|
|
||||||
|
|
@ -170,13 +170,13 @@
|
||||||
<xsl:when test="string-length($media) > 0">
|
<xsl:when test="string-length($media) > 0">
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="{foundry:gen-path(concat('styles/', $media, '/', $filename, $origin))}"
|
href="{foundry:gen-path(concat('styles/', $media, '/', $filename), $origin)}"
|
||||||
media="{$media}" />
|
media="{$media}" />
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="{foundry:gen-path(concat('styles/', $filename, $origin))}" />
|
href="{foundry:gen-path(concat('styles/', $filename), $origin)}" />
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
||||||
|
|
@ -37,37 +37,30 @@
|
||||||
|
|
||||||
<xsl:template match="bebop:page">
|
<xsl:template match="bebop:page">
|
||||||
|
|
||||||
<!--<xsl:variable name="application">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="./@application">
|
|
||||||
<xsl:value-of select="./@application"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="'none'"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>-->
|
|
||||||
|
|
||||||
<xsl:variable name="class" select="@class" />
|
<xsl:variable name="class" select="@class" />
|
||||||
|
|
||||||
<xsl:variable name="app-layout-template-file"
|
<xsl:variable name="app-layout-template-file"
|
||||||
select="foundry:get-app-layout-template(foundry:get-current-application(),
|
select="foundry:get-app-layout-template(foundry:get-current-application(),
|
||||||
foundry:get-current-application-class())"/>
|
foundry:get-current-application-class())"/>
|
||||||
|
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('app-layout-template-file = ', $app-layout-template-file)"/>
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$app-layout-template-file = ''">
|
<xsl:when test="$app-layout-template-file = ''">
|
||||||
<xsl:call-template name="foundry:process-template">
|
<xsl:call-template name="foundry:process-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="'default-layout.xml'"/>
|
select="'default-layout.xml'"/>
|
||||||
<xsl:with-param name="internal" select="true()"/>
|
<xsl:with-param name="origin" select="internal"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:call-template name="foundry:process-template">
|
<xsl:call-template name="foundry:process-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$app-layout-template-file"/>
|
select="$app-layout-template-file"/>
|
||||||
<xsl:with-param name="internal"
|
<xsl:with-param name="origin"
|
||||||
select="foundry:app-layout-template-is-internal(foundry:get-current-application(),
|
select="foundry:app-layout-template-get-origin(foundry:get-current-application(),
|
||||||
foundry:get-current-application-class())"/>
|
foundry:get-current-application-class())"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
|
@ -144,6 +137,10 @@
|
||||||
<xsl:param name="application" as="xs:string"/>
|
<xsl:param name="application" as="xs:string"/>
|
||||||
<xsl:param name="class" as="xs:string"/>
|
<xsl:param name="class" as="xs:string"/>
|
||||||
|
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('templates.xml path: ', foundry:gen-path('conf/templates.xml'))"/>
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]">
|
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]">
|
||||||
<xsl:sequence select="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]"/>
|
<xsl:sequence select="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]"/>
|
||||||
|
|
@ -164,19 +161,28 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<xsl:function name="foundry:app-layout-template-is-internal" as="xs:boolean">
|
<xsl:function name="foundry:app-layout-template-get-origin" as="xs:string">
|
||||||
<xsl:param name="application" as="xs:string"/>
|
<xsl:param name="application" as="xs:string"/>
|
||||||
<xsl:param name="class" as="xs:string"/>
|
<xsl:param name="class" as="xs:string"/>
|
||||||
|
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('trying to determine origin for template file for application = ', $application, ' and class = ', $class)"/>
|
||||||
|
</xsl:message>
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('using templates file: ', foundry:gen-path('conf/templates.xml'))"/>
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]">
|
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]
|
||||||
<xsl:sequence select="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]/@internal = 'true'"/>
|
and document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]/@origin">
|
||||||
|
<xsl:sequence select="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]/@origin"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and not(@class)]">
|
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and not(@class)]
|
||||||
<xsl:sequence select="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and not(@class)]/@internal = 'true'"/>
|
and document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and not(@class)]/@origin">
|
||||||
|
<xsl:sequence select="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and not(@class)]/@origin"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:sequence select="false()"/>
|
<xsl:sequence select="''"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue