Some enhencements/bug fixes for Foundry

git-svn-id: https://svn.libreccm.org/ccm/trunk@3905 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2016-03-04 13:01:34 +00:00
parent 4358141570
commit 18f8d590d4
2 changed files with 38 additions and 12 deletions

View File

@ -276,7 +276,7 @@
<xsl:param name="members" tunnel="yes"/> <xsl:param name="members" tunnel="yes"/>
<xsl:variable name="layout-tree" select="./*"/> <xsl:variable name="layout-tree" select="./*"/>
<xsl:for-each select="$members/member"> <xsl:for-each select="$members/member">
<xsl:apply-templates select="$layout-tree"> <xsl:apply-templates select="$layout-tree">
<xsl:with-param name="person" <xsl:with-param name="person"
@ -359,11 +359,26 @@
</foundry:doc> </foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//if-member-role-is"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//if-member-role-is">
<xsl:param name="member-role" tunnel="yes"/> <xsl:param name="member-role" tunnel="yes"/>
<xsl:if test="$member-role = ./@role"> <xsl:if test="$member-role = ./@role">
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag">
<foundry:doc-desc>
<p>
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//*[ends-with(name(), 'members')]//member//if-member-status-is">
<xsl:param name="member-status" tunnel="yes"/>
<xsl:if test="$member-status = ./@status">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
@ -416,4 +431,4 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -142,13 +142,16 @@
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//sciproject-shortdesc"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//sciproject-shortdesc">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
<xsl:choose> <xsl:choose>
<xsl:when test="$orgaunit-data/projectShortDesc"> <xsl:when test="$orgaunit-data/projectShortDesc">
<xsl:value-of select="$orgaunit-data/projectShortDesc"/> <xsl:value-of select="$orgaunit-data/projectShortDesc"/>
</xsl:when> </xsl:when>
<xsl:when test="$orgaunit-data/shortDesc"> <xsl:when test="$orgaunit-data/shortDesc">
<xsl:value-of select="$orgaunit-data/shortDesc"/> <xsl:value-of select="$orgaunit-data/shortDesc"/>
</xsl:when> </xsl:when>
<xsl:when test="$orgaunit-data/shortDescription">
<xsl:value-of select="$orgaunit-data/shortDescription"/>
</xsl:when>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
@ -241,7 +244,7 @@
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//funding"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//funding">
<xsl:param name="orgaunit-data" tunnel="yes"/> <xsl:param name="orgaunit-data" tunnel="yes"/>
<xsl:value-of select="$orgaunit-data/funding"/> <xsl:value-of disable-output-escaping="yes" select="$orgaunit-data/funding"/>
</xsl:template> </xsl:template>
<foundry:doc section="user" type="template-tag"> <foundry:doc section="user" type="template-tag">
@ -320,7 +323,8 @@
</p> </p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//member"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//member
| content-item-layout//*[starts-with(name(), 'orgaunit')]//members//project-member">
<xsl:param name="members-datatree" tunnel="yes"/> <xsl:param name="members-datatree" tunnel="yes"/>
<xsl:param name="class-first" select="''"/> <xsl:param name="class-first" select="''"/>
<xsl:param name="class-last" select="''"/> <xsl:param name="class-last" select="''"/>
@ -328,7 +332,7 @@
<xsl:variable name="member-layouttree" select="./*"/> <xsl:variable name="member-layouttree" select="./*"/>
<xsl:variable name="separator" select="./@separator"/> <xsl:variable name="separator" select="./@separator"/>
<xsl:for-each select="$members-datatree/member"> <xsl:for-each select="$members-datatree/member">
<xsl:apply-templates select="$member-layouttree"> <xsl:apply-templates select="$member-layouttree">
<xsl:with-param name="contentitem-tree" <xsl:with-param name="contentitem-tree"
@ -351,6 +355,12 @@
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:with-param> </xsl:with-param>
<xsl:with-param name="member-role"
tunnel="yes"
select="./@role"/>
<xsl:with-param name="member-status"
tunnel="yes"
select="./@status"/>
</xsl:apply-templates> </xsl:apply-templates>
<xsl:if test="position() != last()"> <xsl:if test="position() != last()">
<xsl:value-of select="$separator"/> <xsl:value-of select="$separator"/>
@ -365,7 +375,7 @@
</p> </p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//member//surname"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//project-member//surname">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:if test="string-length($contentitem-tree/surname) &gt; 0"> <xsl:if test="string-length($contentitem-tree/surname) &gt; 0">
@ -386,7 +396,7 @@
</p> </p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//member//givenname"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//project-member//givenName">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:if test="string-length($contentitem-tree/givenName) &gt; 0"> <xsl:if test="string-length($contentitem-tree/givenName) &gt; 0">
@ -411,7 +421,7 @@
</p> </p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//member//titlePre"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//project-member//titlePre">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:if test="string-length($contentitem-tree/titlePre) &gt; 0"> <xsl:if test="string-length($contentitem-tree/titlePre) &gt; 0">
@ -433,7 +443,7 @@
</p> </p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//member//titlePost"> <xsl:template match="content-item-layout//*[starts-with(name(), 'orgaunit')]//members//project-member//titlePost">
<xsl:param name="contentitem-tree" tunnel="yes"/> <xsl:param name="contentitem-tree" tunnel="yes"/>
<xsl:if test="string-length($contentitem-tree/titlePost) &gt; 0"> <xsl:if test="string-length($contentitem-tree/titlePost) &gt; 0">
@ -446,4 +456,5 @@
</xsl:if> </xsl:if>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>