diff --git a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java index 5f0b5558f..3918394ad 100755 --- a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java +++ b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java @@ -69,7 +69,7 @@ public class EventPropertiesStep extends SimpleEditStep { editSheet = new EventPropertyForm(itemModel, this); add(EDIT_SHEET_NAME, - "Edit", + GlobalizationUtil.globalize("cms.ui.edit"), new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton()); diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources.properties b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources.properties index f6f5f1247..92ae96b24 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources.properties +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources.properties @@ -29,3 +29,6 @@ cms.contenttypes.ui.mparticle.section_table.link_delete=delete cms.contenttypes.ui.mparticle.section_table.link_move=move cms.contenttypes.ui.mparticle.section_table.link_edit=edit cms.contenttypes.ui.mparticle.section.create_break=Create page break +cms.contenttypes.ui.mparticle.image.delete_button=Delete Image +cms.contenttypes.ui.mparticle.section_table.link_move_below=move belowe here +cms.contenttypes.ui.mparticle.section_table.link_not_defined=(No action possible) diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_de.properties b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_de.properties index 21c633bdd..e3f234725 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_de.properties +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_de.properties @@ -1,4 +1,4 @@ -mparticle.authoring.body_text.description=Edit the body text in sections +mparticle.authoring.body_text.description=Bearbeitung des Haupttextes in Abschnitten cms.contenttypes.ui.mparticle.add_new_section=Neuen Abschnitt hinzuf\u00fcgen cms.contenttypes.ui.mparticle.add_section=Abschnitt hinzuf\u00fcgen cms.contenttypes.ui.mparticle.an_item_with_name_already_exists=Ein Element mit dem Namen existiert bereits. @@ -17,7 +17,7 @@ cms.contenttypes.ui.mparticle.no_sections_yet=Zur Zeit keine Abschnitte cms.contenttypes.ui.mparticle.no_text_available=Kein Text verf\u00fcgbar cms.contenttypes.ui.mparticle.section_text_asset=Section text asset cms.contenttypes.ui.mparticle.section.title=Titel des Abschnitts: -cms.contenttypes.ui.mparticle.section.select_image=Select image: +cms.contenttypes.ui.mparticle.section.select_image=Bild ausw\u00e4hlen: cms.contenttypes.ui.mparticle.submission_cancelled=Vorlage verworfen cms.contenttypes.ui.mparticle.view_all_sections=Alle Abschnitte anschauen cms.contenttypes.ui.mparticle.no_launch_date=Ver\u00f6ffentlichungsdatum fehlt @@ -29,3 +29,6 @@ cms.contenttypes.ui.mparticle.section_table.link_delete=l\u00f6schen cms.contenttypes.ui.mparticle.section_table.link_move=verschieben cms.contenttypes.ui.mparticle.section_table.link_edit=bearbeiten cms.contenttypes.ui.mparticle.section.create_break=Seitenumbruch einf\u00fcgen +cms.contenttypes.ui.mparticle.image.delete_button=Bild Entfernen +cms.contenttypes.ui.mparticle.section_table.link_move_below=unterhalb verschieben +cms.contenttypes.ui.mparticle.section_table.link_not_defined=(Keine Aktion m\u00f6glich) diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_fr.properties b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_fr.properties index 247abadda..288448727 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_fr.properties +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/MultiPartArticleResources_fr.properties @@ -29,3 +29,6 @@ cms.contenttypes.ui.mparticle.section_table.link_delete=delete cms.contenttypes.ui.mparticle.section_table.link_move=move cms.contenttypes.ui.mparticle.section_table.link_edit=edit cms.contenttypes.ui.mparticle.section.create_break=Create section break +cms.contenttypes.ui.mparticle.image.delete_button=Delete Image +cms.contenttypes.ui.mparticle.section_table.link_move_below=move belowe here +cms.contenttypes.ui.mparticle.section_table.link_not_defined=(No action possible) diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ImageUploadSection.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ImageUploadSection.java index c8c185f27..26dbad13b 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ImageUploadSection.java +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ImageUploadSection.java @@ -76,8 +76,9 @@ public class ImageUploadSection extends FormSection add(m_currentImage); add(m_imageDisplay); m_spacer = new Label(""); - add(m_spacer); - m_deleteImage = new Submit("Delete Image"); + add(m_spacer); + m_deleteImage = new Submit(MPArticleGlobalizationUtil.globalize( + "cms.contenttypes.ui.mparticle.current_image")); add(m_deleteImage); add(new Label( MPArticleGlobalizationUtil @@ -118,14 +119,14 @@ public class ImageUploadSection extends FormSection m_currentImage.setVisible(state, false); m_imageDisplay.setVisible(state, false); - m_spacer.setVisible(state, false); - m_deleteImage.setVisible(state, false); + m_spacer.setVisible(state, false); + m_deleteImage.setVisible(state, false); if ( image != null ) { data.put(m_name + CAPTION, image.getDescription()); m_currentImage.setVisible(state, true); m_imageDisplay.setVisible(state, true); - m_spacer.setVisible(state, true); - m_deleteImage.setVisible(state, true); + m_spacer.setVisible(state, true); + m_deleteImage.setVisible(state, true); } } diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEdit.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEdit.java index a9a8cc2e1..ef4430034 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEdit.java +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEdit.java @@ -58,7 +58,7 @@ public class MultiPartArticleEdit extends SimpleEditStep { setDefaultEditKey("edit"); MultiPartArticleForm form = getForm(itemModel); add("edit", - "Edit", + GlobalizationUtil.globalize("cms.ui.edit"), new WorkflowLockedComponentAccess(form, itemModel), form.getSaveCancelSection().getCancelButton() ); diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEditForm.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEditForm.java index ceae1f49a..ab9929176 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEditForm.java +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleEditForm.java @@ -41,8 +41,6 @@ public class MultiPartArticleEditForm extends MultiPartArticleForm public MultiPartArticleEditForm(ItemSelectionModel itemModel, SimpleEditStep step) { - //I assume this was a typo, so I corrected it: - //super("MutliPartArticleEditForm", itemModel); super("MultiPartArticleEditForm", itemModel); addSubmissionListener(this); m_step = step; diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleViewSections.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleViewSections.java index bc6681e99..d31d843ec 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleViewSections.java +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/MultiPartArticleViewSections.java @@ -148,7 +148,8 @@ public class MultiPartArticleViewSections extends ResettableContainer MultiPartArticle article = (MultiPartArticle)m_selArticle .getSelectedObject(state); - article.changeSectionRank((BigDecimal)m_moveSection.getSelectedKey(state), 1); + article.changeSectionRank( + (BigDecimal)m_moveSection.getSelectedKey(state), 1); m_moveSection.setSelectedKey(state, null); } }); diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/SectionTable.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/SectionTable.java index d8544ffc5..e3002ef8c 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/SectionTable.java +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/SectionTable.java @@ -31,6 +31,7 @@ import com.arsdigita.bebop.table.TableColumn; import com.arsdigita.bebop.table.TableColumnModel; import com.arsdigita.bebop.table.TableModel; import com.arsdigita.bebop.table.TableModelBuilder; +import com.arsdigita.cms.CMS; import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.SecurityManager; @@ -256,17 +257,30 @@ public class SectionTable extends Table if ( columnIndex == COL_INDEX_TITLE ) { return m_section.getTitle(); } else if ( columnIndex == COL_INDEX_EDIT ) { - return "edit"; - //return new Label(MPArticleGlobalizationUtil.globalize( - // "cms.contenttypes.ui.mparticle.section_table.link_edit") - // ); + //return "edit"; + return new Label( + MPArticleGlobalizationUtil.globalize( + "cms.contenttypes.ui.mparticle.section_table.link_edit") + ); } else if ( columnIndex == COL_INDEX_DELETE ) { - return "delete"; + // return "delete"; + return new Label( + MPArticleGlobalizationUtil.globalize( + "cms.contenttypes.ui.mparticle.section_table.link_delete") + ); } else if ( columnIndex == COL_INDEX_MOVE ) { if ( m_moveSection.getSelectedKey(m_state) == null ) { - return "move"; + // return "move"; + return new Label( + MPArticleGlobalizationUtil.globalize( + "cms.contenttypes.ui.mparticle.section_table.link_move") + ); } else { - return "move below here"; + // return "move below here"; + return new Label( + MPArticleGlobalizationUtil.globalize( + "cms.contenttypes.ui.mparticle.section_table.link_move_below") + ); } } @@ -283,9 +297,11 @@ public class SectionTable extends Table } + /** + * + */ public class SectionTableCellRenderer extends LockableImpl - implements TableCellRenderer - { + implements TableCellRenderer { private boolean m_active; @@ -302,27 +318,34 @@ public class SectionTable extends Table Object key, int row, int column ) { Component ret = null; - SecurityManager sm = Utilities.getSecurityManager(state); + // SecurityManager sm = Utilities.getSecurityManager(state); + SecurityManager sm = CMS.getSecurityManager(state); ContentItem item = (ContentItem)m_selArticle.getSelectedObject(state); - boolean active = m_active && - sm.canAccess(state.getRequest(), SecurityManager.EDIT_ITEM, - item); + boolean active = m_active && sm.canAccess(state.getRequest(), + SecurityManager.EDIT_ITEM, + item); - if ( value instanceof Component ) { - ret = (Component)value; - } else { - if ( value == null ) { - ret = new Label("", false); + if ( value instanceof Label ) { + if ( active ) { + ret = new ControlLink((Component)value); } else { - if ( active ) { - ret = new ControlLink(value.toString()); - } else { - ret = new Label(value.toString()); - } - } // if ( value == null ) - } // if ( value instanceof Component ) - + ret = (Component)value; + } + + } else if ( value instanceof String ) { + // Backwards compatibility, should be removed asap! + if ( active ) { + ret = new ControlLink(value.toString()); + } else { + ret = new Label(value.toString()); + } + } else { + ret = new Label(MPArticleGlobalizationUtil.globalize( + "cms.contenttypes.ui.mparticle.section_table.link_not_defined"), + false); + } + return ret; } diff --git a/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertiesStep.java b/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertiesStep.java index 7adc2d5aa..3eea5417e 100755 --- a/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertiesStep.java +++ b/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertiesStep.java @@ -60,11 +60,8 @@ public class PressReleasePropertiesStep extends SimpleEditStep { BasicPageForm editSheet; editSheet = new PressReleasePropertyForm( itemModel, this); - // SecurityPropertyEditor#add currently accepts just a String as label - // parameter. As soon as it is refactored, a GlobalizedMessage or a - // Label should be used. add( EDIT_SHEET_NAME, - "Edit", + GlobalizationUtil.globalize("cms.ui.edit"), new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton() ); diff --git a/ccm-cms-types-service/src/com/arsdigita/cms/contenttypes/ui/ServicePropertiesStep.java b/ccm-cms-types-service/src/com/arsdigita/cms/contenttypes/ui/ServicePropertiesStep.java index a4ae58b46..cd486614c 100755 --- a/ccm-cms-types-service/src/com/arsdigita/cms/contenttypes/ui/ServicePropertiesStep.java +++ b/ccm-cms-types-service/src/com/arsdigita/cms/contenttypes/ui/ServicePropertiesStep.java @@ -27,15 +27,12 @@ import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.Service; import com.arsdigita.cms.contenttypes.util.ServiceGlobalizationUtil; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; -import com.arsdigita.domain.DomainObject; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.util.GlobalizationUtil; -import java.text.DateFormat; - /** * Authoring step to edit the simple attributes of the Service content type (and * its subclasses). The attributes edited are 'name', 'title', 'summary', @@ -58,7 +55,7 @@ public class ServicePropertiesStep extends SimpleEditStep { editSheet = new ServicePropertyForm(itemModel,this); add(EDIT_SHEET_NAME, - "Edit", // currently just a String is acepted! + GlobalizationUtil.globalize("cms.ui.edit"), new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton()); diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertyForm.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertyForm.java index ed18ceaef..df4a36d4e 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertyForm.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertyForm.java @@ -57,19 +57,21 @@ public class GenericAddressPropertyForm extends BasicPageForm FormSubmissionListener { private static final Logger s_log = Logger.getLogger(GenericAddressPropertyForm.class); + + public static final String ID = "Address_edit"; private GenericAddressPropertiesStep m_step; public static final String ADDRESS = GenericAddress.ADDRESS; public static final String POSTAL_CODE = GenericAddress.POSTAL_CODE; public static final String CITY = GenericAddress.CITY; public static final String STATE = GenericAddress.STATE; public static final String ISO_COUNTRY_CODE = GenericAddress.ISO_COUNTRY_CODE; - public static final String ID = "Address_edit"; public GenericAddressPropertyForm(ItemSelectionModel itemModel) { this(itemModel, null); } - public GenericAddressPropertyForm(ItemSelectionModel itemModel, GenericAddressPropertiesStep step) { + public GenericAddressPropertyForm(ItemSelectionModel itemModel, + GenericAddressPropertiesStep step) { super(ID, itemModel); m_step = step; addSubmissionListener(this); @@ -93,7 +95,6 @@ public class GenericAddressPropertyForm extends BasicPageForm .globalize("cms.contenttypes.ui.address.postal_code"))); ParameterModel postalCodeParam = new StringParameter(POSTAL_CODE); TextField postalCode = new TextField(postalCodeParam); - /* XXX NumberListener ?*/ add(postalCode); add(new Label(ContenttypesGlobalizationUtil @@ -115,7 +116,6 @@ public class GenericAddressPropertyForm extends BasicPageForm countryParam.addParameterListener(new StringInRangeValidationListener(0, 2)); SingleSelect country = new SingleSelect(countryParam); - country.addOption(new Option("", new Label(GlobalizationUtil .globalize("cms.ui.select_one"))));