git-svn-id: https://svn.libreccm.org/ccm/trunk@159 8810af33-2d31-482b-a856-94f89814c4df
parent
b4b202e80a
commit
a189ecb48f
|
|
@ -22,7 +22,7 @@ model com.arsdigita.cms.contenttypes;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
|
||||||
object type Person extends ContentPage {
|
object type GenericOrganization extends ContentPage {
|
||||||
String[0..1] organizationname = ct_genericorganizations.organizationname VARCHAR(512);
|
String[0..1] organizationname = ct_genericorganizations.organizationname VARCHAR(512);
|
||||||
|
|
||||||
reference key (ct_genericorganizations.organization_id);
|
reference key (ct_genericorganizations.organization_id);
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,19 @@
|
||||||
|
|
||||||
<ctd:content-type
|
<ctd:content-type
|
||||||
label="Genericorganization"
|
label="Genericorganization"
|
||||||
description="A generic, Genericorganization type"
|
description="A generic, GenericOrganization type"
|
||||||
objectType="com.arsdigita.cms.contenttypes.Genericorganization"
|
objectType="com.arsdigita.cms.contenttypes.GenericOrganization"
|
||||||
classname="com.arsdigita.cms.contenttypes.Genericorganization">
|
classname="com.arsdigita.cms.contenttypes.GenericOrganization">
|
||||||
|
|
||||||
<ctd:authoring-kit
|
<ctd:authoring-kit
|
||||||
createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
|
|
||||||
<ctd:authoring-step
|
<ctd:authoring-step
|
||||||
labelKey="genericorganization.authoring.basic_properties.title"
|
labelKey="genericorganization.authoring.basic_properties.title"
|
||||||
labelBundle="com.arsdigita.cms.contenttypes.GenericorganizationResources"
|
labelBundle="com.arsdigita.cms.contenttypes.GenericOrganizationResources"
|
||||||
descriptionKey="genericorganization.authoring.basic_properties.description"
|
descriptionKey="genericorganization.authoring.basic_properties.description"
|
||||||
descriptionBundle="com.arsdigita.cms.contenttypes.GenericorganizationResources"
|
descriptionBundle="com.arsdigita.cms.contenttypes.GenericOrganizationResources"
|
||||||
component="com.arsdigita.cms.contenttypes.ui.GenericorganizationPropertiesStep"
|
component="com.arsdigita.cms.contenttypes.ui.GenericOrganizationPropertiesStep"
|
||||||
ordering="1"/>
|
ordering="1"/>
|
||||||
|
|
||||||
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<registry>
|
||||||
|
<config class="com.arsdigita.cms.contenttypes.GenericOrganizationConfig"
|
||||||
|
storage="ccm-cms-types-event/genericorganization.properties"/>
|
||||||
|
</registry>
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<load>
|
||||||
|
<requires>
|
||||||
|
<table name="inits" />
|
||||||
|
<table name="acs_objects" />
|
||||||
|
<table name="cms_items" />
|
||||||
|
<initializer class="com.arsdigita.cms.Initializer" />
|
||||||
|
</requires>
|
||||||
|
<provides>
|
||||||
|
<table name="ct_genericorganizations" />
|
||||||
|
<initializer class="com.arsdigita.cms.contenttypes.GenericOrganizationInitializer"/>
|
||||||
|
</provides>
|
||||||
|
<scripts>
|
||||||
|
<schema directory="ccm-cms-types-genericorganization" />
|
||||||
|
<data class="com.arsdigita.cms.contenttypes.GenericOrganizationLoader" />
|
||||||
|
</scripts>
|
||||||
|
</load>
|
||||||
|
|
@ -31,7 +31,7 @@ public class GenericOrganizationLoader extends AbstractContentTypeLoader {
|
||||||
|
|
||||||
public static final Logger s_log = Logger.getLogger(GenericOrganizationLoader.class);
|
public static final Logger s_log = Logger.getLogger(GenericOrganizationLoader.class);
|
||||||
private static final String[] TYPES = {
|
private static final String[] TYPES = {
|
||||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Person.xml"
|
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/GenericOrganization.xml"
|
||||||
};
|
};
|
||||||
|
|
||||||
public String[] getTypes() {
|
public String[] getTypes() {
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,10 @@ public class GenericOrganizationPropertiesStep extends SimpleEditStep {
|
||||||
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
editSheet.getSaveCancelSection().getCancelButton());
|
editSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
setDisplayComponent(getPersonPropertySheet(itemModel));
|
setDisplayComponent(getGenericOrganizationPropertySheet(itemModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getPersonPropertySheet(ItemSelectionModel itemModel) {
|
public static Component getGenericOrganizationPropertySheet(ItemSelectionModel itemModel) {
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add((String)GlobalizationUtil.globalize("cms.contenttypes.ui.organizationname").localize(), GenericOrganization.ORGANIZATIONNAME);
|
sheet.add((String)GlobalizationUtil.globalize("cms.contenttypes.ui.organizationname").localize(), GenericOrganization.ORGANIZATIONNAME);
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,16 @@
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.GenericOrganization']"
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.GenericOrganization']"
|
||||||
mode="cms:CT_graphics"
|
mode="cms:CT_graphics"
|
||||||
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_GenericOrganization">
|
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_GenericOrganization">
|
||||||
<p>
|
<p>
|
||||||
<xsl:value-of select="./name"></xsl:value-of>
|
<xsl:value-of select="./name"></xsl:value-of>
|
||||||
</p>
|
</p>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.GenericOrganization']"
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.GenericOrganization']"
|
||||||
mode="cms:CT_text"
|
mode="cms:CT_text"
|
||||||
name="cms:CT_text_com_arsdigita_cms_contenttypes_GenericOrganization">
|
name="cms:CT_text_com_arsdigita_cms_contenttypes_GenericOrganization">
|
||||||
<p>
|
<p>
|
||||||
<xsl:value-of select="./name"></xsl:value-of>
|
<xsl:value-of select="./name"></xsl:value-of>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue