From 1247ed50b7bd6788cef22dd69aa939e2c51c19e5 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 16 Jul 2010 11:53:39 +0000 Subject: [PATCH] First code for the department contenttype. git-svn-id: https://svn.libreccm.org/ccm/trunk@481 8810af33-2d31-482b-a856-94f89814c4df --- ccm-cms-types-department/application.xml | 24 +++++++++++++++++++ .../arsdigita/content-types/Department.pdl | 8 +++++++ .../postgres-create.sql | 3 +++ .../arsdigita/cms/contenttypes/Department.xsl | 19 +++++++++++++++ .../cms/contenttypes/Organization.java | 2 -- .../OrganizationChildrenPropertiesStep.java | 3 +-- .../cms/contenttypes/Organization.xsl | 4 ++-- 7 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 ccm-cms-types-department/application.xml create mode 100644 ccm-cms-types-department/pdl/com/arsdigita/content-types/Department.pdl create mode 100644 ccm-cms-types-department/sql/ccm-cms-types-department/postgres-create.sql create mode 100644 ccm-cms-types-department/web/static/content-types/com/arsdigita/cms/contenttypes/Department.xsl diff --git a/ccm-cms-types-department/application.xml b/ccm-cms-types-department/application.xml new file mode 100644 index 000000000..6f7f197ef --- /dev/null +++ b/ccm-cms-types-department/application.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + The Department Content Type for OpenCCM. + + diff --git a/ccm-cms-types-department/pdl/com/arsdigita/content-types/Department.pdl b/ccm-cms-types-department/pdl/com/arsdigita/content-types/Department.pdl new file mode 100644 index 000000000..0a5866bed --- /dev/null +++ b/ccm-cms-types-department/pdl/com/arsdigita/content-types/Department.pdl @@ -0,0 +1,8 @@ +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.cms.*; + +object type Department extends Organization { + reference key ( ct_departments.department_id ); +} diff --git a/ccm-cms-types-department/sql/ccm-cms-types-department/postgres-create.sql b/ccm-cms-types-department/sql/ccm-cms-types-department/postgres-create.sql new file mode 100644 index 000000000..a733590e2 --- /dev/null +++ b/ccm-cms-types-department/sql/ccm-cms-types-department/postgres-create.sql @@ -0,0 +1,3 @@ +begin; +\i ddl/postgres/create.sql +end; \ No newline at end of file diff --git a/ccm-cms-types-department/web/static/content-types/com/arsdigita/cms/contenttypes/Department.xsl b/ccm-cms-types-department/web/static/content-types/com/arsdigita/cms/contenttypes/Department.xsl new file mode 100644 index 000000000..8bfd527aa --- /dev/null +++ b/ccm-cms-types-department/web/static/content-types/com/arsdigita/cms/contenttypes/Department.xsl @@ -0,0 +1,19 @@ + +]> + + + + +

+
+ + +

+
+ +
\ No newline at end of file diff --git a/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/Organization.java b/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/Organization.java index fcf87207f..ca1a3cce8 100644 --- a/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/Organization.java +++ b/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/Organization.java @@ -1,10 +1,8 @@ package com.arsdigita.cms.contenttypes; -import com.arsdigita.cms.ContentType; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; -import com.arsdigita.util.Assert; import java.math.BigDecimal; /** diff --git a/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/ui/OrganizationChildrenPropertiesStep.java b/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/ui/OrganizationChildrenPropertiesStep.java index e1f73e301..d77e977d4 100644 --- a/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/ui/OrganizationChildrenPropertiesStep.java +++ b/ccm-cms-types-organization/src/com/arsdigita/cms/contenttypes/ui/OrganizationChildrenPropertiesStep.java @@ -5,7 +5,6 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.cms.ItemSelectionModel; -import com.arsdigita.cms.contenttypes.Organization; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; @@ -43,7 +42,7 @@ public class OrganizationChildrenPropertiesStep extends SimpleEditStep { addChildSheet.getSaveCancelSection().getCancelButton()); GenericOrganizationalUnitChildTable childrenTable = new GenericOrganizationalUnitChildTable( - (itemModel)); + itemModel); setDisplayComponent(childrenTable); } } \ No newline at end of file diff --git a/ccm-cms-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/Organization.xsl b/ccm-cms-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/Organization.xsl index 282b76080..af043b95b 100644 --- a/ccm-cms-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/Organization.xsl +++ b/ccm-cms-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/Organization.xsl @@ -8,12 +8,12 @@ -

+

-

+

\ No newline at end of file