CT Address
* Verwendet nun ausschließlich die UI von basetypes.Address CT fertig git-svn-id: https://svn.libreccm.org/ccm/trunk@439 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
7e89a378fa
commit
8fde211eba
|
|
@ -1,24 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||
name="ccm-cms-types-address"
|
||||
prettyName="Red Hat CCM Content Types"
|
||||
version="6.6.0"
|
||||
release="1"
|
||||
webapp="ROOT">
|
||||
<ccm:dependencies>
|
||||
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
||||
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
||||
</ccm:dependencies>
|
||||
<ccm:directories>
|
||||
<ccm:directory name="pdl"/>
|
||||
<ccm:directory name="sql"/>
|
||||
<ccm:directory name="src"/>
|
||||
</ccm:directories>
|
||||
<ccm:contacts>
|
||||
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
|
||||
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
|
||||
</ccm:contacts>
|
||||
<ccm:description>
|
||||
The Address Content Type for the Red Hat CCM CMS.
|
||||
</ccm:description>
|
||||
name="ccm-cms-types-address"
|
||||
prettyName="Red Hat CCM Content Types"
|
||||
version="6.6.0"
|
||||
release="1"
|
||||
webapp="ROOT">
|
||||
<ccm:dependencies>
|
||||
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
||||
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
||||
</ccm:dependencies>
|
||||
<ccm:directories>
|
||||
<ccm:directory name="pdl"/>
|
||||
<ccm:directory name="sql"/>
|
||||
<ccm:directory name="src"/>
|
||||
</ccm:directories>
|
||||
<ccm:contacts>
|
||||
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
|
||||
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
|
||||
</ccm:contacts>
|
||||
<ccm:description>
|
||||
The Address Content Type for the Red Hat CCM CMS.
|
||||
</ccm:description>
|
||||
</ccm:application>
|
||||
|
|
|
|||
|
|
@ -2,27 +2,27 @@
|
|||
|
||||
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||
|
||||
<ctd:content-type
|
||||
label="Address"
|
||||
description="An Address type"
|
||||
objectType="com.arsdigita.cms.contenttypes.Address"
|
||||
classname="com.arsdigita.cms.contenttypes.Address">
|
||||
<ctd:content-type
|
||||
label="Address"
|
||||
description="An Address type"
|
||||
objectType="com.arsdigita.cms.contenttypes.Address"
|
||||
classname="com.arsdigita.cms.contenttypes.Address">
|
||||
|
||||
<ctd:authoring-kit
|
||||
createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||
<ctd:authoring-kit
|
||||
createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||
|
||||
<ctd:authoring-step
|
||||
labelKey="address.authoring.basic_properties.title"
|
||||
labelBundle="com.arsdigita.cms.basetypes.BasetypesResources"
|
||||
descriptionKey="address.authoring.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.basetypes.BasetypesResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.AddressPropertiesStep"
|
||||
ordering="1"/>
|
||||
<ctd:authoring-step
|
||||
labelKey="address.authoring.basic_properties.title"
|
||||
labelBundle="com.arsdigita.cms.basetypes.BasetypesResources"
|
||||
descriptionKey="address.authoring.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.basetypes.BasetypesResources"
|
||||
component="com.arsdigita.cms.basetypes.ui.AddressPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||
</ctd:authoring-kit>
|
||||
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||
</ctd:authoring-kit>
|
||||
|
||||
</ctd:content-type>
|
||||
</ctd:content-type>
|
||||
</ctd:content-types>
|
||||
|
|
|
|||
|
|
@ -18,15 +18,12 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.globalization.LocaleNegotiator;
|
||||
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;
|
||||
import java.util.Locale;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* <p><code>DomainObject</code> class to represent address <code>ContentType</code>
|
||||
|
|
|
|||
|
|
@ -12,14 +12,13 @@ public class AddressInitializer extends ContentTypeInitializer {
|
|||
|
||||
public AddressInitializer() {
|
||||
super("ccm-cms-types-address.pdl.mf",
|
||||
Address.BASE_DATA_OBJECT_TYPE);
|
||||
Address.BASE_DATA_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getStylesheets() {
|
||||
return new String[] {
|
||||
"/static/content-types/com/arsdigita/cms/contenttypes/Address.xsl"
|
||||
};
|
||||
return new String[]{
|
||||
"/static/content-types/com/arsdigita/cms/contenttypes/Address.xsl"
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,5 +13,4 @@ public class AddressLoader extends AbstractContentTypeLoader {
|
|||
public String[] getTypes() {
|
||||
return TYPES;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Jens Pelzetter, for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||
|
||||
|
||||
public class AddressPropertiesStep extends com.arsdigita.cms.basetypes.ui.AddressPropertiesStep {
|
||||
|
||||
public static final String EDIT_SHEET_NAME = "edit";
|
||||
|
||||
public AddressPropertiesStep(ItemSelectionModel itemModel,
|
||||
AuthoringKitWizard parent) {
|
||||
super(itemModel, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createEditSheet(ItemSelectionModel itemModel) {
|
||||
BasicPageForm editSheet;
|
||||
editSheet = new AddressPropertyForm(itemModel, this);
|
||||
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton());
|
||||
}
|
||||
|
||||
public static Component getAddressPropertySheet(ItemSelectionModel itemModel) {
|
||||
return com.arsdigita.cms.basetypes.ui.AddressPropertiesStep.getAddressPropertySheet(itemModel);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Jens Pelzetter, for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.event.FormInitListener;
|
||||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Form to edit the properties of an address.
|
||||
*
|
||||
* @author: Jens Pelzetter
|
||||
* @author: Sören Bernstein
|
||||
*/
|
||||
public class AddressPropertyForm extends com.arsdigita.cms.basetypes.ui.AddressPropertyForm implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(AddressPropertyForm.class);
|
||||
private AddressPropertiesStep m_step;
|
||||
public static final String ID = "Address_edit";
|
||||
|
||||
public AddressPropertyForm(ItemSelectionModel itemModel) {
|
||||
this(itemModel, null);
|
||||
}
|
||||
|
||||
public AddressPropertyForm(ItemSelectionModel itemModel, AddressPropertiesStep step) {
|
||||
super(itemModel, step);
|
||||
m_step = step;
|
||||
addSubmissionListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FormSectionEvent fse) {
|
||||
super.init(fse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(FormSectionEvent fse) {
|
||||
super.process(fse);
|
||||
}
|
||||
}
|
||||
|
|
@ -6,66 +6,66 @@
|
|||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||
version="1.0">
|
||||
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Address']" mode="cms:CT_graphics"
|
||||
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Address">
|
||||
<table width="435" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="contentTitle" align="left" valign="top">
|
||||
<xsl:value-of select="./title"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<xsl:if test="./address">
|
||||
<tr>
|
||||
<th>Address:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./address"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="./postalCode">
|
||||
<tr>
|
||||
<th>Postal Code:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./postalCode"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="./city">
|
||||
<tr>
|
||||
<th>City:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./city"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="./isoCountryCode/countryName">
|
||||
<tr>
|
||||
<th>Country:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./country"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Address']" mode="cms:CT_graphics"
|
||||
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Address">
|
||||
<table width="435" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="contentTitle" align="left" valign="top">
|
||||
<xsl:value-of select="./title"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<xsl:if test="./address">
|
||||
<tr>
|
||||
<th>Address:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./address"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="./postalCode">
|
||||
<tr>
|
||||
<th>Postal Code:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./postalCode"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="./city">
|
||||
<tr>
|
||||
<th>City:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./city"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="./isoCountryCode/countryName">
|
||||
<tr>
|
||||
<th>Country:</th>
|
||||
<td class="contentText" valign="top" align="left"><xsl:value-of select="./country"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Address']" mode="cms:CT_text"
|
||||
name="cms:CT_text_com_arsdigita_cms_contenttypes_Address">
|
||||
<h1 class="title"><xsl:value-of select="./title"/></h1>
|
||||
<xsl:if test="./address">
|
||||
<span class="subtitle">Address</span>
|
||||
<span class="text"><xsl:value-of select="./address"/></span><br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="./postalCode">
|
||||
<span class="subtitle">Postal Code</span>
|
||||
<span class="text"><xsl:value-of select="./postalCode"/></span><br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="./city">
|
||||
<span class="subtitle">City</span>
|
||||
<span class="text"><xsl:value-of select="./city"/></span><br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="./isoCountryCode/countryName">
|
||||
<span class="subtitle">Country</span>
|
||||
<span class="text"><xsl:value-of select="./country"/></span><br/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Address']" mode="cms:CT_text"
|
||||
name="cms:CT_text_com_arsdigita_cms_contenttypes_Address">
|
||||
<h1 class="title"><xsl:value-of select="./title"/></h1>
|
||||
<xsl:if test="./address">
|
||||
<span class="subtitle">Address</span>
|
||||
<span class="text"><xsl:value-of select="./address"/></span><br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="./postalCode">
|
||||
<span class="subtitle">Postal Code</span>
|
||||
<span class="text"><xsl:value-of select="./postalCode"/></span><br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="./city">
|
||||
<span class="subtitle">City</span>
|
||||
<span class="text"><xsl:value-of select="./city"/></span><br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="./isoCountryCode/countryName">
|
||||
<span class="subtitle">Country</span>
|
||||
<span class="text"><xsl:value-of select="./country"/></span><br/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
Loading…
Reference in New Issue