diff --git a/ccm-core/web/themes/foundry-base/templates/content-items/article-detail.xml b/ccm-core/web/themes/foundry-base/templates/content-items/article-detail.xml
index 77462d619..ce5a74631 100644
--- a/ccm-core/web/themes/foundry-base/templates/content-items/article-detail.xml
+++ b/ccm-core/web/themes/foundry-base/templates/content-items/article-detail.xml
@@ -5,6 +5,14 @@
-->
+
+
+
+
diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl
index 6db4807e6..784633a69 100644
--- a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl
+++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl
@@ -620,5 +620,26 @@
+
+
+
+ Renders an link to edit an item in the content centre if the current user is
+ logged in and has the permission to edit the item.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ccm-navigation/src/com/arsdigita/navigation/NavigationResources.properties b/ccm-navigation/src/com/arsdigita/navigation/NavigationResources.properties
index 344d04bd0..dba6edfa9 100644
--- a/ccm-navigation/src/com/arsdigita/navigation/NavigationResources.properties
+++ b/ccm-navigation/src/com/arsdigita/navigation/NavigationResources.properties
@@ -12,3 +12,6 @@ ui.quick_link.description=Description
ui.quick_link.url=URL
ui.quick_link.cascade_to_subcats=Cascade to subcategories
ui.quick_link.icon=Icon
+portlet.ui.cannot_find_object_type=Can not find object type {0}.
+portlet.ui.not_a_subtype=The type {0} is not a subtype of {1}.
+portlet.ui.type_does_not_have_property=The type {0} does not a have a property {1}.
diff --git a/ccm-navigation/src/com/arsdigita/navigation/NavigationResources_de.properties b/ccm-navigation/src/com/arsdigita/navigation/NavigationResources_de.properties
index d29a6fdd7..e85cd58be 100644
--- a/ccm-navigation/src/com/arsdigita/navigation/NavigationResources_de.properties
+++ b/ccm-navigation/src/com/arsdigita/navigation/NavigationResources_de.properties
@@ -12,3 +12,6 @@ ui.quick_link.description=Beschreibung
ui.quick_link.url=URL
ui.quick_link.cascade_to_subcats=An Subkategorien vererben
ui.quick_link.icon=Icon
+portlet.ui.cannot_find_object_type=Kann Typ '{0}' nicht finden.
+portlet.ui.not_a_subtype=Der Typ '{0}' ist kein Untertyp von '{1}'.
+portlet.ui.type_does_not_have_property=Der Typ '{0}' hat keine Eigenschaft '{1}'.
diff --git a/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ObjectListPortletEditor.java b/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ObjectListPortletEditor.java
index 3d8a71a79..d98ab4e69 100755
--- a/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ObjectListPortletEditor.java
+++ b/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ObjectListPortletEditor.java
@@ -53,6 +53,7 @@ import com.arsdigita.kernel.ResourceType;
import com.arsdigita.categorization.ui.CategoryPicker;
import com.arsdigita.categorization.ui.ApplicationCategoryPicker;
+import com.arsdigita.navigation.NavigationGlobalizationUtil;
import com.redhat.persistence.metadata.Root;
import com.redhat.persistence.common.Path;
@@ -95,7 +96,7 @@ public class ObjectListPortletEditor extends PortletConfigFormSection {
add(m_baseObjectType);
m_restrictedObjectType = buildRestrictedObjectTypeWidget(new StringParameter(
- "restrictedObjectType"));
+ "restrictedObjectType"));
add(new Label("Restricted object type:", Label.BOLD), ColumnPanel.RIGHT);
add(m_restrictedObjectType);
@@ -210,7 +211,7 @@ public class ObjectListPortletEditor extends PortletConfigFormSection {
protected void initWidgets(PageState state,
Portlet portlet)
- throws FormProcessException {
+ throws FormProcessException {
super.initWidgets(state, portlet);
Iterator properties = ObjectListPortlet.getRegisteredProperties();
@@ -257,35 +258,36 @@ public class ObjectListPortletEditor extends PortletConfigFormSection {
}
}
+ @Override
protected void validateWidgets(PageState state,
- Portlet portlet)
- throws FormProcessException {
+ Portlet portlet) throws FormProcessException {
- String baseTypeName = (String) m_baseObjectType.getValue(state);
- ObjectType baseType = MetadataRoot.getMetadataRoot().getObjectType(baseTypeName);
+ final String baseTypeName = (String) m_baseObjectType.getValue(state);
+ final ObjectType baseType = MetadataRoot.getMetadataRoot().getObjectType(baseTypeName);
if (baseType == null) {
- throw new FormProcessException(
- "Cannot find object type '" + baseTypeName + "'");
+ throw new FormProcessException(NavigationGlobalizationUtil.globalize(
+ "portlet.ui.cannot_find_object_type", new String[]{baseTypeName}));
}
if (!baseType.isSubtypeOf(ACSObject.BASE_DATA_OBJECT_TYPE)) {
- throw new FormProcessException(
- "The type '" + baseTypeName + "' is not a subtype of '"
- + ACSObject.BASE_DATA_OBJECT_TYPE + "'");
+ throw new FormProcessException(NavigationGlobalizationUtil.globalize(
+ "portlet.ui.not_a_subtype",
+ new String[]{baseTypeName, ACSObject.BASE_DATA_OBJECT_TYPE}));
}
- String specificTypeName = (String) m_restrictedObjectType.getValue(state);
+ final String specificTypeName = (String) m_restrictedObjectType.getValue(state);
ObjectType specificType = null;
if (specificTypeName != null && !"".equals(specificTypeName)) {
specificType = MetadataRoot.getMetadataRoot().getObjectType(specificTypeName);
if (specificType == null) {
- throw new FormProcessException(
- "Cannot find object type '" + specificTypeName + "'");
+ throw new FormProcessException(NavigationGlobalizationUtil.globalize(
+ "portlet.ui.cannot_find_object_type", new String[]{specificTypeName}));
}
if (!specificType.isSubtypeOf(baseType)) {
- throw new FormProcessException(
- "The type '" + specificTypeName + "' is not a subtype of '" + baseTypeName + "'");
+ throw new FormProcessException(NavigationGlobalizationUtil.globalize(
+ "portlet.ui.not_a_subtype",
+ new String[]{specificTypeName, ACSObject.BASE_DATA_OBJECT_TYPE}));
}
}
@@ -302,11 +304,11 @@ public class ObjectListPortletEditor extends PortletConfigFormSection {
private void validateFields(ObjectType type,
String str)
- throws FormProcessException {
+ throws FormProcessException {
Root root = MetadataRoot.getMetadataRoot().getRoot();
com.redhat.persistence.metadata.ObjectType objType = root.getObjectType(type
- .getQualifiedName());
+ .getQualifiedName());
String[] fields = StringUtils.split(str, ',');
for (int i = 0; i < fields.length; i++) {
@@ -325,16 +327,17 @@ public class ObjectListPortletEditor extends PortletConfigFormSection {
}
if (!objType.exists(Path.get(field))) {
- throw new FormProcessException(
- "The type '" + type.getQualifiedName() + "' does not have a property '" + field
- + "'");
+ throw new FormProcessException(NavigationGlobalizationUtil.globalize(
+ "portlet.ui.type_does_not_have_property",
+ new String[]{type.getQualifiedName(), field}));
}
}
}
+ @Override
protected void processWidgets(PageState state,
Portlet portlet)
- throws FormProcessException {
+ throws FormProcessException {
super.processWidgets(state, portlet);
ObjectListPortlet myportlet = (ObjectListPortlet) portlet;
@@ -348,10 +351,10 @@ public class ObjectListPortletEditor extends PortletConfigFormSection {
myportlet.setFilterCategory(m_filterCategory.getCategory(state));
myportlet.setDescendCategories(((Boolean) m_descendCategories.getValue(state))
- .booleanValue());
+ .booleanValue());
myportlet.setCheckPermissions(((Boolean) m_checkPermissions.getValue(state)).booleanValue());
myportlet.setExcludeIndexObjects(((Boolean) m_excludeIndexObjects.getValue(state))
- .booleanValue());
+ .booleanValue());
myportlet.setProperties((Object[]) m_properties.getValue(state));
}