git-svn-id: https://svn.libreccm.org/ccm/trunk@159 8810af33-2d31-482b-a856-94f89814c4df

master
jensp 2009-05-10 11:27:40 +00:00
parent b4b202e80a
commit a189ecb48f
7 changed files with 35 additions and 14 deletions

View File

@ -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);

View File

@ -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"/>

View File

@ -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>

View File

@ -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>

View File

@ -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() {

View File

@ -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);