From 3c553bfdc70196dae0c03f4415f294101b6e2771 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 11 Mar 2016 18:59:52 +0000 Subject: [PATCH] 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-94f89814c4df --- .../PublicPersonalProfilesServlet.java | 21 ++--- .../foundry/foundry/lib/template-tags.xsl | 3 +- .../content-items/assets/related-links.xsl | 4 +- .../template-tags/public-personal-profile.xsl | 79 +++++++++++++++++++ 4 files changed, 95 insertions(+), 12 deletions(-) create mode 100644 ccm-core/web/themes/foundry/foundry/lib/template-tags/public-personal-profile.xsl diff --git a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/publicpersonalprofile/PublicPersonalProfilesServlet.java b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/publicpersonalprofile/PublicPersonalProfilesServlet.java index dd7771b6f..f2d5cc667 100644 --- a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/publicpersonalprofile/PublicPersonalProfilesServlet.java +++ b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/publicpersonalprofile/PublicPersonalProfilesServlet.java @@ -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( diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags.xsl index e896af7b9..b43536a9a 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-tags.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags.xsl @@ -36,7 +36,8 @@ + - \ No newline at end of file + diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl index 43309b646..f32498cbc 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/assets/related-links.xsl @@ -49,7 +49,7 @@ - + @@ -178,4 +178,4 @@ - \ No newline at end of file + diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/public-personal-profile.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/public-personal-profile.xsl new file mode 100644 index 000000000..f4f0befef --- /dev/null +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/public-personal-profile.xsl @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +