Fehlende XSL-Template (Platzhalter) für Journal; Formatierungen in ArticleSectionPanel.
git-svn-id: https://svn.libreccm.org/ccm/trunk@616 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b32ee91884
commit
8d2841c573
|
|
@ -21,7 +21,6 @@ package com.arsdigita.cms.contenttypes.ui.mparticle;
|
||||||
import com.arsdigita.bebop.Page;
|
import com.arsdigita.bebop.Page;
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.bebop.SimpleComponent;
|
import com.arsdigita.bebop.SimpleComponent;
|
||||||
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||||
import com.arsdigita.cms.CMS;
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.CMSContext;
|
import com.arsdigita.cms.CMSContext;
|
||||||
|
|
@ -29,12 +28,10 @@ import com.arsdigita.cms.CMSExcursion;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ContentSection;
|
import com.arsdigita.cms.ContentSection;
|
||||||
import com.arsdigita.cms.ExtraXMLGenerator;
|
import com.arsdigita.cms.ExtraXMLGenerator;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
|
||||||
import com.arsdigita.cms.contenttypes.ArticleSection;
|
import com.arsdigita.cms.contenttypes.ArticleSection;
|
||||||
import com.arsdigita.cms.contenttypes.ArticleSectionCollection;
|
import com.arsdigita.cms.contenttypes.ArticleSectionCollection;
|
||||||
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
||||||
import com.arsdigita.cms.dispatcher.XMLGenerator;
|
import com.arsdigita.cms.dispatcher.XMLGenerator;
|
||||||
import com.arsdigita.domain.DomainObjectXMLRenderer;
|
|
||||||
import com.arsdigita.util.UncheckedWrapperException;
|
import com.arsdigita.util.UncheckedWrapperException;
|
||||||
import com.arsdigita.xml.Element;
|
import com.arsdigita.xml.Element;
|
||||||
|
|
||||||
|
|
@ -70,6 +67,7 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
|
||||||
m_page = new PageParameter(PAGE_NUMBER_PARAM);
|
m_page = new PageParameter(PAGE_NUMBER_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void register(Page p) {
|
public void register(Page p) {
|
||||||
super.register(p);
|
super.register(p);
|
||||||
|
|
||||||
|
|
@ -84,6 +82,9 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
|
||||||
* Try to get the section from the context
|
* Try to get the section from the context
|
||||||
* if there isn't (eg if we are looking at an index
|
* if there isn't (eg if we are looking at an index
|
||||||
* item on a category), guess the section from the item
|
* item on a category), guess the section from the item
|
||||||
|
* @param state
|
||||||
|
* @param item
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
protected XMLGenerator getXMLGenerator(PageState state, ContentItem item) {
|
protected XMLGenerator getXMLGenerator(PageState state, ContentItem item) {
|
||||||
ContentSection section = null;
|
ContentSection section = null;
|
||||||
|
|
@ -228,6 +229,7 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
|
||||||
* @param parent The parent DOM element
|
* @param parent The parent DOM element
|
||||||
* @see com.arsdigita.cms.dispatcher.XMLGenerator
|
* @see com.arsdigita.cms.dispatcher.XMLGenerator
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void generateXML(final PageState state,
|
public void generateXML(final PageState state,
|
||||||
final Element parent) {
|
final Element parent) {
|
||||||
ContentItem item = getContentItem(state);
|
ContentItem item = getContentItem(state);
|
||||||
|
|
@ -248,7 +250,11 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the XML for a given content item.
|
* Specify the XML for a given content item.
|
||||||
|
* @param item
|
||||||
|
* @param element
|
||||||
|
* @param state
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void generateXML(ContentItem item, Element element, PageState state) {
|
public void generateXML(ContentItem item, Element element, PageState state) {
|
||||||
|
|
||||||
Element content = element.newChildElement("cms:articleSectionPanel", CMS.CMS_XML_NS);
|
Element content = element.newChildElement("cms:articleSectionPanel", CMS.CMS_XML_NS);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE stylesheet [
|
||||||
|
<!ENTITY nbsp " " ><!-- 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>
|
||||||
Loading…
Reference in New Issue