Fehlende XSL-Template (Platzhalter) für Journal; Formatierungen in ArticleSectionPanel.

git-svn-id: https://svn.libreccm.org/ccm/trunk@616 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2010-11-17 16:09:26 +00:00
parent b32ee91884
commit 8d2841c573
2 changed files with 28 additions and 3 deletions

View File

@ -21,7 +21,6 @@ package com.arsdigita.cms.contenttypes.ui.mparticle;
import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleComponent;
import com.arsdigita.bebop.parameters.BigDecimalParameter;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.cms.CMS;
import com.arsdigita.cms.CMSContext;
@ -29,12 +28,10 @@ import com.arsdigita.cms.CMSExcursion;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ExtraXMLGenerator;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.ArticleSection;
import com.arsdigita.cms.contenttypes.ArticleSectionCollection;
import com.arsdigita.cms.contenttypes.MultiPartArticle;
import com.arsdigita.cms.dispatcher.XMLGenerator;
import com.arsdigita.domain.DomainObjectXMLRenderer;
import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.xml.Element;
@ -70,6 +67,7 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
m_page = new PageParameter(PAGE_NUMBER_PARAM);
}
@Override
public void register(Page p) {
super.register(p);
@ -84,6 +82,9 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
* Try to get the section from the context
* if there isn't (eg if we are looking at an index
* item on a category), guess the section from the item
* @param state
* @param item
* @return
*/
protected XMLGenerator getXMLGenerator(PageState state, ContentItem item) {
ContentSection section = null;
@ -228,6 +229,7 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
* @param parent The parent DOM element
* @see com.arsdigita.cms.dispatcher.XMLGenerator
*/
@Override
public void generateXML(final PageState state,
final Element parent) {
ContentItem item = getContentItem(state);
@ -248,7 +250,11 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
/**
* Specify the XML for a given content item.
* @param item
* @param element
* @param state
*/
@Override
public void generateXML(ContentItem item, Element element, PageState state) {
Element content = element.newChildElement("cms:articleSectionPanel", CMS.CMS_XML_NS);

View File

@ -0,0 +1,19 @@
<!DOCTYPE stylesheet [
<!ENTITY nbsp "&#160;" ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
version="1.0">
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Journal']" mode="cms:CT_graphics"
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Journal">
<p><xsl:value-of select="./name"/></p>
</xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Journal']" mode="cms:CT_text"
name="cms:CT_text_com_arsdigita_cms_contenttypes_Journal">
<p><xsl:value-of select="./name"/></p>
</xsl:template>
</xsl:stylesheet>