Some bugfixes for Public Personal Profile and improvements for the support of ppp in Foundry
git-svn-id: https://svn.libreccm.org/ccm/trunk@3917 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1aab7b44eb
commit
3c553bfdc7
|
|
@ -323,7 +323,8 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
|
|||
final PublicPersonalProfileXmlGenerator generator =
|
||||
new PublicPersonalProfileXmlGenerator(
|
||||
profile);
|
||||
generator.generateXML(state, root, "");
|
||||
final Element itemRoot = root.newChildElement("nav:greetingItem", "http://ccm.redhat.com/navigation");
|
||||
generator.generateXML(state, itemRoot, "");
|
||||
} else {
|
||||
if (path.getItemPath() == null) {
|
||||
showNavItem(response, profile, path, root,
|
||||
|
|
@ -1048,14 +1049,15 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
|
|||
}
|
||||
|
||||
|
||||
final Element contentPanelElem =
|
||||
root.newChildElement("cms:contentPanel",
|
||||
CMS.CMS_XML_NS);
|
||||
final Element itemRoot = root.newChildElement("nav:greetingItem", "http://ccm.redhat.com/navigation");
|
||||
//final Element itemRoot =
|
||||
// root.newChildElement("cms:contentPanel",
|
||||
// CMS.CMS_XML_NS);
|
||||
final PublicPersonalProfileXmlGenerator generator =
|
||||
new PublicPersonalProfileXmlGenerator(
|
||||
item);
|
||||
generator.generateXML(state,
|
||||
contentPanelElem,
|
||||
itemRoot,
|
||||
"");
|
||||
}
|
||||
|
||||
|
|
@ -1163,15 +1165,16 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
|
|||
}
|
||||
|
||||
|
||||
final Element contentPanelElem =
|
||||
root.newChildElement("cms:contentPanel",
|
||||
CMS.CMS_XML_NS);
|
||||
final Element itemRoot = root.newChildElement("nav:greetingItem", "http://ccm.redhat.com/navigation");
|
||||
//final Element itemRoot =
|
||||
// root.newChildElement("cms:contentPanel",
|
||||
// CMS.CMS_XML_NS);
|
||||
|
||||
final PublicPersonalProfileXmlGenerator generator =
|
||||
new PublicPersonalProfileXmlGenerator(
|
||||
item);
|
||||
generator.generateXML(state,
|
||||
contentPanelElem,
|
||||
itemRoot,
|
||||
"");
|
||||
} catch (DataObjectNotFoundException ex) {
|
||||
logger.error(String.format(
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@
|
|||
<xsl:import href="template-tags/portal-workspace.xsl"/>
|
||||
<xsl:import href="template-tags/portal-workspace-grid.xsl"/>
|
||||
<xsl:import href="template-tags/portlets.xsl"/>
|
||||
<xsl:import href="template-tags/public-personal-profile.xsl"/>
|
||||
<xsl:import href="template-tags/subsite.xsl"/>
|
||||
<xsl:import href="template-tags/user-banner.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:if test="$contentitem-tree/links">
|
||||
<xsl:if test="$contentitem-tree/links/targetType">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
|
@ -178,4 +178,4 @@
|
|||
<xsl:value-of select="$target-item-title"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE stylesheet>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:foundry="http://foundry.libreccm.org"
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||
xmlns:ppp="http://www.arsdigita.com/PublicPersonalProfile/1.0"
|
||||
exclude-result-prefixes="xsl xs bebop foundry nav ppp"
|
||||
version="2.0">
|
||||
|
||||
<xsl:template match="public-personal-profile">
|
||||
<xsl:if test="$data-tree/ppp:profile">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="public-personal-profile//profile-image">
|
||||
<xsl:if test="$data-tree/ppp:profile/ppp:profileImage">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="public-personal-profile//profile-image//caption">
|
||||
<xsl:value-of select="$data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/caption"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="public-personal-profile//profile-image//image">
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="src"
|
||||
tunnel="yes"
|
||||
select="concat('/cms-service/stream/image/?image_id=', $data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/image/id)"/>
|
||||
<xsl:with-param name="href"
|
||||
tunnel="yes"
|
||||
select="concat('/cms-service/stream/image/?image_id=', $data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/image/id)"/>
|
||||
<xsl:with-param name="img-width"
|
||||
tunnel="yes"
|
||||
select="$data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/image/width"/>
|
||||
<xsl:with-param name="img-height"
|
||||
tunnel="yes"
|
||||
select="$data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/image/height"/>
|
||||
<xsl:with-param name="alt"
|
||||
tunnel="yes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/caption) > 0">
|
||||
<xsl:value-of select="$data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/caption"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/image/displayName"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="title"
|
||||
tunnel="yes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/caption) > 0">
|
||||
<xsl:value-of select="$data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/caption"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$data-tree/ppp:profile/ppp:profileImage/imageAttachments[1]/image/displayName"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="public-personal-profile//owner-name">
|
||||
<xsl:value-of select="$data-tree/ppp:profile/ppp:ownerName"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="content-item-layout//profile-owner">
|
||||
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||
|
||||
<xsl:if test="$contentitem-tree/profileOwner">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
Loading…
Reference in New Issue