From d69b9688eac2681194a47bac7a004810448f4e4e Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 20 Apr 2017 14:51:37 +0000 Subject: [PATCH] CCM NG/ccm-cms: Changes from todays coding session git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4684 8810af33-2d31-482b-a856-94f89814c4df --- .../arsdigita/cms/ui/ContentSectionPage.java | 43 ++++++++++--------- .../cms/ui/category/CategoryAdminPane.java | 1 + .../cms/ui/category/CategoryItemPane.java | 2 +- .../org/librecms/CmsResources.properties | 1 + .../org/librecms/CmsResources_de.properties | 1 + .../org/librecms/CmsResources_fr.properties | 1 + 6 files changed, 27 insertions(+), 22 deletions(-) diff --git a/ccm-cms/src/main/java/com/arsdigita/cms/ui/ContentSectionPage.java b/ccm-cms/src/main/java/com/arsdigita/cms/ui/ContentSectionPage.java index 578f94c94..1f2fccdd2 100755 --- a/ccm-cms/src/main/java/com/arsdigita/cms/ui/ContentSectionPage.java +++ b/ccm-cms/src/main/java/com/arsdigita/cms/ui/ContentSectionPage.java @@ -36,6 +36,7 @@ import org.librecms.contentsection.ContentSection; import com.arsdigita.cms.dispatcher.CMSPage; import com.arsdigita.cms.ui.assets.AssetPane; +import com.arsdigita.cms.ui.category.CategoryAdminPane; //ToDo NG import com.arsdigita.cms.ui.category.CategoryAdminPane; import com.arsdigita.cms.ui.cse.ContentSoonExpiredPane; import com.arsdigita.cms.ui.folder.FolderAdminPane; @@ -127,7 +128,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { private RoleAdminPane m_rolePane; private WorkflowAdminPane m_workflowPane; private LifecycleAdminPane m_lifecyclePane; -//ToDo NG private CategoryAdminPane m_categoryPane; + private CategoryAdminPane m_categoryPane; private ContentTypeAdminPane m_typePane; //private LayoutPanel m_userAdminPane; private LayoutPanel m_csePane; @@ -155,7 +156,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { m_rolePane = getRoleAdminPane(); m_workflowPane = getWorkflowAdminPane(); m_lifecyclePane = getLifecycleAdminPane(); -//ToDo NG m_categoryPane = getCategoryAdminPane(); + m_categoryPane = getCategoryAdminPane(); m_typePane = getContentTypeAdminPane(); // userAdminPane removed, used to contain just one item (reset user // folder) which moved to the FolderAdminPane @@ -191,11 +192,11 @@ public class ContentSectionPage extends CMSPage implements ActionListener { m_workflowPane, permissionChecker.isPermitted( AdminPrivileges.ADMINISTER_WORKFLOW)); -//ToDo NG -// m_tabbedPane.setTabVisible( -// state, m_categoryPane, -// permissionChecker.isPermitted( -// AdminPrivileges.ADMINISTER_CATEGORIES)); + m_tabbedPane.setTabVisible( + state, + m_categoryPane, + permissionChecker.isPermitted( + AdminPrivileges.ADMINISTER_CATEGORIES)); m_tabbedPane.setTabVisible( state, m_lifecyclePane, @@ -256,7 +257,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { protected ItemSearch getSearchPane() { if (m_searchPane == null) { m_searchPane - = new ItemSearch( + = new ItemSearch( ContentItemVersion.DRAFT.toString(), CMSConfig.getConfig().isLimitItemSearchToContentSection()); } @@ -311,13 +312,13 @@ public class ContentSectionPage extends CMSPage implements ActionListener { * Creates, and then caches, the category administration pane. Overriding * this method to return null will prevent this tab from appearing. */ -//ToDo NG -// protected CategoryAdminPane getCategoryAdminPane() { -// if (m_categoryPane == null) { -// m_categoryPane = new CategoryAdminPane(); -// } -// return m_categoryPane; -// } + protected CategoryAdminPane getCategoryAdminPane() { + if (m_categoryPane == null) { + m_categoryPane = new CategoryAdminPane(); + } + return m_categoryPane; + } + /** * Creates, and then caches, the content type administration pane. * Overriding this method to return null will prevent this tab from @@ -360,9 +361,9 @@ public class ContentSectionPage extends CMSPage implements ActionListener { * Adds the specified component, with the specified tab name, to the tabbed * pane only if it is not null. * - * @param pane The pane to which to add the tab + * @param pane The pane to which to add the tab * @param tabName The name of the tab if it's added - * @param comp The component to add to the pane + * @param comp The component to add to the pane */ protected void addToPane(final TabbedPane pane, final String tabName, @@ -405,7 +406,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { tab(pane, "cms.ui.roles", getRoleAdminPane()); tab(pane, "cms.ui.workflows", getWorkflowAdminPane()); tab(pane, "cms.ui.lifecycles", getLifecycleAdminPane()); -// ToDo NG tab(pane, "cms.ui.categories", getCategoryAdminPane()); + tab(pane, "cms.ui.categories", getCategoryAdminPane()); tab(pane, "cms.ui.content_types", getContentTypeAdminPane()); tab(pane, "cms.ui.cse", getCSEPane()); tab(pane, "cms.ui.reports", getReportPane()); @@ -457,8 +458,8 @@ public class ContentSectionPage extends CMSPage implements ActionListener { m_workflowPane.reset(state); } else if (pane == m_lifecyclePane) { m_lifecyclePane.reset(state); -//ToDo NG } else if (pane == m_categoryPane) { -// m_categoryPane.reset(state); + } else if (pane == m_categoryPane) { + m_categoryPane.reset(state); } else if (pane == m_typePane) { m_typePane.reset(state); // } else if (pane == m_userAdminPane) { @@ -472,7 +473,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { * Construct a URL for displaying the tab * * @param item The item from which we get the corresponding content section - * @param tab The index of the tab to display + * @param tab The index of the tab to display * * @return */ diff --git a/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryAdminPane.java b/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryAdminPane.java index 2db73a220..a9afeff87 100755 --- a/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryAdminPane.java +++ b/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryAdminPane.java @@ -209,6 +209,7 @@ public final class CategoryAdminPane extends BaseAdminPane { prompt.add(catLabel); } + @Override public final void process(final FormSectionEvent e) throws FormProcessException { final PageState state = e.getPageState(); diff --git a/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryItemPane.java b/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryItemPane.java index a7fe8cde7..f46c4ce42 100755 --- a/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryItemPane.java +++ b/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/CategoryItemPane.java @@ -189,7 +189,7 @@ class CategoryItemPane extends BaseItemPane { m_detailPane.add(new LinkedCategorySection(linkAddLink)); // Templates - m_detailPane.add(new AdminVisible(new CategoryTemplateSection())); +// m_detailPane.add(new AdminVisible(new CategoryTemplateSection())); // Permissions //m_detailPane.add(new PermissionsSection()); diff --git a/ccm-cms/src/main/resources/org/librecms/CmsResources.properties b/ccm-cms/src/main/resources/org/librecms/CmsResources.properties index d4d820d99..220e377c5 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsResources.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsResources.properties @@ -270,3 +270,4 @@ cms.ui.assets.binaryasset.description=Description cms.ui.assets.binaryasset.filename=File name cms.ui.assets.binaryasset.mimetype=Type cms.ui.assets.binaryasset.size=Size (bytes) +cms.ui.categories=Categories diff --git a/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties b/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties index 0d3c57af4..2681f5da3 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties @@ -269,3 +269,4 @@ cms.ui.assets.binaryasset.description=Beschreibung cms.ui.assets.binaryasset.filename=Dateiname cms.ui.assets.binaryasset.mimetype=Typ cms.ui.assets.binaryasset.size=Gr\u00f6\u00dfe (Bytes) +cms.ui.categories=Kategorien diff --git a/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties b/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties index bac0d56ec..c147f5d3c 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties @@ -228,3 +228,4 @@ cms.ui.assets.binaryasset.description=Description cms.ui.assets.binaryasset.filename=File name cms.ui.assets.binaryasset.mimetype=Type cms.ui.assets.binaryasset.size=Size (bytes) +cms.ui.categories=Categories