From 6de3a2a68f51f2130f589fa7054676336523e342 Mon Sep 17 00:00:00 2001 From: Roy Wetherall Date: Fri, 10 Mar 2006 14:30:57 +0000 Subject: [PATCH] - Added remove features action to repository and web client UI git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2539 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/messages/webclient.properties | 7 +- .../web/bean/wizard/BaseActionWizard.java | 11 ++ .../web/bean/wizard/NewRuleWizard.java | 3 +- .../web/WEB-INF/faces-config-navigation.xml | 8 + .../create-action/action-remove-features.jsp | 182 ++++++++++++++++++ .../new-rule/action-remove-features.jsp | 157 +++++++++++++++ 6 files changed, 365 insertions(+), 3 deletions(-) create mode 100644 source/web/jsp/wizard/create-action/action-remove-features.jsp create mode 100644 source/web/jsp/wizard/new-rule/action-remove-features.jsp diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 7a3b17f1eb..6ba8856be8 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -665,6 +665,7 @@ condition_in_category_not=Item is not in category condition_compare_property_value=Name property matches condition_compare_property_value_not=Name property does not match action_add_features=Add aspect +action_remove_features=Remove aspect action_specialise_type=Item is specialised to type action_simple_workflow={0} item to ''{1}'' if ''{2}'' action is taken. action_link_category=Link to category @@ -797,7 +798,8 @@ title_create_content=Create New Content title_create_content_props=Create New Content - Properties title_create_content_summary=Create New Content - Summary title_create_action_action=Create Action - Select Action -title_create_action_add_feature=Create Action - Add Feature +title_create_action_add_feature=Create Action - Add Features +title_create_action_remove_feature=Create Action - Remove Features title_create_action_checkin=Create Action - Check In title_create_action_checkout=Create Action - Check Out title_create_action_copy=Create Action - Copy @@ -811,7 +813,8 @@ title_create_action_transform_image=Create Action - Transform Image title_create_specialise_action=Create Action - Specialise Type title_create_action_summary=Create Action - Summary title_new_rule_action=New Rule - Select Action -title_new_rule_add_feature=New Rule - Add Feature +title_new_rule_add_feature=New Rule - Add Features +title_new_rule_remove_feature=New Rule - Remove Features title_specialise_type_action=New Rule - Specialise Type title_new_rule_checkin=New Rule - Check In title_new_rule_checkout=New Rule - Check Out diff --git a/source/java/org/alfresco/web/bean/wizard/BaseActionWizard.java b/source/java/org/alfresco/web/bean/wizard/BaseActionWizard.java index 5e9827eae8..842a41dde7 100644 --- a/source/java/org/alfresco/web/bean/wizard/BaseActionWizard.java +++ b/source/java/org/alfresco/web/bean/wizard/BaseActionWizard.java @@ -41,6 +41,7 @@ import org.alfresco.repo.action.executer.ImporterActionExecuter; import org.alfresco.repo.action.executer.LinkCategoryActionExecuter; import org.alfresco.repo.action.executer.MailActionExecuter; import org.alfresco.repo.action.executer.MoveActionExecuter; +import org.alfresco.repo.action.executer.RemoveFeaturesActionExecuter; import org.alfresco.repo.action.executer.SimpleWorkflowActionExecuter; import org.alfresco.repo.action.executer.SpecialiseTypeActionExecuter; import org.alfresco.repo.action.executer.TransformActionExecuter; @@ -170,6 +171,11 @@ public abstract class BaseActionWizard extends AbstractWizardBean QName aspect = Repository.resolveToQName((String)this.currentActionProperties.get(PROP_ASPECT)); actionParams.put(AddFeaturesActionExecuter.PARAM_ASPECT_NAME, aspect); } + else if (this.action.equals(RemoveFeaturesActionExecuter.NAME)) + { + QName aspect = Repository.resolveToQName((String)this.currentActionProperties.get(PROP_ASPECT)); + actionParams.put(RemoveFeaturesActionExecuter.PARAM_ASPECT_NAME, aspect); + } else if (this.action.equals(CopyActionExecuter.NAME)) { // add the destination space id to the action properties @@ -399,6 +405,11 @@ public abstract class BaseActionWizard extends AbstractWizardBean QName aspect = (QName)actionProps.get(AddFeaturesActionExecuter.PARAM_ASPECT_NAME); this.currentActionProperties.put(PROP_ASPECT, aspect.toString()); } + else if (this.action.equals(RemoveFeaturesActionExecuter.NAME)) + { + QName aspect = (QName)actionProps.get(RemoveFeaturesActionExecuter.PARAM_ASPECT_NAME); + this.currentActionProperties.put(PROP_ASPECT, aspect.toString()); + } else if (this.action.equals(CopyActionExecuter.NAME)) { NodeRef destNodeRef = (NodeRef)actionProps.get(CopyActionExecuter.PARAM_DESTINATION_FOLDER); diff --git a/source/java/org/alfresco/web/bean/wizard/NewRuleWizard.java b/source/java/org/alfresco/web/bean/wizard/NewRuleWizard.java index 790af1655d..cb621e3b72 100644 --- a/source/java/org/alfresco/web/bean/wizard/NewRuleWizard.java +++ b/source/java/org/alfresco/web/bean/wizard/NewRuleWizard.java @@ -48,6 +48,7 @@ import org.alfresco.repo.action.executer.ImageTransformActionExecuter; import org.alfresco.repo.action.executer.ImporterActionExecuter; import org.alfresco.repo.action.executer.LinkCategoryActionExecuter; import org.alfresco.repo.action.executer.MailActionExecuter; +import org.alfresco.repo.action.executer.RemoveFeaturesActionExecuter; import org.alfresco.repo.action.executer.SimpleWorkflowActionExecuter; import org.alfresco.repo.action.executer.SpecialiseTypeActionExecuter; import org.alfresco.repo.action.executer.TransformActionExecuter; @@ -1343,7 +1344,7 @@ public class NewRuleWizard extends BaseActionWizard summary.append(" "); // define a summary to be added for each action - if (AddFeaturesActionExecuter.NAME.equals(actionName)) + if (AddFeaturesActionExecuter.NAME.equals(actionName) || RemoveFeaturesActionExecuter.NAME.equals(actionName)) { String aspect = (String)this.currentActionProperties.get(PROP_ASPECT); diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml index 82e80f23fb..491311aaf8 100644 --- a/source/web/WEB-INF/faces-config-navigation.xml +++ b/source/web/WEB-INF/faces-config-navigation.xml @@ -803,6 +803,10 @@ add-features /jsp/wizard/new-rule/action-add-features.jsp + + remove-features + /jsp/wizard/new-rule/action-remove-features.jsp + copy /jsp/wizard/new-rule/action-copy.jsp @@ -888,6 +892,10 @@ add-features /jsp/wizard/create-action/action-add-features.jsp + + remove-features + /jsp/wizard/create-action/action-remove-features.jsp + copy /jsp/wizard/create-action/action-copy.jsp diff --git a/source/web/jsp/wizard/create-action/action-remove-features.jsp b/source/web/jsp/wizard/create-action/action-remove-features.jsp new file mode 100644 index 0000000000..da40ca7557 --- /dev/null +++ b/source/web/jsp/wizard/create-action/action-remove-features.jsp @@ -0,0 +1,182 @@ +<%-- + Copyright (C) 2005 Alfresco, Inc. + + Licensed under the Mozilla Public License version 1.1 + with a permitted attribution clause. You may obtain a + copy of the License at + + http://www.alfresco.org/legal/license.txt + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific + language governing permissions and limitations under the + License. +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> +<%@ page isELIgnored="false" %> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> + + + + + + <%-- load a bundle of properties with I18N strings --%> + + + + + <%-- Main outer table --%> + + + <%-- Title bar --%> + + + + + <%-- Main area --%> + + <%-- Shelf --%> + + + <%-- Work Area --%> + + +
+ <%@ include file="../../parts/titlebar.jsp" %> +
+ <%@ include file="../../parts/shelf.jsp" %> + + + <%-- Breadcrumb --%> + <%@ include file="../../parts/breadcrumb.jsp" %> + + <%-- Status and Actions --%> + + + + + + + <%-- separator row with gradient shadow --%> + + + + + + + <%-- Details --%> + + + + + + + <%-- separator row with bottom panel graphics --%> + + + + + + +
+ + <%-- Status and Actions inner contents table --%> + <%-- Generally this consists of an icon, textual summary and actions for the current object --%> + + + + + +
+ +
+
''
+
+ +
+ + + + + + + + +
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %> +
+ + + + + + <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %> +
+ + + + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> + + + + + + + + + + + + + +
: + + + +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> +
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %> + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %> +
+
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/source/web/jsp/wizard/new-rule/action-remove-features.jsp b/source/web/jsp/wizard/new-rule/action-remove-features.jsp new file mode 100644 index 0000000000..723353dd01 --- /dev/null +++ b/source/web/jsp/wizard/new-rule/action-remove-features.jsp @@ -0,0 +1,157 @@ +<%-- + Copyright (C) 2005 Alfresco, Inc. + + Licensed under the Mozilla Public License version 1.1 + with a permitted attribution clause. You may obtain a + copy of the License at + + http://www.alfresco.org/legal/license.txt + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific + language governing permissions and limitations under the + License. +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> +<%@ page isELIgnored="false" %> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> + + + + + + <%-- load a bundle of properties with I18N strings --%> + + + + + <%-- Main outer table --%> + + + <%-- Title bar --%> + + + + + <%-- Main area --%> + + <%-- Shelf --%> + + + <%-- Work Area --%> + + +
+ <%@ include file="../../parts/titlebar.jsp" %> +
+ <%@ include file="../../parts/shelf.jsp" %> + + + <%-- Breadcrumb --%> + <%@ include file="../../parts/breadcrumb.jsp" %> + + <%-- Status and Actions --%> + + + + + + + <%-- separator row with gradient shadow --%> + + + + + + + <%-- Details --%> + + + + + + + <%-- separator row with bottom panel graphics --%> + + + + + + +
+ + <%-- Status and Actions inner contents table --%> + <%-- Generally this consists of an icon, textual summary and actions for the current object --%> + + + + + +
+ +
+
+
+ +
+ + + + + + +
+ + + + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> + + + + + + + + + + +
+ + + +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> +
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %> + + + + + + + +
+ +
+ +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %> +
+
+
+ +
+ +
+ +
\ No newline at end of file