git-svn-id: https://svn.libreccm.org/ccm/trunk@229 8810af33-2d31-482b-a856-94f89814c4df
parent
df5258be26
commit
5f1602a81e
|
|
@ -0,0 +1,3 @@
|
||||||
|
begin;
|
||||||
|
\i ddl/postgres/create.sql
|
||||||
|
end;
|
||||||
|
|
@ -18,12 +18,18 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Page;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
|
import com.arsdigita.cms.CMS;
|
||||||
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
import com.arsdigita.cms.ExtraXMLGenerator;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
import com.arsdigita.xml.Element;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
@ -31,7 +37,7 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||||
*/
|
*/
|
||||||
public class OrganizationalUnit extends ContentPage {
|
public class OrganizationalUnit extends ContentPage implements ExtraXMLGenerator {
|
||||||
|
|
||||||
private final static Logger logger = Logger.getLogger(OrganizationalUnit.class);
|
private final static Logger logger = Logger.getLogger(OrganizationalUnit.class);
|
||||||
|
|
||||||
|
|
@ -45,6 +51,7 @@ public class OrganizationalUnit extends ContentPage {
|
||||||
|
|
||||||
public OrganizationalUnit() {
|
public OrganizationalUnit() {
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
|
extraXMLGenerators.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrganizationalUnit(BigDecimal id) throws DataObjectNotFoundException {
|
public OrganizationalUnit(BigDecimal id) throws DataObjectNotFoundException {
|
||||||
|
|
@ -53,14 +60,17 @@ public class OrganizationalUnit extends ContentPage {
|
||||||
|
|
||||||
public OrganizationalUnit(OID id) throws DataObjectNotFoundException {
|
public OrganizationalUnit(OID id) throws DataObjectNotFoundException {
|
||||||
super(id);
|
super(id);
|
||||||
|
extraXMLGenerators.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrganizationalUnit(DataObject obj) {
|
public OrganizationalUnit(DataObject obj) {
|
||||||
super(obj);
|
super(obj);
|
||||||
|
extraXMLGenerators.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrganizationalUnit(String type) {
|
public OrganizationalUnit(String type) {
|
||||||
super(type);
|
super(type);
|
||||||
|
extraXMLGenerators.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* accessors ***************************************************/
|
/* accessors ***************************************************/
|
||||||
|
|
@ -114,4 +124,14 @@ public class OrganizationalUnit extends ContentPage {
|
||||||
public String getBaseDataObjectType() {
|
public String getBaseDataObjectType() {
|
||||||
return BASE_DATA_OBJECT_TYPE;
|
return BASE_DATA_OBJECT_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void generateXML(ContentItem item, Element element, PageState state) {
|
||||||
|
Element members = element.newChildElement("cms:organizationalunitMembersPanel", CMS.CMS_XML_NS);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addGlobalStateParams(Page p) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.ContentType;
|
import com.arsdigita.cms.ContentType;
|
||||||
import com.arsdigita.cms.ContentItem;
|
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,19 @@
|
||||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Person']"
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Person']"
|
||||||
mode="cms:CT_graphics"
|
mode="cms:CT_graphics"
|
||||||
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Person">
|
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Person">
|
||||||
<xsl:if test="./surname and ./givenName">
|
<!-- <xsl:if test="./surname and ./givenName"> -->
|
||||||
<p>
|
<p>
|
||||||
<xsl:value-of select="./titlepre"/> <xsl:value-of select="./givenname"/> <xsl:value-of select="./surname"/> <xsl:value-of select="./titlepost"/>
|
<xsl:value-of select="./titlepre"/> <xsl:value-of select="./givenname"/> <xsl:value-of select="./surname"/> <xsl:value-of select="./titlepost"/>
|
||||||
</p>
|
</p>
|
||||||
</xsl:if>
|
<!-- </xsl:if> -->
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Person']"
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Person']"
|
||||||
mode="cms:CT_text"
|
mode="cms:CT_text"
|
||||||
name="cms:CT_text_com_arsdigita_cms_contenttypes_Person">
|
name="cms:CT_text_com_arsdigita_cms_contenttypes_Person">
|
||||||
<xsl:if test="./surname and ./givenName">
|
|
||||||
<p>
|
<p>
|
||||||
<xsl:value-of select="./titlepre"/> <xsl:value-of select="./givenname"/> <xsl:value-of select="./surname"/> <xsl:value-of select="./titlepost"/>
|
<xsl:value-of select="./titlepre"/> <xsl:value-of select="./givenname"/> <xsl:value-of select="./surname"/> <xsl:value-of select="./titlepost"/>
|
||||||
</p>
|
</p>
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue