LastModified now uses the correct auditing information (Ticket #1934).

git-svn-id: https://svn.libreccm.org/ccm/trunk@2578 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-03-21 10:12:25 +00:00
parent 9c63398588
commit c1e64375dc
2 changed files with 37 additions and 18 deletions

View File

@ -39,7 +39,8 @@
exclude-result-prefixes="xsl bebop cms nav mandalay" exclude-result-prefixes="xsl bebop cms nav mandalay"
version="1.0"> version="1.0">
<xsl:template name="mandalay:lastModified"> <!--<xsl:template name="mandalay:lastModified">-->
<xsl:template match="auditing" mode="auditing">
<xsl:param name="layoutTree" select="."/> <xsl:param name="layoutTree" select="."/>
<xsl:variable name="setDateAndTime"> <xsl:variable name="setDateAndTime">
@ -94,7 +95,7 @@
<!-- DE Nur anzeigen, wenn ein audition-Tag vorhanden ist --> <!-- DE Nur anzeigen, wenn ein audition-Tag vorhanden ist -->
<!-- EN Show only, if there is a auditing tag --> <!-- EN Show only, if there is a auditing tag -->
<xsl:if test="$resultTree//auditing"> <!--<xsl:if test=".">-->
<div id="lastModifiedDate"> <div id="lastModifiedDate">
<xsl:call-template name="mandalay:getStaticText"> <xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'lastModified'"/> <xsl:with-param name="module" select="'lastModified'"/>
@ -102,15 +103,15 @@
</xsl:call-template> </xsl:call-template>
<xsl:choose> <xsl:choose>
<xsl:when test="$setShowLongDate = 'true'"> <xsl:when test="$setShowLongDate = 'true'">
<xsl:value-of select="$resultTree//auditing/lastModifiedDate/@longDate"/> <xsl:value-of select="./lastModifiedDate/@longDate"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$resultTree//auditing/lastModifiedDate/@date"/> <xsl:value-of select="./lastModifiedDate/@date"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:if test="$setDateAndTime = 'true'"> <xsl:if test="$setDateAndTime = 'true'">
&nbsp; &nbsp;
<xsl:value-of select="$resultTree//auditing/lastModifiedDate/@time"/> <xsl:value-of select="./lastModifiedDate/@time"/>
</xsl:if> </xsl:if>
<!-- DE Die erweiterten Angaben nur anzeigen, wenn der User angemeldet ist --> <!-- DE Die erweiterten Angaben nur anzeigen, wenn der User angemeldet ist -->
@ -123,18 +124,18 @@
<xsl:with-param name="id" select="'lastModifiedBy'"/> <xsl:with-param name="id" select="'lastModifiedBy'"/>
</xsl:call-template> </xsl:call-template>
<xsl:choose> <xsl:choose>
<xsl:when test="$resultTree//auditing/lastModifiedUser"> <xsl:when test="./lastModifiedUser">
<xsl:choose> <xsl:choose>
<xsl:when test="$setMailto = 'true'"> <xsl:when test="$setMailto = 'true'">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="concat('mailto:', $resultTree//auditing/lastModifiedUser/primaryEmail)"/> <xsl:value-of select="concat('mailto:', ./lastModifiedUser/primaryEmail)"/>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="$resultTree//auditing/lastModifiedUser/displayName"/> <xsl:value-of select="./lastModifiedUser/displayName"/>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$resultTree//auditing/lastModifiedUser/displayName"/> <xsl:value-of select="./lastModifiedUser/displayName"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
@ -143,19 +144,19 @@
<xsl:when test="$setMailto = 'true'"> <xsl:when test="$setMailto = 'true'">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="concat('mailto:', $resultTree//auditing/creationUser/primaryEmail)"/> <xsl:value-of select="concat('mailto:', ./creationUser/primaryEmail)"/>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="$resultTree//auditing/creationUser/displayName"/> <xsl:value-of select="./creationUser/displayName"/>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$resultTree//auditing/creationUser/displayName"/> <xsl:value-of select="./creationUser/displayName"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</span> </span>
<xsl:if test="$setShowCreator = 'true' and not($resultTree//auditing/creationUser/id = $resultTree//auditing/lastModifiedUser/id)"> <xsl:if test="$setShowCreator = 'true' and not(./creationUser/id = ./lastModifiedUser/id)">
<xsl:value-of select="$separator"/> <xsl:value-of select="$separator"/>
<span id="lastModifiedCreator"> <span id="lastModifiedCreator">
<xsl:call-template name="mandalay:getStaticText"> <xsl:call-template name="mandalay:getStaticText">
@ -166,13 +167,13 @@
<xsl:when test="$setMailto = 'true'"> <xsl:when test="$setMailto = 'true'">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="concat('mailto:', $resultTree//auditing/creationUser/primaryEmail)"/> <xsl:value-of select="concat('mailto:', ./creationUser/primaryEmail)"/>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="$resultTree//auditing/creationUser/displayName"/> <xsl:value-of select="./creationUser/displayName"/>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$resultTree//auditing/creationUser/displayName"/> <xsl:value-of select="./creationUser/displayName"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</span> </span>
@ -180,7 +181,7 @@
</div> </div>
</xsl:if> </xsl:if>
</div> </div>
</xsl:if> <!--</xsl:if>-->
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -388,7 +388,25 @@
</xsl:template> </xsl:template>
<xsl:template match="useLastModified"> <xsl:template match="useLastModified">
<xsl:call-template name="mandalay:lastModified"/> <!--<xsl:call-template name="mandalay:lastModified"/>-->
<xsl:choose>
<!-- Detail view of a content item -->
<xsl:when test="$resultTree/bobop:page/cms:item/masterVersion/auditing">
<xsl:apply-templates select="$resultTree/bobop:page/cms:item/masterVersion/auditing"
mode="auditing"/>
</xsl:when>
<!-- Greeting Item -->
<xsl:when test="$resultTree/bebop:page/nav:greetingItem/masterVersion/auditing">
<xsl:apply-templates select="$resultTree/bobop:page/nav:greetingItem/masterVersion/auditing"
mode="auditing"/>
</xsl:when>
<!-- Fallback -->
<xsl:otherwise>
<xsl:apply-templates select="$resultTree//auditing"
mode="auditing"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template> </xsl:template>
<xsl:template match="usePageTitle"> <xsl:template match="usePageTitle">