Improvments and bugfixes for Foundry done while working on the LBC theme
git-svn-id: https://svn.libreccm.org/ccm/trunk@2999 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
44c5892c20
commit
8a7fd1a3cb
|
|
@ -700,7 +700,12 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="content-item-layout">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="id"
|
||||
select="$contentitem-tree/name"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="content-item-layout//content-item-title">
|
||||
|
|
|
|||
|
|
@ -116,4 +116,30 @@
|
|||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item-list-image-attachments">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:if test="$contentitem-tree/nav:attribute[@name='imageAttachments.image.id']">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item-list-image-attachments/image-attachment">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:variable name="images-layout-tree" select="current()"/>
|
||||
|
||||
<xsl:for-each select="$contentitem-tree/nav:attribute[@name='imageAttachments.image.id']">
|
||||
<xsl:variable name="current-pos" select="position()"/>
|
||||
<xsl:apply-templates select="$images-layout-tree/*">
|
||||
<xsl:with-param name="src"
|
||||
tunnel="yes"
|
||||
select="concat('/cms-service/stream/image/?image_id=', current())"/>
|
||||
<xsl:with-param name="alt"
|
||||
tunnel="yes"
|
||||
select="$contentitem-tree/nav:attribute[@name='imageAttachments.caption']"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -70,20 +70,22 @@
|
|||
|
||||
<xsl:template match="object-list//object-list-item" name="object-list-items">
|
||||
<xsl:param name="object-list-datatree" tunnel="yes"/>
|
||||
<xsl:param name="class-first" select="''"/>
|
||||
<xsl:param name="class-last" select="''"/>
|
||||
|
||||
<!--<pre>Object-list-item</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('count(object-list-datatree) = ', count($object-list-datatree))"/>
|
||||
</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('count(object-list-datatree/*) = ', count($object-list-datatree/*))"/>
|
||||
</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('name(object-list-datatree/*[1]) = ', name($object-list-datatree/*[1]))"/>
|
||||
</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('count(object-list-datatree/nav:objectList/nav:item = ', count($object-list-datatree/nav:objectList/nav:item))"/>
|
||||
</pre>-->
|
||||
<pre>
|
||||
<xsl:value-of select="concat('count(object-list-datatree) = ', count($object-list-datatree))"/>
|
||||
</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('count(object-list-datatree/*) = ', count($object-list-datatree/*))"/>
|
||||
</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('name(object-list-datatree/*[1]) = ', name($object-list-datatree/*[1]))"/>
|
||||
</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('count(object-list-datatree/nav:objectList/nav:item = ', count($object-list-datatree/nav:objectList/nav:item))"/>
|
||||
</pre>-->
|
||||
|
||||
<xsl:variable name="object-list-item-layouttree" select="current()"/>
|
||||
|
||||
|
|
@ -94,6 +96,16 @@
|
|||
select="concat(./nav:attribute[@name = 'masterVersion.id'],
|
||||
'_',
|
||||
nav:attribute[@name = 'name'])"/>
|
||||
<xsl:with-param name="class">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() = 1">
|
||||
<xsl:value-of select="$class-first"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="position() = last()">
|
||||
<xsl:value-of select="$class-last"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:for-each>
|
||||
|
||||
|
|
@ -279,7 +291,7 @@
|
|||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Provides the URL to the next page of the list for an enclosed <code>a</code>
|
||||
Provides the URL to the next page of the list for an enclosed <code>a</code>
|
||||
element.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
|
|
@ -306,7 +318,7 @@
|
|||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Provides the URL to the first page of the list for an enclosed <code>a</code>
|
||||
Provides the URL to the first page of the list for an enclosed <code>a</code>
|
||||
element.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
|
|
@ -328,7 +340,7 @@
|
|||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Provides the URL to the last page of the list for an enclosed <code>a</code>
|
||||
Provides the URL to the last page of the list for an enclosed <code>a</code>
|
||||
element.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
|
|
|
|||
|
|
@ -30,19 +30,49 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="portal-grid-workspace//portal-grid-workspace-rows">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="./@rows">
|
||||
<xsl:variable name="rows-attr"
|
||||
select="tokenize(./@rows, ',')"/>
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="rows"
|
||||
tunnel="yes"
|
||||
select="$data-tree/portal:gridWorkspace/portal:rows/portal:row[not(empty(index-of($rows-attr, @title)))]"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="rows"
|
||||
tunnel="yes"
|
||||
select="$data-tree/portal:gridWorkspace/portal:rows/portal:row"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="portal-grid-workspace//portal-grid-workspace-rows//portal-grid-workspace-row">
|
||||
|
||||
<xsl:variable name="row-layout-tree">
|
||||
<xsl:param name="rows" tunnel="yes"/>
|
||||
|
||||
<xsl:variable name="row-layout-tree">
|
||||
<xsl:copy-of select="./*"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:for-each select="$data-tree/portal:gridWorkspace/portal:rows/portal:row">
|
||||
<xsl:apply-templates select="$row-layout-tree/*">
|
||||
<xsl:with-param name="row-data-tree" tunnel="yes" select="current()"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
<xsl:for-each select="$rows">
|
||||
<xsl:variable name="row-title" select="./@title"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$row-layout-tree/row-layout[not(empty(index-of(tokenize(@rows, ','), $row-title)))]">
|
||||
<xsl:apply-templates select="$row-layout-tree/row-layout[not(empty(index-of(tokenize(@rows, ','), $row-title)))]/*">
|
||||
<xsl:with-param name="row-data-tree" tunnel="yes" select="current()"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="$row-layout-tree/row-layout[not(@rows)]/*">
|
||||
<xsl:with-param name="row-data-tree" tunnel="yes" select="current()"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
|
@ -96,7 +126,7 @@
|
|||
|
||||
<xsl:template match="portal-grid-workspace-columns//portal-grid-workspace-column//portal-grid-workspace-column-portlets">
|
||||
<xsl:param name="column-portlets" tunnel="yes"/>
|
||||
|
||||
|
||||
<xsl:variable name="workspace"
|
||||
select="$data-tree/portal:gridWorkspace/portal:workspaceDetails/primaryURL"/>
|
||||
|
||||
|
|
@ -136,10 +166,15 @@
|
|||
<xsl:with-param name="portlet-data-tree" tunnel="yes" select="current()"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('failed to find a template for ', $classname)"/>
|
||||
</pre>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -26,23 +26,6 @@
|
|||
version="2.0">
|
||||
|
||||
<xsl:template match="portlet-layout//portlet-item-list">
|
||||
<!--<xsl:param name="portlet-data-tree" tunnel="yes"/>
|
||||
|
||||
<pre>
|
||||
<xsl:value-of select="concat('count(*) = ', count($portlet-data-tree))"/>
|
||||
</pre>
|
||||
<pre>
|
||||
<xsl:value-of select="concat('name[1] = ', name($portlet-data-tree))"/>
|
||||
</pre>
|
||||
|
||||
<xsl:variable name="object-list-datatree">
|
||||
<xsl:copy-of select="$portlet-data-tree"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="object-list-datatree" tunnel="yes" select="$portlet-data-tree"/>
|
||||
</xsl:apply-templates>
|
||||
-->
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
|
@ -51,6 +34,8 @@
|
|||
|
||||
<xsl:call-template name="object-list-items">
|
||||
<xsl:with-param name="object-list-datatree" select="$portlet-data-tree" tunnel="yes"/>
|
||||
<xsl:with-param name="class-first" select="./@class-first"/>
|
||||
<xsl:with-param name="class-last" select="./@class-last"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</xsl:template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue