Vervollständigung Multilanguage Support.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2214 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
eaf4bb489f
commit
b656354910
|
|
@ -1,2 +1,2 @@
|
||||||
file_storage_item.authoring.file_attachment.title=File Attachment
|
file_storage_item.authoring.file_attachment.title=File
|
||||||
file_storage_item.authoring.file_attachment.description=File Attachment
|
file_storage_item.authoring.file_attachment.description=File associated with this item
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
file_storage_item.authoring.file_attachment.title=Dateianhang
|
file_storage_item.authoring.file_attachment.title=Datei
|
||||||
file_storage_item.authoring.file_attachment.description=Dateianhang
|
file_storage_item.authoring.file_attachment.description=Zugeh\u00f6rige Datei f\u00fcr dieses Dokument ("Haupt-Datei)"
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public class FileStorageItemFileEdit extends SimpleEditStep {
|
||||||
FileEditForm form = new FileEditForm(itemModel);
|
FileEditForm form = new FileEditForm(itemModel);
|
||||||
|
|
||||||
add("editfile",
|
add("editfile",
|
||||||
"Edit",
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
new WorkflowLockedComponentAccess(form, itemModel),
|
new WorkflowLockedComponentAccess(form, itemModel),
|
||||||
form.getSaveCancelSection().getCancelButton());
|
form.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ public class FileStorageItemPropertiesStep
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
|
|
||||||
editSheet = new FileStorageItemPropertyForm( itemModel, this);
|
editSheet = new FileStorageItemPropertyForm( itemModel, this);
|
||||||
add( EDIT_SHEET_NAME, "Edit",
|
add( EDIT_SHEET_NAME,
|
||||||
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
editSheet.getSaveCancelSection().getCancelButton() );
|
editSheet.getSaveCancelSection().getCancelButton() );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,11 @@ public class HealthCareFacilityAddressPropertiesStep extends SimpleEditStep {
|
||||||
//XXX
|
//XXX
|
||||||
// if(/*healthCareFacility.getAddress() == null*/ true) {
|
// if(/*healthCareFacility.getAddress() == null*/ true) {
|
||||||
BasicPageForm attachAddressSheet = new HealthCareFacilityAttachAddressPropertyForm(itemModel, this);
|
BasicPageForm attachAddressSheet = new HealthCareFacilityAttachAddressPropertyForm(itemModel, this);
|
||||||
add(ADD_ADDRESS_SHEET_NAME, (String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.attach_address").localize(), new WorkflowLockedComponentAccess(attachAddressSheet, itemModel), attachAddressSheet.getSaveCancelSection().getCancelButton());
|
add(ADD_ADDRESS_SHEET_NAME,
|
||||||
|
HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.attach_address"),
|
||||||
|
new WorkflowLockedComponentAccess(attachAddressSheet, itemModel),
|
||||||
|
attachAddressSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
/* Set the displayComponent for this step */
|
/* Set the displayComponent for this step */
|
||||||
// setDisplayComponent(getEmptyBaseAddressPropertySheet(itemModel));
|
// setDisplayComponent(getEmptyBaseAddressPropertySheet(itemModel));
|
||||||
|
|
@ -57,13 +61,21 @@ public class HealthCareFacilityAddressPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
// editAddress
|
// editAddress
|
||||||
BasicPageForm editAddressSheet = new HealthCareFacilityEditAddressPropertyForm(itemModel, this);
|
BasicPageForm editAddressSheet = new HealthCareFacilityEditAddressPropertyForm(itemModel, this);
|
||||||
add(EDIT_ADDRESS_SHEET_NAME, (String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.edit_address").localize(), new WorkflowLockedComponentAccess(editAddressSheet, itemModel), editAddressSheet.getSaveCancelSection().getCancelButton());
|
add(EDIT_ADDRESS_SHEET_NAME,
|
||||||
|
HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.edit_address"),
|
||||||
|
new WorkflowLockedComponentAccess(editAddressSheet, itemModel),
|
||||||
|
editAddressSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
// BasicPageForm attachAddressSheet = new HealthCareFacilityAttachAddressPropertyForm(itemModel, this);
|
// BasicPageForm attachAddressSheet = new HealthCareFacilityAttachAddressPropertyForm(itemModel, this);
|
||||||
// add(CHANGE_ADDRESS_SHEET_NAME, (String)HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.reattach_address").localize(), new WorkflowLockedComponentAccess(attachAddressSheet, itemModel), attachAddressSheet.getSaveCancelSection().getCancelButton());
|
// add(CHANGE_ADDRESS_SHEET_NAME, (String)HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.reattach_address").localize(), new WorkflowLockedComponentAccess(attachAddressSheet, itemModel), attachAddressSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
BasicPageForm deleteAddressSheet = new HealthCareFacilityDeleteAddressForm(itemModel, this);
|
BasicPageForm deleteAddressSheet = new HealthCareFacilityDeleteAddressForm(itemModel, this);
|
||||||
add(DELETE_ADDRESS_SHEET_NAME, (String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.delete_address").localize(), new WorkflowLockedComponentAccess(deleteAddressSheet, itemModel), deleteAddressSheet.getSaveCancelSection().getCancelButton());
|
add(DELETE_ADDRESS_SHEET_NAME,
|
||||||
|
HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.delete_address"),
|
||||||
|
new WorkflowLockedComponentAccess(deleteAddressSheet, itemModel),
|
||||||
|
deleteAddressSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
/* Set the displayComponent for this step */
|
/* Set the displayComponent for this step */
|
||||||
setDisplayComponent(getAddressPropertySheet(itemModel));
|
setDisplayComponent(getAddressPropertySheet(itemModel));
|
||||||
|
|
@ -85,7 +97,8 @@ public class HealthCareFacilityAddressPropertiesStep extends SimpleEditStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!HealthCareFacility.getConfig().getHideAddressCountry()) {
|
if (!HealthCareFacility.getConfig().getHideAddressCountry()) {
|
||||||
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.iso_country_code").localize(),
|
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.address.iso_country_code"),
|
||||||
"address." + com.arsdigita.cms.contenttypes.GenericAddress.ISO_COUNTRY_CODE,
|
"address." + com.arsdigita.cms.contenttypes.GenericAddress.ISO_COUNTRY_CODE,
|
||||||
new DomainObjectPropertySheet.AttributeFormatter() {
|
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||||
|
|
||||||
|
|
@ -107,6 +120,7 @@ public class HealthCareFacilityAddressPropertiesStep extends SimpleEditStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getEmptyAddressPropertySheet(ItemSelectionModel itemModel) {
|
public static Component getEmptyAddressPropertySheet(ItemSelectionModel itemModel) {
|
||||||
return new Label(((String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.emptyAddress").localize()));
|
return new Label((HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.emptyAddress")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,8 @@ public class HealthCareFacilityAttachAddressPropertyForm extends BasicPageForm i
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addWidgets() {
|
public void addWidgets() {
|
||||||
add(new Label((String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.select_address").localize()));
|
add(new Label(HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.select_address")));
|
||||||
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType("com.arsdigita.cms.contenttypes.GenericAddress"));
|
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType("com.arsdigita.cms.contenttypes.GenericAddress"));
|
||||||
add(this.m_itemSearch);
|
add(this.m_itemSearch);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,8 @@ public class HealthCareFacilityContactAddForm extends BasicItemForm {
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
|
|
||||||
// Attach a GenericContact object
|
// Attach a GenericContact object
|
||||||
add(new Label((String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.select_contact").localize()));
|
add(new Label(HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.select_contact")));
|
||||||
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType("com.arsdigita.cms.contenttypes.GenericContact"));
|
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType("com.arsdigita.cms.contenttypes.GenericContact"));
|
||||||
add(this.m_itemSearch);
|
add(this.m_itemSearch);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,8 @@ public class HealthCareFacilityContactPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
BasicItemForm addContactSheet = new HealthCareFacilityContactAddForm(itemModel);
|
BasicItemForm addContactSheet = new HealthCareFacilityContactAddForm(itemModel);
|
||||||
add(ADD_CONTACT_SHEET_NAME,
|
add(ADD_CONTACT_SHEET_NAME,
|
||||||
(String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.add_contact").localize(),
|
HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.add_contact"),
|
||||||
new WorkflowLockedComponentAccess(addContactSheet, itemModel),
|
new WorkflowLockedComponentAccess(addContactSheet, itemModel),
|
||||||
addContactSheet.getSaveCancelSection().getCancelButton());
|
addContactSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,8 @@ public class HealthCareFacilityDeleteAddressForm extends BasicPageForm implement
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addWidgets() {
|
public void addWidgets() {
|
||||||
add(new Label((String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.delete_address.label").localize()));
|
add(new Label(HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.delete_address.label") ));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,8 @@ public class HealthCareFacilityEditAddressPropertyForm extends BasicPageForm imp
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addWidgets() {
|
public void addWidgets() {
|
||||||
add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.address").localize()));
|
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.address.address")));
|
||||||
ParameterModel addressParam = new StringParameter(ADDRESS);
|
ParameterModel addressParam = new StringParameter(ADDRESS);
|
||||||
addressParam.addParameterListener(new NotNullValidationListener());
|
addressParam.addParameterListener(new NotNullValidationListener());
|
||||||
addressParam.addParameterListener(new StringInRangeValidationListener(0, 1000));
|
addressParam.addParameterListener(new StringInRangeValidationListener(0, 1000));
|
||||||
|
|
@ -87,33 +88,39 @@ public class HealthCareFacilityEditAddressPropertyForm extends BasicPageForm imp
|
||||||
add(address);
|
add(address);
|
||||||
|
|
||||||
if (!HealthCareFacility.getConfig().getHideAddressPostalCode()) {
|
if (!HealthCareFacility.getConfig().getHideAddressPostalCode()) {
|
||||||
add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.postal_code").localize()));
|
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.address.postal_code") ));
|
||||||
ParameterModel postalCodeParam = new StringParameter(POSTAL_CODE);
|
ParameterModel postalCodeParam = new StringParameter(POSTAL_CODE);
|
||||||
TextField postalCode = new TextField(postalCodeParam);
|
TextField postalCode = new TextField(postalCodeParam);
|
||||||
/* XXX NumberListener ?*/
|
/* XXX NumberListener ?*/
|
||||||
add(postalCode);
|
add(postalCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.city").localize()));
|
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.address.city") ));
|
||||||
ParameterModel cityParam = new StringParameter(CITY);
|
ParameterModel cityParam = new StringParameter(CITY);
|
||||||
TextField city = new TextField(cityParam);
|
TextField city = new TextField(cityParam);
|
||||||
add(city);
|
add(city);
|
||||||
|
|
||||||
if (!HealthCareFacility.getConfig().getHideAddressState()) {
|
if (!HealthCareFacility.getConfig().getHideAddressState()) {
|
||||||
add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.state").localize()));
|
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.address.state") ));
|
||||||
ParameterModel stateParam = new StringParameter(STATE);
|
ParameterModel stateParam = new StringParameter(STATE);
|
||||||
TextField state = new TextField(stateParam);
|
TextField state = new TextField(stateParam);
|
||||||
add(state);
|
add(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!HealthCareFacility.getConfig().getHideAddressCountry()) {
|
if (!HealthCareFacility.getConfig().getHideAddressCountry()) {
|
||||||
add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.iso_country_code").localize()));
|
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.address.iso_country_code") ));
|
||||||
ParameterModel countryParam = new StringParameter(ISO_COUNTRY_CODE);
|
ParameterModel countryParam = new StringParameter(ISO_COUNTRY_CODE);
|
||||||
countryParam.addParameterListener(new StringInRangeValidationListener(0, 2));
|
countryParam.addParameterListener(new StringInRangeValidationListener(0, 2));
|
||||||
|
|
||||||
SingleSelect country = new SingleSelect(countryParam);
|
SingleSelect country = new SingleSelect(countryParam);
|
||||||
|
|
||||||
country.addOption(new Option("", new Label((String) ContenttypesGlobalizationUtil.globalize("cms.ui.select_one").localize())));
|
country.addOption(new Option(
|
||||||
|
"", new Label(ContenttypesGlobalizationUtil
|
||||||
|
.globalize("cms.ui.select_one") )));
|
||||||
|
|
||||||
Iterator countries = com.arsdigita.cms.contenttypes.GenericAddress.getSortedListOfCountries(null).entrySet().iterator();
|
Iterator countries = com.arsdigita.cms.contenttypes.GenericAddress.getSortedListOfCountries(null).entrySet().iterator();
|
||||||
while (countries.hasNext()) {
|
while (countries.hasNext()) {
|
||||||
|
|
|
||||||
|
|
@ -54,22 +54,27 @@ public class HealthCareFacilityPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
/* Create the edit component for this SimpleEditStep and the corresponding link */
|
/* Create the edit component for this SimpleEditStep and the corresponding link */
|
||||||
BasicPageForm editBasicSheet = new HealthCareFacilityPropertyForm(itemModel, this);
|
BasicPageForm editBasicSheet = new HealthCareFacilityPropertyForm(itemModel, this);
|
||||||
basicProperties.add(EDIT_BASIC_SHEET_NAME, (String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.edit_basic_properties").localize(), new WorkflowLockedComponentAccess(editBasicSheet, itemModel), editBasicSheet.getSaveCancelSection().getCancelButton());
|
basicProperties.add(EDIT_BASIC_SHEET_NAME,
|
||||||
|
HealthCareFacilityGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.healthCareFacility.edit_basic_properties"),
|
||||||
|
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
|
||||||
|
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
/* Set the displayComponent for this step */
|
/* Set the displayComponent for this step */
|
||||||
basicProperties.setDisplayComponent(getHealthCareFacilityPropertySheet(itemModel));
|
basicProperties.setDisplayComponent(getHealthCareFacilityPropertySheet(itemModel));
|
||||||
|
|
||||||
/* Add the SimpleEditStep to the segmented panel */
|
/* Add the SimpleEditStep to the segmented panel */
|
||||||
segmentedPanel.addSegment(new Label((String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.basic_properties").localize()), basicProperties);
|
segmentedPanel.addSegment(new Label(HealthCareFacilityGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.healthCareFacility.basic_properties")), basicProperties);
|
||||||
|
|
||||||
// If not disabled via registry, add the ui for attaching an address
|
// If not disabled via registry, add the ui for attaching an address
|
||||||
if (!HealthCareFacility.getConfig().getHideAddress()) {
|
if (!HealthCareFacility.getConfig().getHideAddress()) {
|
||||||
HealthCareFacilityAddressPropertiesStep addressProperties = new HealthCareFacilityAddressPropertiesStep(itemModel, parent);
|
HealthCareFacilityAddressPropertiesStep addressProperties = new HealthCareFacilityAddressPropertiesStep(itemModel, parent);
|
||||||
segmentedPanel.addSegment(new Label((String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.address").localize()), addressProperties);
|
segmentedPanel.addSegment(new Label(HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.address")), addressProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
HealthCareFacilityContactPropertiesStep contactProperties = new HealthCareFacilityContactPropertiesStep(itemModel, parent);
|
HealthCareFacilityContactPropertiesStep contactProperties = new HealthCareFacilityContactPropertiesStep(itemModel, parent);
|
||||||
segmentedPanel.addSegment(new Label((String) HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.contact").localize()), contactProperties);
|
segmentedPanel.addSegment(new Label(HealthCareFacilityGlobalizationUtil.globalize("cms.contenttypes.ui.healthCareFacility.contact")), contactProperties);
|
||||||
|
|
||||||
/* Sets the composed segmentedPanel as display component */
|
/* Sets the composed segmentedPanel as display component */
|
||||||
setDisplayComponent(segmentedPanel);
|
setDisplayComponent(segmentedPanel);
|
||||||
|
|
|
||||||
|
|
@ -20,21 +20,18 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.PageState;
|
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
import com.arsdigita.cms.ContentSection;
|
import com.arsdigita.cms.ContentSection;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.Minutes;
|
import com.arsdigita.cms.contenttypes.Minutes;
|
||||||
import com.arsdigita.cms.contenttypes.util.MinutesGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.MinutesGlobalizationUtil;
|
||||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authoring step to edit the simple attributes of the Minutes content type (and
|
* Authoring step to edit the simple attributes of the Minutes content type (and
|
||||||
|
|
@ -57,7 +54,7 @@ public class MinutesPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
editSheet = new MinutesPropertyForm(itemModel,this);
|
editSheet = new MinutesPropertyForm(itemModel,this);
|
||||||
add(EDIT_SHEET_NAME,
|
add(EDIT_SHEET_NAME,
|
||||||
"Edit",
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
editSheet.getSaveCancelSection().getCancelButton());
|
editSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,12 @@ public class SurveyPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
/* Create the edit component for this SimpleEditStep and the corresponding link */
|
/* Create the edit component for this SimpleEditStep and the corresponding link */
|
||||||
BasicPageForm editBasicSheet = new SurveyPropertiesForm(itemModel, this);
|
BasicPageForm editBasicSheet = new SurveyPropertiesForm(itemModel, this);
|
||||||
basicProperties.add(EDIT_BASIC_SHEET_NAME, (String) SurveyGlobalizationUtil.globalize("cms.contenttypes.ui.survey.edit_basic_properties").localize(), new WorkflowLockedComponentAccess(editBasicSheet, itemModel), editBasicSheet.getSaveCancelSection().getCancelButton());
|
basicProperties.add(EDIT_BASIC_SHEET_NAME,
|
||||||
|
(String) SurveyGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.survey.edit_basic_properties")
|
||||||
|
.localize(),
|
||||||
|
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
|
||||||
|
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
/* Set the displayComponent for this step */
|
/* Set the displayComponent for this step */
|
||||||
basicProperties.setDisplayComponent(SurveyPropertiesStep.getSurveyPropertiesSheet(itemModel));
|
basicProperties.setDisplayComponent(SurveyPropertiesStep.getSurveyPropertiesSheet(itemModel));
|
||||||
|
|
@ -79,8 +84,14 @@ public class SurveyPropertiesStep extends SimpleEditStep {
|
||||||
/* The DisplayComponent for the Basic Properties */
|
/* The DisplayComponent for the Basic Properties */
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), "name");
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), "title");
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), "title");
|
||||||
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), "name");
|
||||||
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
|
sheet.add(GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.launch_date"),
|
||||||
|
ContentPage.LAUNCH_DATE,
|
||||||
|
new LaunchDateAttributeFormatter() );
|
||||||
|
}
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.description"), ContentPage.DESCRIPTION);
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.description"), ContentPage.DESCRIPTION);
|
||||||
|
|
||||||
sheet.add(SurveyGlobalizationUtil.globalize("cms.contenttypes.ui.survey.start_date"), Survey.START_DATE);
|
sheet.add(SurveyGlobalizationUtil.globalize("cms.contenttypes.ui.survey.start_date"), Survey.START_DATE);
|
||||||
|
|
@ -137,19 +148,6 @@ public class SurveyPropertiesStep extends SimpleEditStep {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.ui.authoring.page_launch_date"), ContentPage.LAUNCH_DATE, new DomainObjectPropertySheet.AttributeFormatter() {
|
|
||||||
|
|
||||||
public String format(DomainObject obj, String attribute, PageState state) {
|
|
||||||
ContentPage page = (ContentPage) obj;
|
|
||||||
if (page.getLaunchDate() != null) {
|
|
||||||
return DateFormat.getDateInstance(DateFormat.LONG).format(page.getLaunchDate());
|
|
||||||
} else {
|
|
||||||
return (String) GlobalizationUtil.globalize("cms.ui.unknown").localize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue