diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources.properties index 923506980..d25737dd4 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources.properties @@ -1063,3 +1063,4 @@ cms.ui.folder.additionalInfo=Info cms.ui.section.new_section_root_category=Root category of the new Content Section cms.ui.admin_center=Admin Center cms.contentasset.image.ui.display.dimensions=Dimensions (width x height): +cms.ui.remove_home_folder=Remove home folder diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties index 7a092a2cd..5b4c494cf 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties @@ -1057,3 +1057,4 @@ cms.ui.folder.additionalInfo=Info cms.ui.section.new_section_root_category=Kategoriensystem der neuen Content Section cms.ui.admin_center=Admin Center cms.contentasset.image.ui.display.dimensions=Ma\u00dfe (Breite x H\u00f6he): +cms.ui.remove_home_folder=Start-Ordner zur\u00fccksetzen diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties index 4a556892c..83c024fcb 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties @@ -111,3 +111,4 @@ cms.ui.folder.additionalInfo= cms.ui.section.new_section_root_category= cms.ui.admin_center=Admin Center cms.contentasset.image.ui.display.dimensions=Dimensions (width x height): +cms.ui.remove_home_folder=Remove home folder diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties index 674db72e4..235ef7280 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties @@ -585,3 +585,4 @@ cms.ui.folder.additionalInfo= cms.ui.section.new_section_root_category= cms.ui.admin_center=Admin Center cms.contentasset.image.ui.display.dimensions=Dimensions (width x height): +cms.ui.remove_home_folder= diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java b/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java index b9b926256..b0a525dae 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java @@ -123,7 +123,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { private LifecycleAdminPane m_lifecyclePane; private CategoryAdminPane m_categoryPane; private ContentTypeAdminPane m_typePane; - private LayoutPanel m_userAdminPane; + //private LayoutPanel m_userAdminPane; private LayoutPanel m_csePane; private ReportPane m_reportPane; @@ -158,7 +158,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { m_lifecyclePane = getLifecycleAdminPane(); m_categoryPane = getCategoryAdminPane(); m_typePane = getContentTypeAdminPane(); - m_userAdminPane = getUserAdminPane(); + //m_userAdminPane = getUserAdminPane(); m_csePane = getCSEPane(); m_reportPane = getReportPane(); @@ -181,7 +181,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { SecurityManager sm = CMS.getContext().getSecurityManager(); User user = Web.getContext().getUser(); - m_tabbedPane.setTabVisible(state, m_userAdminPane, sm.canAccess(user, SecurityConstants.STAFF_ADMIN)); + //m_tabbedPane.setTabVisible(state, m_userAdminPane, sm.canAccess(user, SecurityConstants.STAFF_ADMIN)); if (ContentSection.getConfig().getHideAdminTabs()) { m_tabbedPane.setTabVisible(state, m_workflowPane, sm.canAccess(user, SecurityConstants.WORKFLOW_ADMIN)); @@ -291,14 +291,14 @@ public class ContentSectionPage extends CMSPage implements ActionListener { return m_typePane; } - protected LayoutPanel getUserAdminPane() { - if (m_userAdminPane == null) { - m_userAdminPane = new LayoutPanel(); - m_userAdminPane.setLeft(new SimpleComponent()); - m_userAdminPane.setBody(new UserAdminPane()); - } - return m_userAdminPane; - } +// protected LayoutPanel getUserAdminPane() { +// if (m_userAdminPane == null) { +// m_userAdminPane = new LayoutPanel(); +// m_userAdminPane.setLeft(new SimpleComponent()); +// m_userAdminPane.setBody(new UserAdminPane()); +// } +// return m_userAdminPane; +// } protected LayoutPanel getCSEPane() { if (m_csePane == null) { @@ -360,7 +360,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { tab(pane, "cms.ui.lifecycles", getLifecycleAdminPane()); tab(pane, "cms.ui.categories", getCategoryAdminPane()); tab(pane, "cms.ui.content_types", getContentTypeAdminPane()); - tab(pane, "cms.ui.user_admin", getUserAdminPane()); +// tab(pane, "cms.ui.user_admin", getUserAdminPane()); tab(pane, "cms.ui.cse", getCSEPane()); tab(pane, "cms.ui.reports", getReportPane()); @@ -411,7 +411,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { m_categoryPane.reset(state); } else if (pane == m_typePane) { m_typePane.reset(state); - } else if (pane == m_userAdminPane) { +// } else if (pane == m_userAdminPane) { //m_userAdminPane.reset(state); } else if (pane == m_csePane) { //m_csePane.reset(state); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java b/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java index db3a38d6c..5dd25fc6d 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java @@ -43,6 +43,7 @@ import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.Folder; import com.arsdigita.cms.PageLocations; import com.arsdigita.cms.SecurityManager; +import com.arsdigita.cms.UserHomeFolderMap; import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.cms.ui.authoring.CreationSelector; import com.arsdigita.cms.ui.authoring.NewItemForm; @@ -100,6 +101,7 @@ public class FlatItemList extends SegmentedPanel private FolderManipulator m_folderManip; private FolderCreator m_folderCreator; private ActionLink m_setHomeFolderAction; + private ActionLink m_removeHomeFolderAction; private ActionLink m_createFolderAction; private ActionLink m_togglePrivateAction; private Label m_homeFolderLabel; @@ -211,6 +213,10 @@ public class FlatItemList extends SegmentedPanel }); browseActions.addAction(m_homeFolderLabel); + m_removeHomeFolderAction = new ActionLink(new Label(globalize("cms.ui.remove_home_folder"))); + m_removeHomeFolderAction.addActionListener(this); + browseActions.addAction(m_removeHomeFolderAction); + m_newItem = new SectionNewItemForm("newItem"); m_newItem.addProcessListener(this); browseActions.addAction(m_newItem); @@ -446,6 +452,13 @@ public class FlatItemList extends SegmentedPanel Folder folder = m_folder.getFolder(s); user = (User) DomainObjectFactory.newInstance(user.getOID()); Folder.setUserHomeFolder(user, folder); + } else if( source == m_removeHomeFolderAction) { + User user = Web.getContext().getUser(); + ContentSection section = CMS.getContext().getContentSection(); + UserHomeFolderMap map = UserHomeFolderMap.findUserHomeFolderMap(user, section); + if (map != null) { + map.delete(); + } } }