diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 6bd3fa5a7b..352496c3e1 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -78,8 +78,7 @@ checked_out_by=Checked out by doc_name=Document name title_mlcontainer_details=Multilingual Document Details - -# Versioning of the metadatas +# Versioning of the metadata versioned_details_of=Versioned details of versioned_documentdetails_description=View the details about the versioned content. @@ -711,7 +710,7 @@ checkout_hint2=When you have finished editing the copy you need to check it in t checkout_want_to=to prevent the possibility of other users overwriting your changes. checkout_warn=Note: You will lose any changes already made to this document. local_copy_location=Local copy location -locate_content_upload=Locate and upload your document to the repository. +locate_content_upload=Locate your document for upload # System Information and admin page messages system_info=System Information diff --git a/config/alfresco/web-client-config-actions.xml b/config/alfresco/web-client-config-actions.xml index bbcfd0d7d3..cebb58d7ce 100644 --- a/config/alfresco/web-client-config-actions.xml +++ b/config/alfresco/web-client-config-actions.xml @@ -211,7 +211,7 @@ org.alfresco.web.action.evaluator.ApproveDocEvaluator /images/icons/approve.gif - #{DocumentDetailsBean.approve} + #{DocumentDetailsDialog.approve} browse #{actionContext.id} @@ -223,7 +223,7 @@ org.alfresco.web.action.evaluator.RejectDocEvaluator /images/icons/reject.gif - #{DocumentDetailsBean.reject} + #{DocumentDetailsDialog.reject} browse #{actionContext.id} @@ -235,7 +235,7 @@ org.alfresco.web.action.evaluator.ApproveDocEvaluator /images/icons/approve.gif - #{DocumentDetailsBean.approve} + #{DocumentDetailsDialog.approve} browse #{actionContext.id} @@ -247,7 +247,7 @@ org.alfresco.web.action.evaluator.RejectDocEvaluator /images/icons/reject.gif - #{DocumentDetailsBean.reject} + #{DocumentDetailsDialog.reject} browse #{actionContext.id} @@ -259,7 +259,7 @@ org.alfresco.web.action.evaluator.ApproveDocEvaluator /images/icons/approve.gif - #{SpaceDetailsBean.approve} + #{SpaceDetailsDialog.approve} browse #{actionContext.id} @@ -271,7 +271,7 @@ org.alfresco.web.action.evaluator.RejectDocEvaluator /images/icons/reject.gif - #{SpaceDetailsBean.reject} + #{SpaceDetailsDialog.reject} browse #{actionContext.id} @@ -283,7 +283,7 @@ org.alfresco.web.action.evaluator.ApproveDocEvaluator /images/icons/approve.gif - #{SpaceDetailsBean.approve} + #{SpaceDetailsDialog.approve} browse #{actionContext.id} @@ -295,7 +295,7 @@ org.alfresco.web.action.evaluator.RejectDocEvaluator /images/icons/reject.gif - #{SpaceDetailsBean.reject} + #{SpaceDetailsDialog.reject} browse #{actionContext.id} @@ -504,6 +504,29 @@ dialog:manageDeletedItems + + + recover_all_items + /images/icons/recover_all.gif + dialog:recoverAllItems + #{TrashcanRecoverAllItemsDialog.setupListAction} + + + + + delete_all_items + /images/icons/delete_all.gif + dialog:deleteAllItems + #{TrashcanDeleteAllItemsDialog.setupListAction} + + + + + create_user + /images/icons/create_user.gif + wizard:createUser + + @@ -512,7 +535,7 @@ org.alfresco.web.action.evaluator.TakeOwnershipDocEvaluator take_ownership /images/icons/take_ownership.gif - #{DocumentDetailsBean.takeOwnership} + #{DocumentDetailsDialog.takeOwnership} @@ -522,7 +545,7 @@ take_ownership /images/icons/take_ownership.gif - #{SpaceDetailsBean.takeOwnership} + #{SpaceDetailsDialog.takeOwnership} @@ -533,7 +556,7 @@ org.alfresco.web.action.evaluator.UnlockDocEvaluator unlock /images/icons/unlock.gif - #{DocumentDetailsBean.unlock} + #{DocumentDetailsDialog.unlock} @@ -571,7 +594,21 @@ #{actionContext.id} - + + + + invite + /images/icons/invite.gif + wizard:inviteSpaceUsers + + + + + invite + /images/icons/invite.gif + wizard:inviteContentUsers + + @@ -640,7 +677,7 @@ add_translation_tooltip /images/icons/add_tranlsation.gif #{AddTranslationDialog.start} - addTranslation + dialog:addTranslation #{actionContext.id} @@ -686,6 +723,61 @@ wizard:newEdition + + + create_rule + /images/icons/new_rule.gif + wizard:createRule + + + + + reapply_rules + /images/icons/reapply_rules.gif + #{RulesDialog.reapplyRules} + + + + + + /images/icons/reapply_rules.gif + #{RulesDialog.ignoreInheritedRules} + + + + + + add_category + /images/icons/add_category.gif + dialog:createCategory + #{DialogManager.setupParameters} + + #{actionContext.categoryRef} + + + + + + delete_category + /images/icons/delete_category.gif + dialog:deleteCategory + #{DialogManager.setupParameters} + + #{actionContext.nodeRef} + + + + + + edit_category + /images/icons/edit_category.gif + dialog:editCategory + #{DialogManager.setupParameters} + + #{actionContext.nodeRef} + + + new_group @@ -848,7 +940,17 @@ - + + + + + + + + + + + false @@ -1005,6 +1107,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/alfresco/web-client-config-dialogs.xml b/config/alfresco/web-client-config-dialogs.xml index eff5b7612b..6f4e4e3e66 100644 --- a/config/alfresco/web-client-config-dialogs.xml +++ b/config/alfresco/web-client-config-dialogs.xml @@ -45,7 +45,7 @@ description-id="editspace_description" /> - @@ -186,6 +186,9 @@ managed-bean="EditAvmFileDialog" icon="/images/icons/update_large.gif" title-id="title_update_file" description-id="update_avm-file_desc" /> --> + + + + + + + + + + + @@ -271,7 +298,7 @@ icon="/images/icons/delete_large.gif" title-id="remove_user" description-id="remove_invited_user_info" /> - @@ -290,7 +317,7 @@ - @@ -311,31 +338,31 @@ icon="/images/icons/edituser_large.gif" title-id="title_change_user_roles" description-id="modify_user_roles_description" /> - - - - - - - @@ -343,7 +370,7 @@ icon="/images/icons/admin_console_large.gif" title-id="title_admin_console" description-id="admin_description" show-ok-button="false"/> - @@ -355,7 +382,7 @@ icon="/images/icons/edit_category_large.gif" title-id="title_edit_category" description-id="edit_category_description" /> - @@ -363,11 +390,11 @@ icon="/images/ml/details_large.gif" title-id="manage_multilingual_details_for" description-id="manage_multilingual_details_description" /> - - @@ -390,23 +417,23 @@ icon="/images/icons/delete_all_large.gif" title-id="delete_listed_items" description-id="delete_listed_items_info" /> - - - - - @@ -446,12 +473,81 @@ icon="/images/icons/recover_all_large.gif" title-id="recovery_report" description-id="recovery_report_info" show-ok-button="false" /> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -521,4 +617,63 @@ description-id="manage_task_desc" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/alfresco/web-client-config-navigation.xml b/config/alfresco/web-client-config-navigation.xml index acdc9161f0..03f3fed62f 100644 --- a/config/alfresco/web-client-config-navigation.xml +++ b/config/alfresco/web-client-config-navigation.xml @@ -26,19 +26,19 @@ - - - - + + + + - - - - + + + + diff --git a/config/alfresco/web-client-config-wcm-actions.xml b/config/alfresco/web-client-config-wcm-actions.xml index 90a01952d5..df4bb29762 100644 --- a/config/alfresco/web-client-config-wcm-actions.xml +++ b/config/alfresco/web-client-config-wcm-actions.xml @@ -162,7 +162,7 @@ org.alfresco.web.action.evaluator.WCMStagingReadonlyEvaluator add_content /images/icons/add.gif - addAvmContent + dialog:addAvmContent #{AddAvmContentDialog.start} diff --git a/config/alfresco/web-client-config-wizards.xml b/config/alfresco/web-client-config-wizards.xml index a2c3e5e01c..ee1421c8e6 100644 --- a/config/alfresco/web-client-config-wizards.xml +++ b/config/alfresco/web-client-config-wizards.xml @@ -113,13 +113,13 @@ title-id="invite_title" description-id="invite_desc" icon="/images/icons/users_large.gif"> - - @@ -143,7 +143,7 @@ instruction-id="default_instruction" /> - @@ -661,16 +661,17 @@ instruction-id="new_edition_finish_instruction" /> - + + @@ -678,7 +679,7 @@ @@ -692,15 +693,15 @@ + managed-bean="EditUserWizard" + title-id="new_user_title_edit" + description-id="new_user_desc_edit" + icon="/images/icons/edituser_large.gif"> @@ -708,7 +709,7 @@ diff --git a/source/java/org/alfresco/web/action/evaluator/AddTranslationEvaluator.java b/source/java/org/alfresco/web/action/evaluator/AddTranslationEvaluator.java index aff603c6b2..92d08cf438 100644 --- a/source/java/org/alfresco/web/action/evaluator/AddTranslationEvaluator.java +++ b/source/java/org/alfresco/web/action/evaluator/AddTranslationEvaluator.java @@ -29,7 +29,7 @@ import javax.faces.context.FacesContext; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.ml.MultilingualContentService; import org.alfresco.web.app.servlet.FacesHelper; -import org.alfresco.web.bean.UserPreferencesBean; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.bean.ml.MultilingualUtils; import org.alfresco.web.bean.repository.Node; diff --git a/source/java/org/alfresco/web/action/evaluator/MakeMultilingualEvaluator.java b/source/java/org/alfresco/web/action/evaluator/MakeMultilingualEvaluator.java index ae6f4d9237..0f0e8095fb 100644 --- a/source/java/org/alfresco/web/action/evaluator/MakeMultilingualEvaluator.java +++ b/source/java/org/alfresco/web/action/evaluator/MakeMultilingualEvaluator.java @@ -28,7 +28,7 @@ import javax.faces.context.FacesContext; import org.alfresco.model.ContentModel; import org.alfresco.web.app.servlet.FacesHelper; -import org.alfresco.web.bean.UserPreferencesBean; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.bean.repository.Node; /** diff --git a/source/java/org/alfresco/web/app/servlet/BaseServlet.java b/source/java/org/alfresco/web/app/servlet/BaseServlet.java index 6d7a37cfef..288ffb249b 100644 --- a/source/java/org/alfresco/web/app/servlet/BaseServlet.java +++ b/source/java/org/alfresco/web/app/servlet/BaseServlet.java @@ -80,8 +80,8 @@ public abstract class BaseServlet extends HttpServlet validRedirectJSPs.add("/jsp/users/user-console.jsp"); validRedirectJSPs.add("/jsp/categories/categories.jsp"); validRedirectJSPs.add("/jsp/dialog/about.jsp"); - validRedirectJSPs.add("/jsp/dialog/advanced-search.jsp"); - validRedirectJSPs.add("/jsp/dialog/system-info.jsp"); + validRedirectJSPs.add("/jsp/search/advanced-search.jsp"); + validRedirectJSPs.add("/jsp/admin/system-info.jsp"); validRedirectJSPs.add("/jsp/forums/forums.jsp"); validRedirectJSPs.add("/jsp/users/users.jsp"); validRedirectJSPs.add("/jsp/trashcan/trash-list.jsp"); diff --git a/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java b/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java index d0ba822180..d9a7bd4b55 100644 --- a/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java +++ b/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java @@ -72,8 +72,8 @@ public class ExternalAccessServlet extends BaseServlet private static Log logger = LogFactory.getLog(ExternalAccessServlet.class); - public final static String OUTCOME_DOCDETAILS = "showDocDetails"; - public final static String OUTCOME_SPACEDETAILS = "showSpaceDetails"; + public final static String OUTCOME_DOCDETAILS = "dialog:showDocDetails"; + public final static String OUTCOME_SPACEDETAILS = "dialog:showSpaceDetails"; public final static String OUTCOME_BROWSE = "browse"; public final static String OUTCOME_MYALFRESCO = "myalfresco"; public final static String OUTCOME_LOGOUT = "logout"; diff --git a/source/java/org/alfresco/web/bean/AboutBean.java b/source/java/org/alfresco/web/bean/AboutBean.java index 6183065b61..5b8668b416 100644 --- a/source/java/org/alfresco/web/bean/AboutBean.java +++ b/source/java/org/alfresco/web/bean/AboutBean.java @@ -24,15 +24,22 @@ */ package org.alfresco.web.bean; +import javax.faces.context.FacesContext; + import org.alfresco.service.descriptor.DescriptorService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.BaseDialogBean; /** * Simple backing bean used by the about page to display the version. * * @author gavinc */ -public class AboutBean +public class AboutBean extends BaseDialogBean { + private final static String MSG_VERSION = "version"; + private final static String MSG_CLOSE = "close"; + DescriptorService descriptorService; /** @@ -64,4 +71,29 @@ public class AboutBean { this.descriptorService = descriptorService; } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + @Override + public String getContainerDescription() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_VERSION) + " :" + getEdition() + " - v" + getVersion(); +} + + @Override + public String getCancelButtonLabel() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + @Override +protected String getDefaultCancelOutcome() { + + return "dialog:close:browse"; +} } diff --git a/source/java/org/alfresco/web/bean/BaseDetailsBean.java b/source/java/org/alfresco/web/bean/BaseDetailsBean.java index 47e4b7e0a9..47c348d172 100644 --- a/source/java/org/alfresco/web/bean/BaseDetailsBean.java +++ b/source/java/org/alfresco/web/bean/BaseDetailsBean.java @@ -50,6 +50,7 @@ import org.alfresco.service.namespace.QName; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.bean.actions.handlers.SimpleWorkflowHandler; +import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.workflow.WorkflowUtil; @@ -63,7 +64,7 @@ import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent; * * @author Kevin Roast */ -public abstract class BaseDetailsBean +public abstract class BaseDetailsBean extends BaseDialogBean { private static final String MSG_SUCCESS_OWNERSHIP = "success_ownership"; diff --git a/source/java/org/alfresco/web/bean/BrowseBean.java b/source/java/org/alfresco/web/bean/BrowseBean.java index be2a1bffc3..d097a0202c 100644 --- a/source/java/org/alfresco/web/bean/BrowseBean.java +++ b/source/java/org/alfresco/web/bean/BrowseBean.java @@ -67,12 +67,15 @@ import org.alfresco.web.app.context.IContextListener; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.app.servlet.DownloadContentServlet; import org.alfresco.web.app.servlet.FacesHelper; +import org.alfresco.web.bean.content.DocumentDetailsDialog; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.NodePropertyResolver; import org.alfresco.web.bean.repository.QNameNodeMap; import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.bean.search.SearchContext; import org.alfresco.web.bean.spaces.CreateSpaceWizard; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.config.ViewsConfigElement; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.Utils.URLMode; @@ -1567,7 +1570,7 @@ public class BrowseBean implements IContextListener NodeRef translation = new NodeRef(Repository.getStoreRef(), id); // remember the bean from wich the action comes - DocumentDetailsBean docDetails = (DocumentDetailsBean)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("DocumentDetailsBean"); + DocumentDetailsDialog docDetails = (DocumentDetailsDialog)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("DocumentDetailsDialog"); docDetails.setTranslationDocument(new Node(translation)); // set the ml container as the current document @@ -1614,9 +1617,9 @@ public class BrowseBean implements IContextListener listener.created(node, node.getType()); } - // get hold of the DocumentDetailsBean and reset it - DocumentDetailsBean docDetails = (DocumentDetailsBean)FacesContext.getCurrentInstance(). - getExternalContext().getSessionMap().get("DocumentDetailsBean"); + // get hold of the DocumentDetailsDialog and reset it + DocumentDetailsDialog docDetails = (DocumentDetailsDialog)FacesContext.getCurrentInstance(). + getExternalContext().getSessionMap().get("DocumentDetailsDialog"); if (docDetails != null) { docDetails.reset(); diff --git a/source/java/org/alfresco/web/bean/CategoryBrowserBean.java b/source/java/org/alfresco/web/bean/CategoryBrowserBean.java index f3db44178d..06d7ef1664 100644 --- a/source/java/org/alfresco/web/bean/CategoryBrowserBean.java +++ b/source/java/org/alfresco/web/bean/CategoryBrowserBean.java @@ -27,6 +27,7 @@ package org.alfresco.web.bean; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; +import org.alfresco.web.bean.search.SearchContext; public class CategoryBrowserBean { diff --git a/source/java/org/alfresco/web/bean/DeleteCategoryDialog.java b/source/java/org/alfresco/web/bean/DeleteCategoryDialog.java deleted file mode 100644 index 8f2b6feaf7..0000000000 --- a/source/java/org/alfresco/web/bean/DeleteCategoryDialog.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) 2005-2007 Alfresco Software Limited. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" - */ -package org.alfresco.web.bean; - -import java.io.Serializable; -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import javax.faces.context.FacesContext; - -import org.alfresco.model.ContentModel; -import org.alfresco.repo.transaction.RetryingTransactionHelper; -import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; -import org.alfresco.service.cmr.repository.ChildAssociationRef; -import org.alfresco.service.cmr.repository.NodeRef; -import org.alfresco.web.app.Application; -import org.alfresco.web.bean.repository.Repository; -import org.alfresco.web.ui.common.Utils; -import org.alfresco.web.ui.common.component.IBreadcrumbHandler; -import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler; - -public class DeleteCategoryDialog extends CategoriesDialog -{ - private static final String DEFAULT_OUTCOME = "finish"; - private final static String MSG_DELETE_CATEGORY = "delete_category"; - private final static String MSG_DELETE = "delete"; - - @Override - public boolean getFinishButtonDisabled() - { - return false; - } - - @Override - protected String finishImpl(FacesContext context, String outcome) throws Exception - { - finishDelete(); - return outcome; - } - - @Override - public String getContainerTitle() - { - - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DELETE_CATEGORY) + " '" + properties.getActionCategory().getName() + "'"; - } - - @Override - public String getFinishButtonLabel() - { - - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DELETE); - } - - public String finishDelete() - { - String outcome = DEFAULT_OUTCOME; - - if (properties.getActionCategory() != null) - { - try - { - FacesContext context = FacesContext.getCurrentInstance(); - RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(context); - RetryingTransactionCallback callback = new RetryingTransactionCallback() - { - @SuppressWarnings("unchecked") - public NodeRef execute() throws Throwable - { - // delete the category node using the nodeservice - NodeRef categoryNodeRef = properties.getActionCategory().getNodeRef(); - properties.getCategoryService().deleteCategory(categoryNodeRef); - - // if there are other items in the repository using this category - // all the associations to the category should be removed too - if (properties.getMembers() != null && properties.getMembers().size() > 0) - { - for (ChildAssociationRef childRef : properties.getMembers()) - { - List list = new ArrayList(properties.getMembers().size()); - - NodeRef member = childRef.getChildRef(); - Collection categories = (Collection) nodeService.getProperty(member, ContentModel.PROP_CATEGORIES); - - for (NodeRef category : categories) - { - if (category.equals(categoryNodeRef) == false) - { - list.add(category); - } - } - - // persist the list back to the repository - nodeService.setProperty(member, ContentModel.PROP_CATEGORIES, (Serializable) list); - } - } - return categoryNodeRef; - } - }; - NodeRef categoryNodeRef = txnHelper.doInTransaction(callback); - - // remove this node from the breadcrumb if required - List location = getLocation(); - IBreadcrumbHandler handler = location.get(location.size() - 1); - - // see if the current breadcrumb location is our node - if (categoryNodeRef.equals(((IRepoBreadcrumbHandler) handler).getNodeRef())) - { - location.remove(location.size() - 1); - - // now work out which node to set the list to refresh against - if (location.size() != 0) - { - handler = location.get(location.size() - 1); - this.setCurrentCategory(((IRepoBreadcrumbHandler) handler).getNodeRef()); - } - } - - // clear action context - setActionCategory(null); - } - catch (Throwable err) - { - Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); - outcome = null; - } - } - - return outcome; - } - -} diff --git a/source/java/org/alfresco/web/bean/EditCategoryDialog.java b/source/java/org/alfresco/web/bean/EditCategoryDialog.java deleted file mode 100644 index 94d992f9b7..0000000000 --- a/source/java/org/alfresco/web/bean/EditCategoryDialog.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2005-2007 Alfresco Software Limited. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" - */ -package org.alfresco.web.bean; - -import java.io.Serializable; -import java.text.MessageFormat; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.faces.context.FacesContext; - -import org.alfresco.model.ContentModel; -import org.alfresco.repo.transaction.RetryingTransactionHelper; -import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; -import org.alfresco.service.cmr.repository.NodeRef; -import org.alfresco.service.namespace.QName; -import org.alfresco.web.app.Application; -import org.alfresco.web.bean.repository.Repository; -import org.alfresco.web.ui.common.Utils; -import org.alfresco.web.ui.common.component.IBreadcrumbHandler; -import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler; - -public class EditCategoryDialog extends CategoriesDialog -{ - private static final String DEFAULT_OUTCOME = "finish"; - private final static String MSG_EDIT_CATEGORY = "edit_category"; - private final static String MSG_FINISH = "finish_button"; - - @Override - public boolean getFinishButtonDisabled() - { - return false; - } - - @Override - protected String finishImpl(FacesContext context, String outcome) throws Exception - { - finishEdit(); - return outcome; - } - - @Override - public String getContainerTitle() - { - - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_EDIT_CATEGORY) + " '" + properties.getActionCategory().getName() + "'"; - } - - @Override - public String getFinishButtonLabel() - { - - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_FINISH); - } - - public String finishEdit() - { - String outcome = DEFAULT_OUTCOME; - - try - { - FacesContext context = FacesContext.getCurrentInstance(); - RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(context); - RetryingTransactionCallback callback = new RetryingTransactionCallback() - { - public NodeRef execute() throws Throwable - { - // update the category node - NodeRef nodeRef = properties.getActionCategory().getNodeRef(); - nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, properties.getName()); - - // apply the titled aspect - for description - if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_TITLED) == false) - { - Map titledProps = new HashMap(1, 1.0f); - titledProps.put(ContentModel.PROP_DESCRIPTION, properties.getDescription()); - nodeService.addAspect(nodeRef, ContentModel.ASPECT_TITLED, titledProps); - } - else - { - nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, properties.getDescription()); - } - return nodeRef; - } - }; - NodeRef nodeRef = txnHelper.doInTransaction(callback); - - // edit the node in the breadcrumb if required - List location = getLocation(); - IBreadcrumbHandler handler = location.get(location.size() - 1); - - // see if the current breadcrumb location is our node - if (nodeRef.equals(((IRepoBreadcrumbHandler) handler).getNodeRef())) - { - // and update with the modified node details - IBreadcrumbHandler newHandler = new CategoryBreadcrumbHandler(nodeRef, Repository.getNameForNode(nodeService, nodeRef)); - location.set(location.size() - 1, newHandler); - } - } - catch (Throwable err) - { - Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); - outcome = null; - } - - return outcome; - } -} diff --git a/source/java/org/alfresco/web/bean/FileUploadBean.java b/source/java/org/alfresco/web/bean/FileUploadBean.java index ec9ad17956..3d9677124b 100644 --- a/source/java/org/alfresco/web/bean/FileUploadBean.java +++ b/source/java/org/alfresco/web/bean/FileUploadBean.java @@ -38,7 +38,7 @@ public final class FileUploadBean public static String getKey(final String id) { - return (id == null + return ((id == null || id.length() == 0) ? FILE_UPLOAD_BEAN_NAME : FILE_UPLOAD_BEAN_NAME + "-" + id); } diff --git a/source/java/org/alfresco/web/bean/LoginBean.java b/source/java/org/alfresco/web/bean/LoginBean.java index 0c80131297..62724d524e 100644 --- a/source/java/org/alfresco/web/bean/LoginBean.java +++ b/source/java/org/alfresco/web/bean/LoginBean.java @@ -45,6 +45,7 @@ import org.alfresco.web.app.Application; import org.alfresco.web.app.servlet.AuthenticationHelper; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.User; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.ui.common.Utils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/source/java/org/alfresco/web/bean/NavigationBean.java b/source/java/org/alfresco/web/bean/NavigationBean.java index f8f1ba44bf..abd9028041 100644 --- a/source/java/org/alfresco/web/bean/NavigationBean.java +++ b/source/java/org/alfresco/web/bean/NavigationBean.java @@ -63,7 +63,10 @@ import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.User; +import org.alfresco.web.bean.search.SearchContext; import org.alfresco.web.bean.spaces.CreateSpaceWizard; +import org.alfresco.web.bean.spaces.SpaceDetailsDialog; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.config.ClientConfigElement; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.IBreadcrumbHandler; @@ -859,7 +862,7 @@ public class NavigationBean */ public boolean isRSSFeed() { - return SpaceDetailsBean.hasRSSFeed(getCurrentNode()); + return SpaceDetailsDialog.hasRSSFeed(getCurrentNode()); } /** @@ -867,7 +870,7 @@ public class NavigationBean */ public String getRSSFeedURL() { - return SpaceDetailsBean.buildRSSFeedURL(getCurrentNode()); + return SpaceDetailsDialog.buildRSSFeedURL(getCurrentNode()); } diff --git a/source/java/org/alfresco/web/bean/SpaceLinkDetailsDialog.java b/source/java/org/alfresco/web/bean/SpaceLinkDetailsDialog.java new file mode 100644 index 0000000000..3c42e28800 --- /dev/null +++ b/source/java/org/alfresco/web/bean/SpaceLinkDetailsDialog.java @@ -0,0 +1,237 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.model.ApplicationModel; +import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.NavigationSupport; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.component.UIActionLink; + +public class SpaceLinkDetailsDialog extends BaseDetailsBean implements NavigationSupport +{ + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; + + /** + * Returns the Space this bean is currently representing + * + * @return The Space Node + */ + public Node getSpace() + { + return getNode(); + } + + @Override + protected Node getLinkResolvedNode() + { + Node space = getSpace(); + if (ApplicationModel.TYPE_FOLDERLINK.equals(space.getType())) + { + NodeRef destRef = (NodeRef) space.getProperties().get(ContentModel.PROP_LINK_DESTINATION); + if (nodeService.exists(destRef)) + { + space = new Node(destRef); + } + } + return space; + } + + @Override + public Node getNode() + { + return this.browseBean.getActionSpace(); + } + + @Override + protected String getPropertiesPanelId() + { + return "space-props"; + } + + @Override + public Map getTemplateModel() + { + HashMap model = new HashMap(1, 1.0f); + + model.put("space", getSpace().getNodeRef()); + model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver); + + return model; + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public void nextItem(ActionEvent event) + { + boolean foundNextItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node next; + // found our item - navigate to next + if (i != nodes.size() - 1) + { + next = nodes.get(i + 1); + } + else + { + // handle wrapping case + next = nodes.get(0); + } + + // prepare for showing details for this node + this.browseBean.setupSpaceAction(next.getId(), false); + + // we found a next item + foundNextItem = true; + } + } + } + + // if we did not find a next item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundNextItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public void previousItem(ActionEvent event) + { + boolean foundPreviousItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // see above + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node previous; + // found our item - navigate to previous + if (i != 0) + { + previous = nodes.get(i - 1); + } + else + { + // handle wrapping case + previous = nodes.get(nodes.size() - 1); + } + + // show details for this node + this.browseBean.setupSpaceAction(previous.getId(), false); + + // we found a next item + foundPreviousItem = true; + } + } + } + + // if we did not find a previous item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundPreviousItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + @Override + public String getContainerSubTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getSpace().getNodePath().toDisplayPath(nodeService, permissionService); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" + getName() + "'"; + } + + public String getOutcome() + { + return "dialog:close:dialog:showSpaceDetails"; + } + + public String cancel() + { + this.navigator.resetCurrentNodeProperties(); + return super.cancel(); + } +} diff --git a/source/java/org/alfresco/web/bean/AdminConsoleDialog.java b/source/java/org/alfresco/web/bean/admin/AdminConsoleDialog.java similarity index 97% rename from source/java/org/alfresco/web/bean/AdminConsoleDialog.java rename to source/java/org/alfresco/web/bean/admin/AdminConsoleDialog.java index 9f655679d0..7ccce40e77 100644 --- a/source/java/org/alfresco/web/bean/AdminConsoleDialog.java +++ b/source/java/org/alfresco/web/bean/admin/AdminConsoleDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.admin; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/AdminNodeBrowseBean.java b/source/java/org/alfresco/web/bean/admin/AdminNodeBrowseBean.java similarity index 96% rename from source/java/org/alfresco/web/bean/AdminNodeBrowseBean.java rename to source/java/org/alfresco/web/bean/admin/AdminNodeBrowseBean.java index 86c8fe07e8..9dbdb9d13a 100644 --- a/source/java/org/alfresco/web/bean/AdminNodeBrowseBean.java +++ b/source/java/org/alfresco/web/bean/admin/AdminNodeBrowseBean.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.admin; import java.io.Serializable; import java.util.ArrayList; diff --git a/source/java/org/alfresco/web/bean/ConfigAdminConsoleBean.java b/source/java/org/alfresco/web/bean/admin/ConfigAdminConsoleBean.java similarity index 95% rename from source/java/org/alfresco/web/bean/ConfigAdminConsoleBean.java rename to source/java/org/alfresco/web/bean/admin/ConfigAdminConsoleBean.java index 87ec8c58cf..353d4cc9f6 100755 --- a/source/java/org/alfresco/web/bean/ConfigAdminConsoleBean.java +++ b/source/java/org/alfresco/web/bean/admin/ConfigAdminConsoleBean.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.admin; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/source/java/org/alfresco/web/bean/ExportDialog.java b/source/java/org/alfresco/web/bean/admin/ExportDialog.java similarity index 95% rename from source/java/org/alfresco/web/bean/ExportDialog.java rename to source/java/org/alfresco/web/bean/admin/ExportDialog.java index 7a5a08e063..325c32b6f8 100644 --- a/source/java/org/alfresco/web/bean/ExportDialog.java +++ b/source/java/org/alfresco/web/bean/admin/ExportDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.admin; import java.io.Serializable; import java.util.HashMap; @@ -37,6 +37,7 @@ import org.alfresco.service.cmr.action.ActionService; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Repository; import org.apache.commons.logging.Log; diff --git a/source/java/org/alfresco/web/bean/ImportBean.java b/source/java/org/alfresco/web/bean/admin/ImportDialog.java similarity index 88% rename from source/java/org/alfresco/web/bean/ImportBean.java rename to source/java/org/alfresco/web/bean/admin/ImportDialog.java index d6a10a1c55..fa53b22f25 100644 --- a/source/java/org/alfresco/web/bean/ImportBean.java +++ b/source/java/org/alfresco/web/bean/admin/ImportDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.admin; import java.io.File; import java.io.Serializable; @@ -48,6 +48,9 @@ import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.QName; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BrowseBean; +import org.alfresco.web.bean.FileUploadBean; +import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; import org.apache.commons.logging.Log; @@ -58,15 +61,17 @@ import org.apache.commons.logging.LogFactory; * * @author gavinc */ -public class ImportBean +public class ImportDialog extends BaseDialogBean { - private static final Log logger = LogFactory.getLog(ImportBean.class); + private static final Log logger = LogFactory.getLog(ImportDialog.class); private static final String DEFAULT_OUTCOME = "dialog:close"; private static final String MSG_ERROR = "error_import"; private static final String MSG_ERROR_NO_FILE = "error_import_no_file"; private static final String MSG_ERROR_EMPTY_FILE = "error_import_empty_file"; + private static final String MSG_OK = "ok"; + private static final String MSG_IMPORT = "import"; protected BrowseBean browseBean; protected NodeService nodeService; @@ -84,9 +89,9 @@ public class ImportBean * * @return The outcome */ - public String performImport() + public String performImport(final FacesContext context, String outcome) { - String outcome = DEFAULT_OUTCOME; + if (logger.isDebugEnabled()) logger.debug("Called import for file: " + this.file); @@ -98,7 +103,7 @@ public class ImportBean { try { - final FacesContext context = FacesContext.getCurrentInstance(); + RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(context); RetryingTransactionCallback callback = new RetryingTransactionCallback() { @@ -342,4 +347,28 @@ public class ImportBean return acpNodeRef; } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return performImport(context,outcome); + } + + @Override + public boolean getFinishButtonDisabled() + { + return getFileName() == null; + } + + @Override + public String getFinishButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_OK); + } + + @Override + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_IMPORT) + " '" + browseBean.getActionSpace().getName() + "'"; + } } diff --git a/source/java/org/alfresco/web/bean/ShowSystemInfoDialog.java b/source/java/org/alfresco/web/bean/admin/ShowSystemInfoDialog.java similarity index 97% rename from source/java/org/alfresco/web/bean/ShowSystemInfoDialog.java rename to source/java/org/alfresco/web/bean/admin/ShowSystemInfoDialog.java index d8506cfb55..20e1699678 100644 --- a/source/java/org/alfresco/web/bean/ShowSystemInfoDialog.java +++ b/source/java/org/alfresco/web/bean/admin/ShowSystemInfoDialog.java @@ -22,11 +22,12 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.admin; import javax.faces.context.FacesContext; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.AboutBean; import org.alfresco.web.bean.dialog.BaseDialogBean; /** diff --git a/source/java/org/alfresco/web/bean/CategoriesDialog.java b/source/java/org/alfresco/web/bean/categories/CategoriesDialog.java similarity index 60% rename from source/java/org/alfresco/web/bean/CategoriesDialog.java rename to source/java/org/alfresco/web/bean/categories/CategoriesDialog.java index 87abfc4f51..91e49eaf61 100644 --- a/source/java/org/alfresco/web/bean/CategoriesDialog.java +++ b/source/java/org/alfresco/web/bean/categories/CategoriesDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.categories; import java.text.MessageFormat; import java.util.ArrayList; @@ -39,19 +39,23 @@ import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.search.CategoryService; import org.alfresco.service.cmr.search.CategoryService.Depth; import org.alfresco.service.cmr.search.CategoryService.Mode; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.IContextListener; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.bean.dialog.BaseDialogBean; +import org.alfresco.web.bean.dialog.ChangeViewSupport; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.IBreadcrumbHandler; import org.alfresco.web.ui.common.component.UIActionLink; import org.alfresco.web.ui.common.component.UIBreadcrumb; +import org.alfresco.web.ui.common.component.UIListItem; import org.alfresco.web.ui.common.component.UIModeList; +import org.alfresco.web.ui.common.component.data.UIRichList; import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -61,11 +65,47 @@ import org.apache.commons.logging.LogFactory; * * @author Kevin Roast */ -public class CategoriesDialog extends BaseDialogBean implements IContextListener +public class CategoriesDialog extends BaseDialogBean implements IContextListener, ChangeViewSupport { - protected CategoriesProperties properties; + public static final String KEY_CATEGORY = "category"; + + public static final String PARAM_CATEGORY_REF = "categoryRef"; + + private static final String VIEW_ICONS = "icons"; + private static final String VIEW_DETAILS = "details"; + + private static final String LABEL_VIEW_ICONS = "category_icons"; + private static final String LABEL_VIEW_DETAILS = "category_details"; + private final static String MSG_CLOSE = "close"; + + protected CategoryService categoryService; + + /** Members of the linked items of a category */ + private Collection members = null; + + /** Currently visible category Node */ + private Node category = null; + + /** Current category ref */ + private NodeRef categoryRef = null; + + /** Action category node */ + private Node actionCategory = null; + + /** RichList view mode */ + private String viewMode = "icons"; + + /** Component references */ + protected UIRichList categoriesRichList; + + /** Category path breadcrumb location */ + private List location = null; private static final String MSG_CATEGORIES = "categories"; + + /** Dialog properties */ + private String name = null; + private String description = null; private static Log logger = LogFactory.getLog(CategoriesDialog.class); @@ -82,17 +122,98 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener // ------------------------------------------------------------------------------ - public void setProperties(CategoriesProperties properties) - { - this.properties = properties; - } - /** * @return Returns the members count for current action category. */ - public int getMembers() + public int getMembersCount() { - return (properties.getMembers() != null ? properties.getMembers().size() : 0); + return (getMembers() != null ? getMembers().size() : 0); + } + + public Collection getMembers() + { + return members; + } + + public void setMembers(Collection members) + { + this.members = members; + } + + public Node getActionCategory() + { + return actionCategory; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getId() + { + return getCurrentCategoryId(); + } + + public String getDescription() + { + return description; + } + + public void setDescription(String description) + { + this.description = description; + } + + public CategoryService getCategoryService() + { + return categoryService; + } + + public void setCategoryService(CategoryService categoryService) + { + this.categoryService = categoryService; + } + + public Node getCategory() + { + return category; + } + + public void setCategory(Node category) + { + this.category = category; + } + + public NodeRef getCategoryRef() + { + return categoryRef; + } + + public void setCategoryRef(NodeRef categoryRef) + { + this.categoryRef = categoryRef; + } + + public UIRichList getCategoriesRichList() + { + return categoriesRichList; + } + + public void setCategoriesRichList(UIRichList categoriesRichList) + { + this.categoriesRichList = categoriesRichList; + } + + @Override + public Object getActionsContext() + { + return this; } /** @@ -101,21 +222,21 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener @SuppressWarnings("unchecked") public void setActionCategory(Node node) { - properties.setActionCategory(node); + this.actionCategory = node; if (node != null) { // setup form properties - properties.setName(node.getName()); - properties.setDescription((String)node.getProperties().get(ContentModel.PROP_DESCRIPTION)); - properties.setMembers(properties.getCategoryService().getChildren(node.getNodeRef(), Mode.MEMBERS, Depth.ANY)); + setName(node.getName()); + setDescription((String)node.getProperties().get(ContentModel.PROP_DESCRIPTION)); + setMembers(getCategoryService().getChildren(node.getNodeRef(), Mode.MEMBERS, Depth.ANY)); } else { - properties.setName(null); - properties.setDescription(null); + setName(null); + setDescription(null); Object emptyCollection = Collections.emptyList(); - properties.setMembers((Collection) emptyCollection); + setMembers((Collection) emptyCollection); } } @@ -124,15 +245,15 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener */ public Node getCurrentCategory() { - if (properties.getCategory() == null) + if (getCategory() == null) { - if (properties.getCategoryRef() != null) + if (getCategoryRef() != null) { - properties.setCategory(new Node(properties.getCategoryRef())); + setCategory(new Node(getCategoryRef())); } } - return properties.getCategory(); + return getCategory(); } /** @@ -140,9 +261,9 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener */ public String getCurrentCategoryId() { - if (properties.getCategoryRef() != null) + if (getCategoryRef() != null) { - return properties.getCategoryRef().getId(); + return getCategoryRef().getId(); } else { @@ -163,29 +284,34 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener logger.debug("Setting current category: " + ref); // set the current NodeRef for our UI context operations - properties.setCategoryRef(ref); + setCategoryRef(ref); // clear current node context - properties.setCategory(null); + setCategory(null); // inform that the UI needs updating after this change contextUpdated(); } + public void setLocation(List location) + { + this.location = location; + } + /** * @return Breadcrumb location list */ public List getLocation() { - if (properties.getLocation() == null) + if (this.location == null) { List loc = new ArrayList(8); loc.add(new CategoryBreadcrumbHandler(null, Application.getMessage(FacesContext.getCurrentInstance(), MSG_CATEGORIES))); - properties.setLocation(loc); + setLocation(loc); } - return properties.getLocation(); + return this.location; } /** @@ -204,15 +330,15 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener tx.begin(); Collection refs; - if (properties.getCategoryRef() == null) + if (getCategoryRef() == null) { // root categories - refs = properties.getCategoryService().getCategories(Repository.getStoreRef(), ContentModel.ASPECT_GEN_CLASSIFIABLE, Depth.IMMEDIATE); + refs = getCategoryService().getCategories(Repository.getStoreRef(), ContentModel.ASPECT_GEN_CLASSIFIABLE, Depth.IMMEDIATE); } else { // sub-categories of an existing category - refs = properties.getCategoryService().getChildren(properties.getCategoryRef(), Mode.SUB_CATEGORIES, Depth.IMMEDIATE); + refs = getCategoryService().getChildren(getCategoryRef(), Mode.SUB_CATEGORIES, Depth.IMMEDIATE); } categories = new ArrayList(refs.size()); for (ChildAssociationRef child : refs) @@ -302,7 +428,6 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener try { NodeRef ref = new NodeRef(Repository.getStoreRef(), id); - // refresh UI based on node selection updateUILocation(ref); } @@ -314,35 +439,58 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener } } - /** - * Change the current view mode based on user selection - * - * @param event ActionEvent - */ - public void viewModeChanged(ActionEvent event) - { - UIModeList viewList = (UIModeList)event.getComponent(); - - // get the view mode ID - properties.setViewMode(viewList.getValue().toString()); - } - /** * Update the breadcrumb with the clicked category location */ private void updateUILocation(NodeRef ref) { String name = Repository.getNameForNode(this.nodeService, ref); - properties.getLocation().add(new CategoryBreadcrumbHandler(ref, name)); + getLocation().add(new CategoryBreadcrumbHandler(ref, name)); this.setCurrentCategory(ref); } + protected void removeFromBreadcrumb(String category) + { + // remove this node from the breadcrumb if required + List location = getLocation(); + CategoryBreadcrumbHandler handler = (CategoryBreadcrumbHandler) location.get(location.size() - 1); + + // see if the current breadcrumb location is our Category + if (category.equals(handler.label)) + { + location.remove(location.size() - 1); + + // now work out which Category to set the list to refresh against + if (location.size() != 0) + { + handler = (CategoryBreadcrumbHandler) location.get(location.size() - 1); + this.setCurrentCategory(handler.nodeRef); + } + } + } + @Override protected String finishImpl(FacesContext context, String outcome) throws Exception { return null; } + public String getContainerSubTitle() + { + if (getCurrentCategoryId() != null) + { + return getCurrentCategory().getName(); + } + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CATEGORIES); + } + + @Override + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + // ------------------------------------------------------------------------------ // IContextListener implementation @@ -355,10 +503,14 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener logger.debug("Invalidating Category Management Components..."); // force a requery of the current category ref properties - properties.setCategory(null); + setCategory(null); // force a requery of the richlist dataset - properties.getCategoriesRichList().setValue(null); + if (this.categoriesRichList != null) + { + this.categoriesRichList.setValue(null); + } + } /** @@ -383,7 +535,7 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener /** * Class to handle breadcrumb interaction for Categories pages */ - protected class CategoryBreadcrumbHandler implements IRepoBreadcrumbHandler + public class CategoryBreadcrumbHandler implements IRepoBreadcrumbHandler { private static final long serialVersionUID = 3831234653171036630L; @@ -416,7 +568,7 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener // All category breadcrumb elements relate to a Categiry Node Id // when selected we set the current category Id and return setCurrentCategory(this.nodeRef); - properties.setLocation((List)breadcrumb.getValue()); + setLocation((List)breadcrumb.getValue()); return null; } @@ -429,4 +581,77 @@ public class CategoriesDialog extends BaseDialogBean implements IContextListener private NodeRef nodeRef; private String label; } + + public List getViewItems() + { + FacesContext context = FacesContext.getCurrentInstance(); + List items = new ArrayList(2); + + UIListItem item1 = new UIListItem(); + item1.setValue(VIEW_ICONS); + item1.setLabel(Application.getMessage(context, LABEL_VIEW_ICONS)); + items.add(item1); + + UIListItem item2 = new UIListItem(); + item2.setValue(VIEW_DETAILS); + item2.setLabel(Application.getMessage(context, LABEL_VIEW_DETAILS)); + items.add(item2); + + return items; + } + + @Override + public void restored() + { + Object categoryToRemove = FacesContext.getCurrentInstance().getExternalContext(). + getRequestMap().get(KEY_CATEGORY); + if (categoryToRemove != null) + { + if (logger.isDebugEnabled()) + logger.debug("Removing group '" + categoryToRemove + "' from breadcrumb"); + + removeFromBreadcrumb((String)categoryToRemove); + } + contextUpdated(); + } + + public String getViewMode() + { + return viewMode; + } + + public void setViewMode(String viewMode) + { + this.viewMode = viewMode; + } + + /** + * Change the current view mode based on user selection + * + * @param event ActionEvent + */ + public void viewModeChanged(ActionEvent event) + { + UIModeList viewList = (UIModeList)event.getComponent(); + + // get the view mode ID + setViewMode(viewList.getValue().toString()); + } + + + + @Override + public String getMoreActionsConfigId() + { + if(getCurrentCategoryId() != null) + { + return "category_more_actions"; + } + return null; + } + + public NodeRef getNodeRef() + { + return getCurrentCategory().getNodeRef(); + } } diff --git a/source/java/org/alfresco/web/bean/CreateCategoryDialog.java b/source/java/org/alfresco/web/bean/categories/CreateCategoryDialog.java similarity index 65% rename from source/java/org/alfresco/web/bean/CreateCategoryDialog.java rename to source/java/org/alfresco/web/bean/categories/CreateCategoryDialog.java index dd01e59bde..40a3a7242f 100644 --- a/source/java/org/alfresco/web/bean/CreateCategoryDialog.java +++ b/source/java/org/alfresco/web/bean/categories/CreateCategoryDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.categories; import java.io.Serializable; import java.text.MessageFormat; @@ -35,15 +35,83 @@ import org.alfresco.model.ContentModel; import org.alfresco.repo.transaction.RetryingTransactionHelper; import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.search.CategoryService; import org.alfresco.service.namespace.QName; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; -public class CreateCategoryDialog extends CategoriesDialog +public class CreateCategoryDialog extends BaseDialogBean { private static final String DEFAULT_OUTCOME = "finish"; + + protected CategoryService categoryService; + + /** Current category ref */ + private NodeRef categoryRef = null; + + /** Dialog properties */ + private String name = null; + private String description = null; + + @Override + public void init(Map parameters) + { + this.isFinished = false; + + // retrieve parameters + String ref = parameters.get(CategoriesDialog.PARAM_CATEGORY_REF); + + this.name = null; + this.description = null; + + if (ref != null) + { + categoryRef = new NodeRef(ref); + } + } + + public CategoryService getCategoryService() + { + return categoryService; + } + public void setCategoryService(CategoryService categoryService) + { + this.categoryService = categoryService; + } + + public NodeRef getCategoryRef() + { + return categoryRef; + } + + public void setCategoryRef(NodeRef categoryRef) + { + this.categoryRef = categoryRef; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String description) + { + this.description = description; + } + @Override public boolean getFinishButtonDisabled() { @@ -62,7 +130,7 @@ public class CreateCategoryDialog extends CategoriesDialog { return Application.getMessage(FacesContext.getCurrentInstance(), "new_category"); } - + public String finishCreate() { String outcome = DEFAULT_OUTCOME; @@ -77,18 +145,18 @@ public class CreateCategoryDialog extends CategoriesDialog { // create category using categoryservice NodeRef ref; - if (properties.getCategoryRef() == null) + if (getCategoryRef() == null || getCategoryRef().getId().equals("null")) { - ref = properties.getCategoryService().createRootCategory(Repository.getStoreRef(), ContentModel.ASPECT_GEN_CLASSIFIABLE, properties.getName()); + ref = getCategoryService().createRootCategory(Repository.getStoreRef(), ContentModel.ASPECT_GEN_CLASSIFIABLE, getName()); } else { - ref = properties.getCategoryService().createCategory(properties.getCategoryRef(), properties.getName()); + ref = getCategoryService().createCategory(getCategoryRef(), getName()); } // apply the titled aspect - for description Map titledProps = new HashMap(1, 1.0f); - titledProps.put(ContentModel.PROP_DESCRIPTION, properties.getDescription()); + titledProps.put(ContentModel.PROP_DESCRIPTION, getDescription()); nodeService.addAspect(ref, ContentModel.ASPECT_TITLED, titledProps); return null; } diff --git a/source/java/org/alfresco/web/bean/categories/DeleteCategoryDialog.java b/source/java/org/alfresco/web/bean/categories/DeleteCategoryDialog.java new file mode 100644 index 0000000000..4185700900 --- /dev/null +++ b/source/java/org/alfresco/web/bean/categories/DeleteCategoryDialog.java @@ -0,0 +1,405 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.categories; + +import java.io.Serializable; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; + +import org.alfresco.model.ContentModel; +import org.alfresco.repo.transaction.RetryingTransactionHelper; +import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; +import org.alfresco.service.cmr.repository.ChildAssociationRef; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.search.CategoryService; +import org.alfresco.service.cmr.search.CategoryService.Depth; +import org.alfresco.service.cmr.search.CategoryService.Mode; +import org.alfresco.util.ParameterCheck; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.BaseDialogBean; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.Utils; +import org.alfresco.web.ui.common.component.IBreadcrumbHandler; +import org.alfresco.web.ui.common.component.data.UIRichList; +import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class DeleteCategoryDialog extends BaseDialogBean +{ + private static final String DEFAULT_OUTCOME = "finish"; + private final static String MSG_DELETE_CATEGORY = "delete_category"; + private final static String MSG_DELETE = "delete"; + + private static final String MSG_CATEGORIES = "categories"; + + protected CategoryService categoryService; + + /** Dialog properties */ + private String name = null; + private String description = null; + + /** Category path breadcrumb location */ + private List location = null; + + /** Members of the linked items of a category */ + private Collection members = null; + + /** Current category ref */ + private NodeRef categoryRef = null; + + /** Action category node */ + private Node actionCategory = null; + + /** Component references */ + protected UIRichList categoriesRichList; + + /** Currently visible category Node */ + private Node category = null; + + private static Log logger = LogFactory.getLog(DeleteCategoryDialog.class); + + @Override + public void init(Map parameters) + { + this.isFinished = false; + + // retrieve parameters + String categoryRef = parameters.get(CategoriesDialog.PARAM_CATEGORY_REF); + + // make sure nodeRef was supplied + ParameterCheck.mandatoryString(CategoriesDialog.PARAM_CATEGORY_REF, categoryRef); + + // create the node + this.category = new Node(new NodeRef(categoryRef)); + + setActionCategory(category); + } + + @Override + protected String doPostCommitProcessing(FacesContext context, String outcome) + { + // add the category to the request object so it gets picked up by + // category dialog, this will allow it to be removed from the breadcrumb + context.getExternalContext().getRequestMap().put( + CategoriesDialog.KEY_CATEGORY, this.category.getName()); + + return outcome; + } + + public Collection getMembers() + { + return members; + } + + public void setMembers(Collection members) + { + this.members = members; + } + + public int getMembersSize() + { + return getMembers().size(); + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String description) + { + this.description = description; + } + + public CategoryService getCategoryService() + { + return categoryService; + } + + public void setCategoryService(CategoryService categoryService) + { + this.categoryService = categoryService; + } + + public NodeRef getCategoryRef() + { + return categoryRef; + } + + public void setCategoryRef(NodeRef categoryRef) + { + this.categoryRef = categoryRef; + } + + public Node getCategory() + { + return category; + } + + public void setCategory(Node category) + { + this.category = category; + } + + /** + * @param node Set the Node to be used for the current category screen action. + */ + @SuppressWarnings("unchecked") + public void setActionCategory(Node node) + { + this.actionCategory = node; + + if (node != null) + { + // setup form properties + setName(node.getName()); + setDescription((String)node.getProperties().get(ContentModel.PROP_DESCRIPTION)); + setMembers(getCategoryService().getChildren(node.getNodeRef(), Mode.MEMBERS, Depth.ANY)); + } + else + { + setName(null); + setDescription(null); + Object emptyCollection = Collections.emptyList(); + setMembers((Collection) emptyCollection); + } + } + + public Node getActionCategory() + { + return actionCategory; + } + + public void setLocation(List location) + { + this.location = location; + } + + /** + * @return Breadcrumb location list + */ + public List getLocation() + { + if (this.location == null) + { + List loc = new ArrayList(8); + CategoriesDialog categoriesDialog = new CategoriesDialog(); + loc.add(categoriesDialog.new CategoryBreadcrumbHandler(null, Application.getMessage(FacesContext.getCurrentInstance(), MSG_CATEGORIES))); + + setLocation(loc); + } + return this.location; + } + + @Override + public boolean getFinishButtonDisabled() + { + return false; + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + finishDelete(); + return outcome; + } + + @Override + public String getContainerTitle() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DELETE_CATEGORY) + " '" + getActionCategory().getName() + "'"; + } + + @Override + public String getFinishButtonLabel() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DELETE); + } + + public UIRichList getCategoriesRichList() + { + return categoriesRichList; + } + + public void setCategoriesRichList(UIRichList categoriesRichList) + { + this.categoriesRichList = categoriesRichList; + } + + /** + * @see org.alfresco.web.app.context.IContextListener#contextUpdated() + */ + public void contextUpdated() + { + if (logger.isDebugEnabled()) + logger.debug("Invalidating Category Management Components..."); + + // force a requery of the current category ref properties + setCategory(null); + + // force a requery of the richlist dataset + if (this.categoriesRichList != null) + { + this.categoriesRichList.setValue(null); + } + + } + + /** + * @return The ID of the currently displayed category or null if at the root. + */ + public String getCurrentCategoryId() + { + if (getCategoryRef() != null) + { + return getCategoryRef().getId(); + } + else + { + return null; + } + } + + /** + * Set the current category node. + *

+ * Setting this value causes the UI to update and display the specified node as current. + * + * @param ref The current category node. + */ + public void setCurrentCategory(NodeRef ref) + { + if (logger.isDebugEnabled()) + logger.debug("Setting current category: " + ref); + + // set the current NodeRef for our UI context operations + setCategoryRef(ref); + + // clear current node context + setCategory(null); + + // inform that the UI needs updating after this change + contextUpdated(); + } + + + public String finishDelete() + { + String outcome = DEFAULT_OUTCOME; + + if (getActionCategory() != null) + { + try + { + FacesContext context = FacesContext.getCurrentInstance(); + RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(context); + RetryingTransactionCallback callback = new RetryingTransactionCallback() + { + @SuppressWarnings("unchecked") + public NodeRef execute() throws Throwable + { + // delete the category node using the nodeservice + NodeRef categoryNodeRef = getActionCategory().getNodeRef(); + getCategoryService().deleteCategory(categoryNodeRef); + + // if there are other items in the repository using this category + // all the associations to the category should be removed too + if (getMembers() != null && getMembers().size() > 0) + { + for (ChildAssociationRef childRef : getMembers()) + { + List list = new ArrayList(getMembers().size()); + + NodeRef member = childRef.getChildRef(); + Collection categories = (Collection) nodeService.getProperty(member, ContentModel.PROP_CATEGORIES); + + for (NodeRef category : categories) + { + if (category.equals(categoryNodeRef) == false) + { + list.add(category); + } + } + + // persist the list back to the repository + nodeService.setProperty(member, ContentModel.PROP_CATEGORIES, (Serializable) list); + } + } + return categoryNodeRef; + } + }; + NodeRef categoryNodeRef = txnHelper.doInTransaction(callback); + + // remove this node from the breadcrumb if required + List location = getLocation(); + IBreadcrumbHandler handler = location.get(location.size() - 1); + + // see if the current breadcrumb location is our node + if (categoryNodeRef.equals(((IRepoBreadcrumbHandler) handler).getNodeRef())) + { + location.remove(location.size() - 1); + + // now work out which node to set the list to refresh against + if (location.size() != 0) + { + handler = location.get(location.size() - 1); + this.setCurrentCategory(((IRepoBreadcrumbHandler) handler).getNodeRef()); + } + } + + // clear action context + setActionCategory(null); + } + catch (Throwable err) + { + Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); + outcome = null; + } + } + + return outcome; + } + +} diff --git a/source/java/org/alfresco/web/bean/categories/EditCategoryDialog.java b/source/java/org/alfresco/web/bean/categories/EditCategoryDialog.java new file mode 100644 index 0000000000..c7ebd7aa15 --- /dev/null +++ b/source/java/org/alfresco/web/bean/categories/EditCategoryDialog.java @@ -0,0 +1,281 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.categories; + +import java.io.Serializable; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; + +import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.repository.ChildAssociationRef; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.search.CategoryService; +import org.alfresco.service.cmr.search.CategoryService.Depth; +import org.alfresco.service.cmr.search.CategoryService.Mode; +import org.alfresco.service.namespace.QName; +import org.alfresco.util.ParameterCheck; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.BaseDialogBean; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.Utils; +import org.alfresco.web.ui.common.component.IBreadcrumbHandler; +import org.alfresco.web.ui.common.component.data.UIRichList; +import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler; + +public class EditCategoryDialog extends BaseDialogBean +{ + private static final String DEFAULT_OUTCOME = "finish"; + private final static String MSG_EDIT_CATEGORY = "edit_category"; + private final static String MSG_FINISH = "finish_button"; + private static final String MSG_CATEGORIES = "categories"; + + protected CategoryService categoryService; + + /** Action category node */ + private Node actionCategory = null; + + /** Currently visible category Node */ + private Node category = null; + + String categoryRef = null; + + /** Category path breadcrumb location */ + private List location = null; + + /** Members of the linked items of a category */ + private Collection members = null; + + /** Component references */ + protected UIRichList categoriesRichList; + + /** Dialog properties */ + private String name = null; + private String description = null; + + @Override + public void init(Map parameters) + { + this.isFinished = false; + + // retrieve parameters + categoryRef = parameters.get(CategoriesDialog.PARAM_CATEGORY_REF); + + // make sure nodeRef was supplied + ParameterCheck.mandatoryString(CategoriesDialog.PARAM_CATEGORY_REF, categoryRef); + + // create the node + this.category = new Node(new NodeRef(categoryRef)); + + setActionCategory(category); + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String description) + { + this.description = description; + } + + public UIRichList getCategoriesRichList() + { + return categoriesRichList; + } + + public void setCategoriesRichList(UIRichList categoriesRichList) + { + this.categoriesRichList = categoriesRichList; + } + + public CategoryService getCategoryService() + { + return categoryService; + } + + public void setCategoryService(CategoryService categoryService) + { + this.categoryService = categoryService; + } + + public Node getCategory() + { + return category; + } + + public void setCategory(Node category) + { + this.category = category; + } + + public Collection getMembers() + { + return members; + } + + public void setMembers(Collection members) + { + this.members = members; + } + + @SuppressWarnings("unchecked") + public void setActionCategory(Node node) + { + this.actionCategory = node; + + if (node != null) + { + // setup form properties + setName(node.getName()); + setDescription((String) node.getProperties().get(ContentModel.PROP_DESCRIPTION)); + setMembers(getCategoryService().getChildren(node.getNodeRef(), Mode.MEMBERS, Depth.ANY)); + } + else + { + setName(null); + setDescription(null); + Object emptyCollection = Collections.emptyList(); + setMembers((Collection) emptyCollection); + } + } + + public Node getActionCategory() + { + return actionCategory; + } + + @Override + public boolean getFinishButtonDisabled() + { + return false; + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + + finishEdit(); + return outcome; + } + + @Override + public String getContainerTitle() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_EDIT_CATEGORY) + " '" + getActionCategory().getName() + "'"; + } + + @Override + public String getFinishButtonLabel() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_FINISH); + } + + public void setLocation(List location) + { + this.location = location; + } + + /** + * @return Breadcrumb location list + */ + public List getLocation() + { + if (this.location == null) + { + List loc = new ArrayList(8); + CategoriesDialog categoriesDialog = new CategoriesDialog(); + loc.add(categoriesDialog.new CategoryBreadcrumbHandler(null, Application.getMessage(FacesContext.getCurrentInstance(), MSG_CATEGORIES))); + + setLocation(loc); + } + return this.location; + } + + public String finishEdit() + { + String outcome = DEFAULT_OUTCOME; + + try + { + + // update the category node + NodeRef nodeRef = getActionCategory().getNodeRef(); + nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, getName()); + + // apply the titled aspect - for description + if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_TITLED) == false) + { + Map titledProps = new HashMap(1, 1.0f); + titledProps.put(ContentModel.PROP_DESCRIPTION, getDescription()); + nodeService.addAspect(nodeRef, ContentModel.ASPECT_TITLED, titledProps); + } + else + { + nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, getDescription()); + } + + // edit the node in the breadcrumb if required + List location = getLocation(); + IBreadcrumbHandler handler = location.get(location.size() - 1); + + // see if the current breadcrumb location is our node + if (nodeRef.equals(((IRepoBreadcrumbHandler) handler).getNodeRef())) + { + // and update with the modified node details + CategoriesDialog categoriesDialog = new CategoriesDialog(); + IBreadcrumbHandler newHandler = categoriesDialog.new CategoryBreadcrumbHandler(nodeRef, Repository.getNameForNode(nodeService, nodeRef)); + location.set(location.size() - 1, newHandler); + } + } + catch (Throwable err) + { + Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); + outcome = null; + } + + return outcome; + } +} diff --git a/source/java/org/alfresco/web/bean/coci/CCCheckinFileDialog.java b/source/java/org/alfresco/web/bean/coci/CCCheckinFileDialog.java new file mode 100644 index 0000000000..046a15e78b --- /dev/null +++ b/source/java/org/alfresco/web/bean/coci/CCCheckinFileDialog.java @@ -0,0 +1,36 @@ +package org.alfresco.web.bean.coci; + +import javax.faces.context.FacesContext; + +import org.alfresco.web.app.Application; + +public class CCCheckinFileDialog extends CheckinCheckoutDialog +{ + + private static final String MSG_CHECK_IN = "check_in"; + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return checkinFileOK(context, outcome); + } + + @Override + public String getFinishButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CHECK_IN); + } + + @Override + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CHECK_IN) + " '" + property.getDocument().getName() + "'"; + } + + @Override + public boolean getFinishButtonDisabled() + { + return false; + } + +} diff --git a/source/java/org/alfresco/web/bean/CCCheckoutFileDialog.java b/source/java/org/alfresco/web/bean/coci/CCCheckoutFileDialog.java similarity index 99% rename from source/java/org/alfresco/web/bean/CCCheckoutFileDialog.java rename to source/java/org/alfresco/web/bean/coci/CCCheckoutFileDialog.java index 316c29fa2e..ed80e9ca56 100644 --- a/source/java/org/alfresco/web/bean/CCCheckoutFileDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CCCheckoutFileDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/CCCheckoutFileLinkDialog.java b/source/java/org/alfresco/web/bean/coci/CCCheckoutFileLinkDialog.java similarity index 95% rename from source/java/org/alfresco/web/bean/CCCheckoutFileLinkDialog.java rename to source/java/org/alfresco/web/bean/coci/CCCheckoutFileLinkDialog.java index 3054392311..c2d7d7674f 100644 --- a/source/java/org/alfresco/web/bean/CCCheckoutFileLinkDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CCCheckoutFileLinkDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import javax.faces.context.FacesContext; @@ -62,6 +62,11 @@ public class CCCheckoutFileLinkDialog extends CheckinCheckoutDialog { return Application.getMessage(FacesContext.getCurrentInstance(), LBL_UNDO_CHECKOUT); } + + public String getFinishButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "ok"); + } @Override public String cancel() diff --git a/source/java/org/alfresco/web/bean/CCEditFileDialog.java b/source/java/org/alfresco/web/bean/coci/CCEditFileDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/CCEditFileDialog.java rename to source/java/org/alfresco/web/bean/coci/CCEditFileDialog.java index e4c41987a5..f2d96b1fcb 100644 --- a/source/java/org/alfresco/web/bean/CCEditFileDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CCEditFileDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/CCEditHtmlInlineDialog.java b/source/java/org/alfresco/web/bean/coci/CCEditHtmlInlineDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/CCEditHtmlInlineDialog.java rename to source/java/org/alfresco/web/bean/coci/CCEditHtmlInlineDialog.java index 7865b4778a..d7765a604a 100644 --- a/source/java/org/alfresco/web/bean/CCEditHtmlInlineDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CCEditHtmlInlineDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/CCEditTextInlineDialog.java b/source/java/org/alfresco/web/bean/coci/CCEditTextInlineDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/CCEditTextInlineDialog.java rename to source/java/org/alfresco/web/bean/coci/CCEditTextInlineDialog.java index 40bfffc03b..536dc9f9e7 100644 --- a/source/java/org/alfresco/web/bean/CCEditTextInlineDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CCEditTextInlineDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/CCProperties.java b/source/java/org/alfresco/web/bean/coci/CCProperties.java similarity index 98% rename from source/java/org/alfresco/web/bean/CCProperties.java rename to source/java/org/alfresco/web/bean/coci/CCProperties.java index b1073622a9..e9dd0e63ca 100644 --- a/source/java/org/alfresco/web/bean/CCProperties.java +++ b/source/java/org/alfresco/web/bean/coci/CCProperties.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import java.io.File; @@ -328,13 +328,13 @@ public class CCProperties */ public String getCopyLocation() { - if (this.getFileName() != null) + if (this.getFileName() == null || this.getFileName().length() == 0) { - return CCProperties.COPYLOCATION_OTHER; + return this.copyLocation; } else { - return this.copyLocation; + return CCProperties.COPYLOCATION_OTHER; } } diff --git a/source/java/org/alfresco/web/bean/CCUndoCheckoutFileDialog.java b/source/java/org/alfresco/web/bean/coci/CCUndoCheckoutFileDialog.java similarity index 99% rename from source/java/org/alfresco/web/bean/CCUndoCheckoutFileDialog.java rename to source/java/org/alfresco/web/bean/coci/CCUndoCheckoutFileDialog.java index 34bd9917ae..74664ec0e1 100644 --- a/source/java/org/alfresco/web/bean/CCUndoCheckoutFileDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CCUndoCheckoutFileDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/coci/CCUpdateFileDialog.java b/source/java/org/alfresco/web/bean/coci/CCUpdateFileDialog.java new file mode 100644 index 0000000000..76d1f60cf0 --- /dev/null +++ b/source/java/org/alfresco/web/bean/coci/CCUpdateFileDialog.java @@ -0,0 +1,34 @@ +package org.alfresco.web.bean.coci; + +import javax.faces.context.FacesContext; + +import org.alfresco.web.app.Application; + +public class CCUpdateFileDialog extends CheckinCheckoutDialog +{ + private final static String MSG_UPDATE = "update"; + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return updateFileOK(context, outcome); + } + + @Override + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_UPDATE) + " '" + property.getDocument().getName() + "'"; + } + + @Override + public boolean getFinishButtonDisabled() + { + return getFileName() == null; + } + + @Override + public String getFinishButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_UPDATE); + } +} diff --git a/source/java/org/alfresco/web/bean/CCWorkingCopyMissingDialog.java b/source/java/org/alfresco/web/bean/coci/CCWorkingCopyMissingDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/CCWorkingCopyMissingDialog.java rename to source/java/org/alfresco/web/bean/coci/CCWorkingCopyMissingDialog.java index 318cde3bcf..5c5ac27a40 100644 --- a/source/java/org/alfresco/web/bean/CCWorkingCopyMissingDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CCWorkingCopyMissingDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/CheckinCheckoutDialog.java b/source/java/org/alfresco/web/bean/coci/CheckinCheckoutDialog.java similarity index 90% rename from source/java/org/alfresco/web/bean/CheckinCheckoutDialog.java rename to source/java/org/alfresco/web/bean/coci/CheckinCheckoutDialog.java index 16b8ef211d..4429310ba7 100644 --- a/source/java/org/alfresco/web/bean/CheckinCheckoutDialog.java +++ b/source/java/org/alfresco/web/bean/coci/CheckinCheckoutDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.coci; import java.io.Serializable; import java.text.MessageFormat; @@ -51,10 +51,12 @@ import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.app.servlet.DownloadContentServlet; +import org.alfresco.web.bean.BrowseBean; +import org.alfresco.web.bean.FileUploadBean; +import org.alfresco.web.bean.NavigationBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; -import org.alfresco.web.forms.FormNotFoundException; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.UIActionLink; import org.apache.commons.logging.Log; @@ -76,6 +78,8 @@ public class CheckinCheckoutDialog extends BaseDialogBean public static final String MSG_ERROR_UPDATE = "error_update"; public static final String MSG_ERROR_CHECKOUT = "error_checkout"; + public static final String FILE = "file"; + protected CCProperties property; // ------------------------------------------------------------------------------ @@ -129,6 +133,21 @@ public class CheckinCheckoutDialog extends BaseDialogBean this.nodeService = nodeService; } + public boolean getFinishButtonDisabled() + { + return false; + } + + public String getFinishButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "check_in"); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "check_in") + " '" + this.property.getDocument().getName() + "'"; + } + /** * Determines whether the document being checked in has * the versionable aspect applied @@ -185,6 +204,33 @@ public class CheckinCheckoutDialog extends BaseDialogBean } } + /** + * Clear the uploaded form, clearing the specific Upload component by Id + */ + protected void clearUpload(final String id) + { + // remove the file upload bean from the session + final FacesContext ctx = FacesContext.getCurrentInstance(); + FileUploadBean fileBean = (FileUploadBean) + ctx.getExternalContext().getSessionMap().get(FileUploadBean.FILE_UPLOAD_BEAN_NAME); + if (fileBean != null) + { + fileBean.setFile(null); + fileBean.setFileName(null); + } + } + + /** + * Action handler called when the user wishes to remove an uploaded file + */ + public String removeUploadedFile() + { + this.clearUpload(CheckinCheckoutDialog.FILE); + property.setFileName(null) ; + property.setFile(null); + return null; + } + // ------------------------------------------------------------------------------ // Navigation action event handlers @@ -419,17 +465,15 @@ public class CheckinCheckoutDialog extends BaseDialogBean /** * Action called upon completion of the Check In file page */ - public String checkinFileOK() + public String checkinFileOK(final FacesContext context, String outcome) { - String outcome = null; // NOTE: for checkin the document node _is_ the working document! final Node node = property.getDocument(); - if (node != null && (property.getCopyLocation().equals(CCProperties.COPYLOCATION_CURRENT) || this.getFileName() != null)) + if (node != null && (property.getCopyLocation().equals(CCProperties.COPYLOCATION_CURRENT) || (this.getFileName() != null && !this.getFileName().equals("")))) { try { - final FacesContext context = FacesContext.getCurrentInstance(); RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(FacesContext.getCurrentInstance()); RetryingTransactionCallback callback = new RetryingTransactionCallback() { @@ -513,9 +557,8 @@ public class CheckinCheckoutDialog extends BaseDialogBean /** * Action called upon completion of the Update File page */ - public String updateFileOK() + public String updateFileOK(final FacesContext context, String outcome) { - String outcome = null; // NOTE: for update the document node _is_ the working document! final Node node = property.getDocument(); @@ -523,7 +566,6 @@ public class CheckinCheckoutDialog extends BaseDialogBean { try { - final FacesContext context = FacesContext.getCurrentInstance(); RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(FacesContext.getCurrentInstance()); RetryingTransactionCallback callback = new RetryingTransactionCallback() { @@ -582,7 +624,8 @@ public class CheckinCheckoutDialog extends BaseDialogBean @Override protected String finishImpl(FacesContext context, String outcome) throws Exception { - return outcome; + + return null; } /** diff --git a/source/java/org/alfresco/web/bean/content/AddContentDialog.java b/source/java/org/alfresco/web/bean/content/AddContentDialog.java index 833fff7c51..a0d10372c8 100644 --- a/source/java/org/alfresco/web/bean/content/AddContentDialog.java +++ b/source/java/org/alfresco/web/bean/content/AddContentDialog.java @@ -58,6 +58,8 @@ import org.alfresco.web.bean.repository.Repository; */ public class AddContentDialog extends BaseContentWizard { + private final static String MSG_OK = "ok"; + protected List inlineEditableMimeTypes; protected File file; @@ -138,7 +140,7 @@ public class AddContentDialog extends BaseContentWizard // as we are using this dialog outside the dialog framework // just go back to the main page - return "browse"; + return "dialog:close:browse"; } // ------------------------------------------------------------------------------ @@ -255,8 +257,7 @@ public class AddContentDialog extends BaseContentWizard public String cancel() { clearUpload(); - - return "cancel"; + return "dialog:close"; } // ------------------------------------------------------------------------------ @@ -305,4 +306,12 @@ public class AddContentDialog extends BaseContentWizard return this.inlineEditableMimeTypes; } + + @Override + public String getFinishButtonLabel() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_OK); + } + } diff --git a/source/java/org/alfresco/web/bean/DocumentDetailsBean.java b/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java similarity index 86% rename from source/java/org/alfresco/web/bean/DocumentDetailsBean.java rename to source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java index be140ae7b2..1487735a36 100644 --- a/source/java/org/alfresco/web/bean/DocumentDetailsBean.java +++ b/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.content; import java.io.Serializable; import java.text.MessageFormat; @@ -60,7 +60,9 @@ import org.alfresco.service.cmr.version.VersionService; import org.alfresco.service.namespace.QName; import org.alfresco.web.app.Application; import org.alfresco.web.app.servlet.DownloadContentServlet; -import org.alfresco.web.bean.ml.MultilingualUtils; +import org.alfresco.web.bean.BaseDetailsBean; +import org.alfresco.web.bean.dialog.NavigationSupport; +import org.alfresco.web.bean.ml.SingleEditionBean; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; @@ -73,9 +75,9 @@ import org.alfresco.web.ui.common.component.UIActionLink; * * @author gavinc */ -public class DocumentDetailsBean extends BaseDetailsBean +public class DocumentDetailsDialog extends BaseDetailsBean implements NavigationSupport { - private static final String OUTCOME_RETURN = "showDocDetails"; + private static final String OUTCOME_RETURN = null; private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories"; private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied"; @@ -84,6 +86,9 @@ public class DocumentDetailsBean extends BaseDetailsBean private static final String MSG_ERROR_ASPECT_INLINEEDITABLE = "error_aspect_inlineeditable"; private static final String MSG_ERROR_ASPECT_VERSIONING = "error_aspect_versioning"; private static final String MSG_ERROR_ASPECT_CLASSIFY = "error_aspect_classify"; + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; private static final String ML_VERSION_PANEL_ID = "ml-versions-panel"; @@ -97,13 +102,15 @@ public class DocumentDetailsBean extends BaseDetailsBean private Node translationDocument; + + // ------------------------------------------------------------------------------ // Construction /** * Default constructor */ - public DocumentDetailsBean() + public DocumentDetailsDialog() { super(); @@ -136,6 +143,14 @@ public class DocumentDetailsBean extends BaseDetailsBean return (String)getDocument().getProperties().get("url"); } + + + public Node getTranslationDocument() + { + return translationDocument; + } + + /** * Returns the URL to the content for the current document * @@ -276,49 +291,9 @@ public class DocumentDetailsBean extends BaseDetailsBean /** For the client side iteration on the edition hitories list, it represents the index of the list */ private int currentEditionCursorPosition; - /** - * For the client side iteration on the edition hitories list, returns the number of editions. - * - * @return the number of edition of the current mlContainer - */ - public int getEditionSize() - { - // return the size of the list - return editionHistory.size(); - } - /** - * Init the mlContainer histories and returns an empty list to fill a rich list value without content. - * - * @return an empty list - */ - public List getEmptyListAndInitEditions() - { - // this call ensures that the edition of the mlContainer must be - // re-initialized. - // remove each old mlContainer's translations of the panel list - List panelsToRemove = new ArrayList(); - for(Map.Entry panel : panels.entrySet()) - { - if(panel.getKey().startsWith(ML_VERSION_PANEL_ID)) - { - //panels.remove(panel.getKey()); - panelsToRemove.add(panel.getKey()); - } - } - for(String panelId : panelsToRemove) - { - panels.remove(panelId); - } - - // init the Edition histories - initEditionHistory(); - currentEditionCursorPosition = -1; - - return new ArrayList(0); - } /** * For the client side iteration on the edition hitories list, @@ -450,55 +425,7 @@ public class DocumentDetailsBean extends BaseDetailsBean return editionHistory; } - /** - * Returns a list of objects representing the translations of the current document - * - * @return List of translations - */ - public List getTranslations() - { - List translations = new ArrayList(); - - Node document = getDocument(); - - boolean canNewEdtion = MultilingualUtils.canStartNewEditon(document, FacesContext.getCurrentInstance()); - - if (document.hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT) || ContentModel.TYPE_MULTILINGUAL_CONTAINER.equals(document.getType())) - { - Map translationsMap = this.multilingualContentService.getTranslations(getDocument().getNodeRef()); - - if (translationsMap != null && translationsMap.size() > 0) - { - for (Map.Entry entry : translationsMap.entrySet()) - { - NodeRef nodeRef = (NodeRef) entry.getValue(); - - // create a map node representation of the translation - MapNode mapNode = new MapNode(nodeRef); - - Locale locale = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE); - - String lgge = (locale != null) ? - // convert the locale into new ISO codes - contentFilterLanguagesService.convertToNewISOCode(locale.getLanguage()).toUpperCase() - : null; - - mapNode.put("name", nodeService.getProperty(nodeRef, ContentModel.PROP_NAME)); - mapNode.put("language", lgge); - mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName())); - - mapNode.put("notEmpty", new Boolean(!nodeService.hasAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION))); - mapNode.put("userHasRight", new Boolean(canNewEdtion)); - // add the client side version to the list - translations.add(mapNode); - } - } - } - - return translations; - } - - + /** * Determines whether the current document has any categories applied * @@ -607,7 +534,7 @@ public class DocumentDetailsBean extends BaseDetailsBean getDocument().reset(); // get hold of the main property sheet on the page and remove the children to force a refresh - UIComponent comp = context.getViewRoot().findComponent("document-details:document-props"); + UIComponent comp = context.getViewRoot().findComponent("dialog:dialog-body:document-props"); if (comp != null) { comp.getChildren().clear(); @@ -899,15 +826,7 @@ public class DocumentDetailsBean extends BaseDetailsBean this.translationDocument = node; } - /** - * Restore the translationf from which the ml container - * details dialog comes. - */ - public void resetMLDocument(ActionEvent event) - { - this.browseBean.setupCommonBindingProperties(this.translationDocument); - this.browseBean.setDocument(this.translationDocument); - } + /** * Returns the ml container of the document this bean is currently representing @@ -982,4 +901,35 @@ public class DocumentDetailsBean extends BaseDetailsBean { this.editionService = editionService; } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + public String getContainerSubTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getDocument().getNodePath().toDisplayPath(nodeService, permissionService); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" + getName() + "'"; + } + + public String getCurrentItemId() + { + return getId(); + } + + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + + public String getOutcome() + { + return "dialog:close:dialog:showDocDetails"; + } } diff --git a/source/java/org/alfresco/web/bean/content/DocumentLinkDetailsDialog.java b/source/java/org/alfresco/web/bean/content/DocumentLinkDetailsDialog.java new file mode 100644 index 0000000000..0a4f1107bd --- /dev/null +++ b/source/java/org/alfresco/web/bean/content/DocumentLinkDetailsDialog.java @@ -0,0 +1,251 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.content; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.model.ApplicationModel; +import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BaseDetailsBean; +import org.alfresco.web.bean.dialog.NavigationSupport; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.ui.common.Utils; +import org.alfresco.web.ui.common.Utils.URLMode; +import org.alfresco.web.ui.common.component.UIActionLink; + +public class DocumentLinkDetailsDialog extends BaseDetailsBean implements NavigationSupport +{ + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; + + /** + * Returns the document this bean is currently representing + * + * @return The document Node + */ + public Node getDocument() + { + return this.getNode(); + } + + @Override + protected Node getLinkResolvedNode() + { + Node document = getDocument(); + if (ApplicationModel.TYPE_FILELINK.equals(document.getType())) + { + NodeRef destRef = (NodeRef)document.getProperties().get(ContentModel.PROP_LINK_DESTINATION); + if (nodeService.exists(destRef)) + { + document = new Node(destRef); + } + } + return document; + } + + @Override + public Node getNode() + { + return this.browseBean.getDocument(); + } + + @Override + protected String getPropertiesPanelId() + { + return "document-props"; + } + + @Override + public Map getTemplateModel() + { + Map model = new HashMap(2, 1.0f); + + model.put("document", getDocument().getNodeRef()); + model.put("space", this.navigator.getCurrentNode().getNodeRef()); + model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver); + + return model; + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:showDocDetails"; + } + + public void nextItem(ActionEvent event) + { + UIActionLink link = (UIActionLink)event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + List nodes = this.browseBean.getContent(); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i=0; i params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + List nodes = this.browseBean.getContent(); + if (nodes.size() > 1) + { + // see above + for (int i=0; i contentPermissions = null; diff --git a/source/java/org/alfresco/web/bean/VersionedDocumentDetailsBean.java b/source/java/org/alfresco/web/bean/content/VersionedDocumentDetailsDialog.java similarity index 96% rename from source/java/org/alfresco/web/bean/VersionedDocumentDetailsBean.java rename to source/java/org/alfresco/web/bean/content/VersionedDocumentDetailsDialog.java index cb4d98b513..e60427201a 100644 --- a/source/java/org/alfresco/web/bean/VersionedDocumentDetailsBean.java +++ b/source/java/org/alfresco/web/bean/content/VersionedDocumentDetailsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.content; import java.io.Serializable; import java.text.MessageFormat; @@ -64,7 +64,7 @@ import org.alfresco.web.ui.common.component.UIActionLink; * * @author Yanick Pignot */ -public class VersionedDocumentDetailsBean +public class VersionedDocumentDetailsDialog { /** Dependencies */ protected VersionService versionService; @@ -421,7 +421,7 @@ public class VersionedDocumentDetailsBean */ public String getOutcome() { - return (this.fromPreviousEditon) ? "showMLContainerDetails" : "showDocDetails"; + return (this.fromPreviousEditon) ? "dialog:showMLContainerDetails" : "dialog:showDocDetails"; } /** diff --git a/source/java/org/alfresco/web/bean/dashboard/GettingStartedBean.java b/source/java/org/alfresco/web/bean/dashboard/GettingStartedBean.java index 4599923211..2798ea9847 100644 --- a/source/java/org/alfresco/web/bean/dashboard/GettingStartedBean.java +++ b/source/java/org/alfresco/web/bean/dashboard/GettingStartedBean.java @@ -68,7 +68,7 @@ public class GettingStartedBean public String addContent() { this.navigationBean.setCurrentNodeId(getHomeSpaceId()); - return "addContent"; + return "dialog:addContent"; } private String getHomeSpaceId() diff --git a/source/java/org/alfresco/web/bean/dialog/NavigationSupport.java b/source/java/org/alfresco/web/bean/dialog/NavigationSupport.java index e95b524a4f..767381dd08 100644 --- a/source/java/org/alfresco/web/bean/dialog/NavigationSupport.java +++ b/source/java/org/alfresco/web/bean/dialog/NavigationSupport.java @@ -39,4 +39,6 @@ public interface NavigationSupport public void nextItem(ActionEvent event); public void previousItem(ActionEvent event); + + public String getOutcome(); } diff --git a/source/java/org/alfresco/web/bean/forums/ForumDetailsDialog.java b/source/java/org/alfresco/web/bean/forums/ForumDetailsDialog.java new file mode 100644 index 0000000000..0cf8897024 --- /dev/null +++ b/source/java/org/alfresco/web/bean/forums/ForumDetailsDialog.java @@ -0,0 +1,245 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.forums; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.model.ApplicationModel; +import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BaseDetailsBean; +import org.alfresco.web.bean.dialog.NavigationSupport; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.component.UIActionLink; + +public class ForumDetailsDialog extends BaseDetailsBean implements NavigationSupport +{ + + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; + + /** + * Returns the Space this bean is currently representing + * + * @return The Space Node + */ + public Node getSpace() + { + return getNode(); + } + + @Override + protected Node getLinkResolvedNode() + { + Node space = getSpace(); + if (ApplicationModel.TYPE_FOLDERLINK.equals(space.getType())) + { + NodeRef destRef = (NodeRef) space.getProperties().get(ContentModel.PROP_LINK_DESTINATION); + if (nodeService.exists(destRef)) + { + space = new Node(destRef); + } + } + return space; + } + + @Override + public Node getNode() + { + return this.browseBean.getActionSpace(); + } + + @Override + protected String getPropertiesPanelId() + { + return "space-props"; + } + + @Override + public Map getTemplateModel() + { + HashMap model = new HashMap(1, 1.0f); + + model.put("space", getSpace().getNodeRef()); + model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver); + + return model; + + } + + /** + * Action handler to clear the current Space properties before returning to the browse screen, as the user may have modified the properties! + */ + public String cancel() + { + this.navigator.resetCurrentNodeProperties(); + return super.cancel(); + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:showSpaceDetails"; + } + + public void nextItem(ActionEvent event) + { + boolean foundNextItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node next; + // found our item - navigate to next + if (i != nodes.size() - 1) + { + next = nodes.get(i + 1); + } + else + { + // handle wrapping case + next = nodes.get(0); + } + + // prepare for showing details for this node + this.browseBean.setupSpaceAction(next.getId(), false); + + // we found a next item + foundNextItem = true; + } + } + } + + // if we did not find a next item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundNextItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public void previousItem(ActionEvent event) + { + boolean foundPreviousItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // see above + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node previous; + // found our item - navigate to previous + if (i != 0) + { + previous = nodes.get(i - 1); + } + else + { + // handle wrapping case + previous = nodes.get(nodes.size() - 1); + } + + // show details for this node + this.browseBean.setupSpaceAction(previous.getId(), false); + + // we found a next item + foundPreviousItem = true; + } + } + } + + // if we did not find a previous item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundPreviousItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + @Override + public String getContainerSubTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getSpace().getNodePath().toDisplayPath(nodeService, permissionService); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" + getName() + "'"; + } + +} diff --git a/source/java/org/alfresco/web/bean/forums/ForumsDetailsDialog.java b/source/java/org/alfresco/web/bean/forums/ForumsDetailsDialog.java new file mode 100644 index 0000000000..c91b4049f8 --- /dev/null +++ b/source/java/org/alfresco/web/bean/forums/ForumsDetailsDialog.java @@ -0,0 +1,245 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.forums; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.model.ApplicationModel; +import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BaseDetailsBean; +import org.alfresco.web.bean.dialog.NavigationSupport; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.component.UIActionLink; + +public class ForumsDetailsDialog extends BaseDetailsBean implements NavigationSupport +{ + + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; + + /** + * Returns the Space this bean is currently representing + * + * @return The Space Node + */ + public Node getSpace() + { + return getNode(); + } + + @Override + protected Node getLinkResolvedNode() + { + Node space = getSpace(); + if (ApplicationModel.TYPE_FOLDERLINK.equals(space.getType())) + { + NodeRef destRef = (NodeRef) space.getProperties().get(ContentModel.PROP_LINK_DESTINATION); + if (nodeService.exists(destRef)) + { + space = new Node(destRef); + } + } + return space; + } + + @Override + public Node getNode() + { + return this.browseBean.getActionSpace(); + } + + @Override + protected String getPropertiesPanelId() + { + return "space-props"; + } + + @Override + public Map getTemplateModel() + { + HashMap model = new HashMap(1, 1.0f); + + model.put("space", getSpace().getNodeRef()); + model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver); + + return model; + + } + + /** + * Action handler to clear the current Space properties before returning to the browse screen, as the user may have modified the properties! + */ + public String cancel() + { + this.navigator.resetCurrentNodeProperties(); + return super.cancel(); + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:showSpaceDetails"; + } + + public void nextItem(ActionEvent event) + { + boolean foundNextItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node next; + // found our item - navigate to next + if (i != nodes.size() - 1) + { + next = nodes.get(i + 1); + } + else + { + // handle wrapping case + next = nodes.get(0); + } + + // prepare for showing details for this node + this.browseBean.setupSpaceAction(next.getId(), false); + + // we found a next item + foundNextItem = true; + } + } + } + + // if we did not find a next item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundNextItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public void previousItem(ActionEvent event) + { + boolean foundPreviousItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // see above + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node previous; + // found our item - navigate to previous + if (i != 0) + { + previous = nodes.get(i - 1); + } + else + { + // handle wrapping case + previous = nodes.get(nodes.size() - 1); + } + + // show details for this node + this.browseBean.setupSpaceAction(previous.getId(), false); + + // we found a next item + foundPreviousItem = true; + } + } + } + + // if we did not find a previous item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundPreviousItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + @Override + public String getContainerSubTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getSpace().getNodePath().toDisplayPath(nodeService, permissionService); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" + getName() + "'"; + } + +} diff --git a/source/java/org/alfresco/web/bean/forums/TopicDetailsDialog.java b/source/java/org/alfresco/web/bean/forums/TopicDetailsDialog.java new file mode 100644 index 0000000000..4fdba43ead --- /dev/null +++ b/source/java/org/alfresco/web/bean/forums/TopicDetailsDialog.java @@ -0,0 +1,245 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.forums; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.model.ApplicationModel; +import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BaseDetailsBean; +import org.alfresco.web.bean.dialog.NavigationSupport; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.component.UIActionLink; + +public class TopicDetailsDialog extends BaseDetailsBean implements NavigationSupport +{ + + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; + + /** + * Returns the Space this bean is currently representing + * + * @return The Space Node + */ + public Node getSpace() + { + return getNode(); + } + + @Override + protected Node getLinkResolvedNode() + { + Node space = getSpace(); + if (ApplicationModel.TYPE_FOLDERLINK.equals(space.getType())) + { + NodeRef destRef = (NodeRef) space.getProperties().get(ContentModel.PROP_LINK_DESTINATION); + if (nodeService.exists(destRef)) + { + space = new Node(destRef); + } + } + return space; + } + + @Override + public Node getNode() + { + return this.browseBean.getActionSpace(); + } + + @Override + protected String getPropertiesPanelId() + { + return "space-props"; + } + + @Override + public Map getTemplateModel() + { + HashMap model = new HashMap(1, 1.0f); + + model.put("space", getSpace().getNodeRef()); + model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver); + + return model; + + } + + /** + * Action handler to clear the current Space properties before returning to the browse screen, as the user may have modified the properties! + */ + public String cancel() + { + this.navigator.resetCurrentNodeProperties(); + return super.cancel(); + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:showSpaceDetails"; + } + + public void nextItem(ActionEvent event) + { + boolean foundNextItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node next; + // found our item - navigate to next + if (i != nodes.size() - 1) + { + next = nodes.get(i + 1); + } + else + { + // handle wrapping case + next = nodes.get(0); + } + + // prepare for showing details for this node + this.browseBean.setupSpaceAction(next.getId(), false); + + // we found a next item + foundNextItem = true; + } + } + } + + // if we did not find a next item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundNextItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public void previousItem(ActionEvent event) + { + boolean foundPreviousItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // see above + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node previous; + // found our item - navigate to previous + if (i != 0) + { + previous = nodes.get(i - 1); + } + else + { + // handle wrapping case + previous = nodes.get(nodes.size() - 1); + } + + // show details for this node + this.browseBean.setupSpaceAction(previous.getId(), false); + + // we found a next item + foundPreviousItem = true; + } + } + } + + // if we did not find a previous item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundPreviousItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + @Override + public String getContainerSubTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getSpace().getNodePath().toDisplayPath(nodeService, permissionService); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" + getName() + "'"; + } + +} diff --git a/source/java/org/alfresco/web/bean/generator/LanguageSelectorGenerator.java b/source/java/org/alfresco/web/bean/generator/LanguageSelectorGenerator.java index 545efa4d4f..3c4897750e 100644 --- a/source/java/org/alfresco/web/bean/generator/LanguageSelectorGenerator.java +++ b/source/java/org/alfresco/web/bean/generator/LanguageSelectorGenerator.java @@ -32,7 +32,7 @@ import javax.faces.model.SelectItem; import org.alfresco.service.cmr.dictionary.PropertyDefinition; import org.alfresco.web.app.servlet.FacesHelper; -import org.alfresco.web.bean.UserPreferencesBean; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.ui.repo.component.property.PropertySheetItem; import org.alfresco.web.ui.repo.component.property.UIPropertySheet; diff --git a/source/java/org/alfresco/web/bean/ml/AddTranslationDialog.java b/source/java/org/alfresco/web/bean/ml/AddTranslationDialog.java index 2f6cca34c1..ae84c3e7c6 100644 --- a/source/java/org/alfresco/web/bean/ml/AddTranslationDialog.java +++ b/source/java/org/alfresco/web/bean/ml/AddTranslationDialog.java @@ -32,7 +32,8 @@ import javax.faces.model.SelectItem; import org.alfresco.i18n.I18NUtil; import org.alfresco.service.cmr.ml.MultilingualContentService; import org.alfresco.service.cmr.repository.NodeRef; -import org.alfresco.web.bean.UserPreferencesBean; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.bean.content.AddContentDialog; /** @@ -42,6 +43,8 @@ import org.alfresco.web.bean.content.AddContentDialog; */ public class AddTranslationDialog extends AddContentDialog { + private static final String MSG_OK = "ok"; + private MultilingualContentService multilingualContentService; private UserPreferencesBean userPreferencesBean; @@ -81,7 +84,7 @@ public class AddTranslationDialog extends AddContentDialog // add a new translation multilingualContentService.addTranslation(this.createdNode, this.mlTranslation, I18NUtil.parseLocale(this.language)); - return "browse"; + return "dialog:close:browse"; } @Override @@ -92,7 +95,7 @@ public class AddTranslationDialog extends AddContentDialog return getDefaultFinishOutcome(); } - public boolean finishButtonDisabled() + public boolean getFinishButtonDisabled() { return author == null || author.length() < 1 || language == null; } @@ -156,4 +159,11 @@ public class AddTranslationDialog extends AddContentDialog { this.userPreferencesBean = userPreferencesBean; } + + @Override + public String getFinishButtonLabel() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_OK); + } } diff --git a/source/java/org/alfresco/web/bean/ml/AddTranslationWithoutContentDialog.java b/source/java/org/alfresco/web/bean/ml/AddTranslationWithoutContentDialog.java index 5f225d2bef..5b44871efb 100644 --- a/source/java/org/alfresco/web/bean/ml/AddTranslationWithoutContentDialog.java +++ b/source/java/org/alfresco/web/bean/ml/AddTranslationWithoutContentDialog.java @@ -34,7 +34,7 @@ import org.alfresco.i18n.I18NUtil; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.ml.MultilingualContentService; import org.alfresco.service.cmr.repository.NodeRef; -import org.alfresco.web.bean.UserPreferencesBean; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; diff --git a/source/java/org/alfresco/web/bean/ml/MakeMultilingualDialog.java b/source/java/org/alfresco/web/bean/ml/MakeMultilingualDialog.java index ddc96be379..5300784ca5 100644 --- a/source/java/org/alfresco/web/bean/ml/MakeMultilingualDialog.java +++ b/source/java/org/alfresco/web/bean/ml/MakeMultilingualDialog.java @@ -35,7 +35,7 @@ import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.ml.MultilingualContentService; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.servlet.FacesHelper; -import org.alfresco.web.bean.UserPreferencesBean; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; @@ -161,7 +161,7 @@ public class MakeMultilingualDialog extends BaseDialogBean { AddTranslationDialog dialog = (AddTranslationDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddTranslationDialog"); dialog.start(null); - return "addTranslation"; + return "dialog:addTranslation"; } } diff --git a/source/java/org/alfresco/web/bean/ml/MultilingualManageDialog.java b/source/java/org/alfresco/web/bean/ml/MultilingualManageDialog.java index 2a497049b6..210e762f8b 100644 --- a/source/java/org/alfresco/web/bean/ml/MultilingualManageDialog.java +++ b/source/java/org/alfresco/web/bean/ml/MultilingualManageDialog.java @@ -24,21 +24,131 @@ */ package org.alfresco.web.bean.ml; +import java.io.Serializable; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Locale; +import java.util.Map; import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; +import org.alfresco.model.ContentModel; +import org.alfresco.repo.version.common.VersionLabelComparator; +import org.alfresco.service.cmr.ml.ContentFilterLanguagesService; +import org.alfresco.service.cmr.ml.EditionService; +import org.alfresco.service.cmr.ml.MultilingualContentService; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.version.Version; +import org.alfresco.service.cmr.version.VersionHistory; +import org.alfresco.service.cmr.version.VersionService; +import org.alfresco.service.namespace.QName; import org.alfresco.web.app.Application; -import org.alfresco.web.bean.DocumentDetailsBean; +import org.alfresco.web.app.servlet.DownloadContentServlet; import org.alfresco.web.bean.dialog.BaseDialogBean; -import org.alfresco.web.config.DialogsConfigElement.DialogButtonConfig; +import org.alfresco.web.bean.repository.MapNode; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.Utils; +import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent; public class MultilingualManageDialog extends BaseDialogBean { private final String MSG_MANAGE_DETAILS_FOR="manage_multilingual_details_for"; + private static final String MSG_CURRENT = "current"; + private static final String ML_VERSION_PANEL_ID = "ml-versions-panel"; + private static final String MSG_CLOSE = "close"; - //TODO: load the bean - private DocumentDetailsBean docDetails; + protected Map panels = new HashMap(4, 1.0f); + + protected MultilingualContentService multilingualContentService; + protected ContentFilterLanguagesService contentFilterLanguagesService; + protected EditionService editionService; + protected VersionService versionService; + + private Node translationDocument; + + /** For the client side iteration on the edition hitories list, it represents the index of the list */ + private int currentEditionCursorPosition; + + /** List of client light weight edition histories */ + private List editionHistory = null; + + /** + * Returns the document this bean is currently representing + * + * @return The document Node + */ + public Node getDocument() + { + return this.getNode(); + } + + /** + * Returns the Node this bean is currently representing + * + * @return The Node + */ + public Node getNode() + { + return this.browseBean.getDocument(); + } + + /** + * @param multilingualContentService the multilingual ContentService to set + */ + public void setMultilingualContentService(MultilingualContentService multilingualContentService) + { + this.multilingualContentService = multilingualContentService; + } + + /** + * @param contentFilterLanguagesService The Content Filter Languages Service to set. + */ + public void setContentFilterLanguagesService(ContentFilterLanguagesService contentFilterLanguagesService) + { + this.contentFilterLanguagesService = contentFilterLanguagesService; + } + + /** + * @param EditionService The Edition Service to set. + */ + public void setEditionService(EditionService editionService) + { + this.editionService = editionService; + } + + /** + * Sets the version service instance the bean should use + * + * @param versionService The VersionService + */ + public void setVersionService(VersionService versionService) + { + this.versionService = versionService; + } + + /** + * Before opening the ml container details, remeber the translation + * from which the action comes. + * + * @param node + */ + public void setTranslationDocument(Node node) + { + this.translationDocument = node; + } + + /** + * @return Returns the panels expanded state map. + */ + public Map getPanels() + { + return this.panels; + } @Override protected String finishImpl(FacesContext context, String outcome) throws Exception @@ -50,15 +160,324 @@ public class MultilingualManageDialog extends BaseDialogBean @Override public String getContainerTitle() { - // TODO Auto-generated method stub - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_MANAGE_DETAILS_FOR) + " '" + docDetails.getName() + "'"; + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_MANAGE_DETAILS_FOR) + " '" + getDocument().getName() + "'"; } @Override - public List getAdditionalButtons() + public String getCancelButtonLabel() { - // TODO Auto-generated method stub - return super.getAdditionalButtons(); + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + + /** + * Returns a list of objects representing the translations of the current document + * + * @return List of translations + */ + public List getTranslations() + { + List translations = new ArrayList(); + + Node document = getDocument(); + + boolean canNewEdtion = MultilingualUtils.canStartNewEditon(document, FacesContext.getCurrentInstance()); + + if (document.hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT) || ContentModel.TYPE_MULTILINGUAL_CONTAINER.equals(document.getType())) + { + Map translationsMap = this.multilingualContentService.getTranslations(getDocument().getNodeRef()); + + if (translationsMap != null && translationsMap.size() > 0) + { + for (Map.Entry entry : translationsMap.entrySet()) + { + NodeRef nodeRef = (NodeRef) entry.getValue(); + + // create a map node representation of the translation + MapNode mapNode = new MapNode(nodeRef); + + Locale locale = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE); + + String lgge = (locale != null) ? + // convert the locale into new ISO codes + contentFilterLanguagesService.convertToNewISOCode(locale.getLanguage()).toUpperCase() + : null; + + mapNode.put("name", nodeService.getProperty(nodeRef, ContentModel.PROP_NAME)); + mapNode.put("language", lgge); + mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName())); + + mapNode.put("notEmpty", new Boolean(!nodeService.hasAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION))); + mapNode.put("userHasRight", new Boolean(canNewEdtion)); + // add the client side version to the list + translations.add(mapNode); + } + } + } + + return translations; } + /** + * Init the mlContainer histories and returns an empty list to fill a rich list value without content. + * + * @return an empty list + */ + public List getEmptyListAndInitEditions() + { + // this call ensures that the edition of the mlContainer must be + // re-initialized. + + // remove each old mlContainer's translations of the panel list + List panelsToRemove = new ArrayList(); + for(Map.Entry panel : panels.entrySet()) + { + if(panel.getKey().startsWith(ML_VERSION_PANEL_ID)) + { + //panels.remove(panel.getKey()); + panelsToRemove.add(panel.getKey()); + } + } + + for(String panelId : panelsToRemove) + { + panels.remove(panelId); + } + + // init the Edition histories + initEditionHistory(); + currentEditionCursorPosition = -1; + + return new ArrayList(0); + } + + /** + * For the client side iteration on the edition hitories list, returns the number of editions. + * + * @return the number of edition of the current mlContainer + */ + public int getEditionSize() + { + // return the size of the list + return editionHistory.size(); + } + + /** + * For the client side iteration on the edition hitories list, + * return the next edition history. + * + * @return a light weight representation of an edition history + */ + public SingleEditionBean getNextSingleEditionBean() + { + currentEditionCursorPosition++; + + return getCurrentSingleEditionBean(); + } + + /** + * For the client side iteration on the edition hitories list, + * return the current edition history. + * + * @return a light weight representation of an edition history + */ + public SingleEditionBean getCurrentSingleEditionBean() + { + if (currentEditionCursorPosition < getEditionSize()) + { + return editionHistory.get(currentEditionCursorPosition); + } + + return null; + } + + /** + * Restore the translationf from which the ml container + * details dialog comes. + */ + public void resetMLDocument(ActionEvent event) + { + this.browseBean.setupCommonBindingProperties(this.translationDocument); + this.browseBean.setDocument(this.translationDocument); + } + + /** + * Action handler to remove a custom view template from the current node + */ + public void removeTemplate(ActionEvent event) + { + try + { + // clear template property + this.nodeService.setProperty(getNode().getNodeRef(), ContentModel.PROP_TEMPLATE, null); + this.nodeService.removeAspect(getNode().getNodeRef(), ContentModel.ASPECT_TEMPLATABLE); + + // reset node details for next refresh of details page + getNode().reset(); + } + catch (Exception e) + { + Utils.addErrorMessage(MessageFormat.format(Application.getMessage( + FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e); + } + } + + /** + * Save the state of the panel that was expanded/collapsed + */ + public void expandPanel(ActionEvent event) + { + if (event instanceof ExpandedEvent) + { + String id = event.getComponent().getId(); + // we prefix some panels with "no-" which we remove to give consistent behaviour in the UI + if (id.startsWith("no-") == true) + { + id = id.substring(3); + } + this.panels.put(id, ((ExpandedEvent)event).State); + } + + String id = event.getComponent().getId(); + + if(id.startsWith(ML_VERSION_PANEL_ID)) + { + this.currentEditionCursorPosition = Integer.parseInt(id.substring("ml-versions-panel".length())) - 1; + } + } + + + /** + * Returns the ml container of the document this bean is currently representing + * + * @return The document multilingual container NodeRef + */ + public Node getDocumentMlContainer() + { + Node currentNode = getNode(); + + if(ContentModel.TYPE_MULTILINGUAL_CONTAINER.equals(currentNode.getType())) + { + return currentNode; + } + else + { + NodeRef nodeRef = getNode().getNodeRef(); + + return new Node(multilingualContentService.getTranslationContainer(nodeRef)); + } + } + + /** + * Constructs a list of objects representing the editions of the + * logical document + * + * @return List of editions + */ + @SuppressWarnings("unchecked") + private List initEditionHistory() + { + // get the mlContainer + NodeRef mlContainer = getDocumentMlContainer().getNodeRef(); + + // get all editions and sort them ascending according their version label + List orderedEditionList = new ArrayList(editionService.getEditions(mlContainer).getAllVersions()); + Collections.sort(orderedEditionList, new VersionLabelComparator()); + + // the list of Single Edition Bean to return + editionHistory = new ArrayList(orderedEditionList.size()); + + boolean firstEdition = true; + + // for each edition, init a SingleEditionBean + for (Version edition : orderedEditionList) + { + SingleEditionBean editionBean = new SingleEditionBean(); + + MapNode clientEdition = new MapNode(edition.getFrozenStateNodeRef()); + + String editionLabel = edition.getVersionLabel(); + if (firstEdition) + { + editionLabel += " (" + Application.getMessage(FacesContext.getCurrentInstance(), MSG_CURRENT) + ")"; + } + + clientEdition.put("editionLabel", editionLabel); + clientEdition.put("editionNotes", edition.getDescription()); + clientEdition.put("editionAuthor", edition.getCreator()); + clientEdition.put("editionDate", edition.getCreatedDate()); + + // Set the edition of the edition bean + editionBean.setEdition(clientEdition); + + // get translations + List translationHistories = null; + + if (firstEdition) + { + // Get the translations because the current edition doesn't content link with its + // translation in the version store. + Map translations = multilingualContentService.getTranslations(mlContainer); + translationHistories = new ArrayList(translations.size()); + for (NodeRef translation : translations.values()) + { + translationHistories.add(versionService.getVersionHistory(translation)); + } + } + else + { + translationHistories = editionService.getVersionedTranslations(edition); + } + + // add each translation in the SingleEditionBean + for (VersionHistory versionHistory : translationHistories) + { + // get the list of versions and sort them ascending according their version label + List orderedVersions = new ArrayList(versionHistory.getAllVersions()); + Collections.sort(orderedVersions, new VersionLabelComparator()); + + // the last version is the first version of the list + Version lastVersion = orderedVersions.get(0); + + // get the properties of the lastVersion + Map lastVersionProperties = editionService.getVersionedMetadatas(lastVersion); + Locale language = (Locale) lastVersionProperties.get(ContentModel.PROP_LOCALE); + + // create a map node representation of the last version + MapNode clientLastVersion = new MapNode(lastVersion.getFrozenStateNodeRef()); + + clientLastVersion.put("versionName", lastVersionProperties.get(ContentModel.PROP_NAME)); + // use the node service for the description to ensure that the returned value is a text and not a MLText + clientLastVersion.put("versionDescription", nodeService.getProperty(lastVersion.getFrozenStateNodeRef(), ContentModel.PROP_DESCRIPTION)); + clientLastVersion.put("versionAuthor", lastVersionProperties.get(ContentModel.PROP_AUTHOR)); + clientLastVersion.put("versionCreatedDate", lastVersionProperties.get(ContentModel.PROP_CREATED)); + clientLastVersion.put("versionModifiedDate", lastVersionProperties.get(ContentModel.PROP_MODIFIED)); + clientLastVersion.put("versionLanguage", this.contentFilterLanguagesService.convertToNewISOCode(language.getLanguage()).toUpperCase()); + + if(nodeService.hasAspect(lastVersion.getFrozenStateNodeRef(), ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION)) + { + clientLastVersion.put("versionUrl", null); + } + else + { + clientLastVersion.put("versionUrl", DownloadContentServlet.generateBrowserURL(lastVersion.getFrozenStateNodeRef(), clientLastVersion.getName())); + } + + // add a translation of the editionBean + editionBean.addTranslations(clientLastVersion); + } + editionHistory.add(editionBean); + firstEdition = false; + } + + return editionHistory; + } + @Override + protected String getDefaultCancelOutcome() + { + resetMLDocument(null); + return "dialog:close"; + } + } diff --git a/source/java/org/alfresco/web/bean/SingleEditionBean.java b/source/java/org/alfresco/web/bean/ml/SingleEditionBean.java similarity index 92% rename from source/java/org/alfresco/web/bean/SingleEditionBean.java rename to source/java/org/alfresco/web/bean/ml/SingleEditionBean.java index 9561baf98f..3272196d20 100644 --- a/source/java/org/alfresco/web/bean/SingleEditionBean.java +++ b/source/java/org/alfresco/web/bean/ml/SingleEditionBean.java @@ -1,4 +1,4 @@ -package org.alfresco.web.bean; +package org.alfresco.web.bean.ml; import java.util.ArrayList; import java.util.List; diff --git a/source/java/org/alfresco/web/bean/preview/BasePreviewBean.java b/source/java/org/alfresco/web/bean/preview/BasePreviewBean.java index de5d15407b..18df50eb48 100644 --- a/source/java/org/alfresco/web/bean/preview/BasePreviewBean.java +++ b/source/java/org/alfresco/web/bean/preview/BasePreviewBean.java @@ -45,6 +45,7 @@ import org.alfresco.web.app.Application; import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.NavigationBean; import org.alfresco.web.bean.TemplateSupportBean; +import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.data.IDataContainer; @@ -56,7 +57,7 @@ import org.alfresco.web.ui.common.Utils; * * @author Kevin Roast */ -public abstract class BasePreviewBean +public abstract class BasePreviewBean extends BaseDialogBean { /** BrowseBean instance */ protected BrowseBean browseBean; diff --git a/source/java/org/alfresco/web/bean/preview/DocumentPreviewBean.java b/source/java/org/alfresco/web/bean/preview/DocumentPreviewBean.java index b4ed9dd873..4fa179cc95 100644 --- a/source/java/org/alfresco/web/bean/preview/DocumentPreviewBean.java +++ b/source/java/org/alfresco/web/bean/preview/DocumentPreviewBean.java @@ -25,18 +25,30 @@ package org.alfresco.web.bean.preview; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.NavigationSupport; import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.component.UIActionLink; /** * Backing bean for the Preview Document in Template action page * * @author Kevin Roast */ -public class DocumentPreviewBean extends BasePreviewBean +public class DocumentPreviewBean extends BasePreviewBean implements NavigationSupport { + private final static String MSG_PREVIEW_OF = "preview_of"; + private final static String MSG_CLOSE = "close"; + /** * Returns the document this bean is currently representing * @@ -63,4 +75,105 @@ public class DocumentPreviewBean extends BasePreviewBean return model; } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:previewContent"; + } + + public void nextItem(ActionEvent event) + { + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + List nodes = this.browseBean.getContent(); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node next; + // found our item - navigate to next + if (i != nodes.size() - 1) + { + next = nodes.get(i + 1); + } + else + { + // handle wrapping case + next = nodes.get(0); + } + + // prepare for showing details for this node + this.browseBean.setupContentAction(next.getId(), false); + break; + } + } + } + } + } + + public void previousItem(ActionEvent event) + { + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + List nodes = this.browseBean.getContent(); + if (nodes.size() > 1) + { + // see above + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node previous; + // found our item - navigate to previous + if (i != 0) + { + previous = nodes.get(i - 1); + } + else + { + // handle wrapping case + previous = nodes.get(nodes.size() - 1); + } + + // prepare for showing details for this node + this.browseBean.setupContentAction(previous.getId(), false); + break; + } + } + } + } + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_PREVIEW_OF) + " '" + getName() + "'"; + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } } diff --git a/source/java/org/alfresco/web/bean/preview/SpacePreviewBean.java b/source/java/org/alfresco/web/bean/preview/SpacePreviewBean.java index b30069db55..16e32d3b5f 100644 --- a/source/java/org/alfresco/web/bean/preview/SpacePreviewBean.java +++ b/source/java/org/alfresco/web/bean/preview/SpacePreviewBean.java @@ -25,18 +25,29 @@ package org.alfresco.web.bean.preview; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.NavigationSupport; import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.component.UIActionLink; /** * Backing bean for the Preview Space in Template action page * * @author Kevin Roast */ -public class SpacePreviewBean extends BasePreviewBean +public class SpacePreviewBean extends BasePreviewBean implements NavigationSupport { + private final static String MSG_PREVIEW_OF = "preview_of"; + private final static String MSG_CLOSE = "close"; /** * Returns the Space this bean is currently representing * @@ -62,4 +73,133 @@ public class SpacePreviewBean extends BasePreviewBean return model; } + + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:previewSpace"; + } + + public void nextItem(ActionEvent event) + { + boolean foundNextItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node next; + // found our item - navigate to next + if (i != nodes.size() - 1) + { + next = nodes.get(i + 1); + } + else + { + // handle wrapping case + next = nodes.get(0); + } + + // prepare for showing details for this node + this.browseBean.setupSpaceAction(next.getId(), false); + + // we found a next item + foundNextItem = true; + } + } + } + + // if we did not find a next item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundNextItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public void previousItem(ActionEvent event) + { + boolean foundPreviousItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // see above + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node previous; + // found our item - navigate to previous + if (i != 0) + { + previous = nodes.get(i - 1); + } + else + { + // handle wrapping case + previous = nodes.get(nodes.size() - 1); + } + + // show details for this node + this.browseBean.setupSpaceAction(previous.getId(), false); + + // we found a next item + foundPreviousItem = true; + } + } + } + + // if we did not find a previous item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundPreviousItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_PREVIEW_OF) + " '" + getName() + "'"; + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + } diff --git a/source/java/org/alfresco/web/bean/rules/DeleteRuleDialog.java b/source/java/org/alfresco/web/bean/rules/DeleteRuleDialog.java new file mode 100644 index 0000000000..ac375dc564 --- /dev/null +++ b/source/java/org/alfresco/web/bean/rules/DeleteRuleDialog.java @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.rules; + +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.rule.Rule; +import org.alfresco.service.cmr.rule.RuleService; +import org.alfresco.util.ParameterCheck; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.BaseDialogBean; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.ui.common.Utils; +import org.alfresco.web.ui.common.component.UIActionLink; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class DeleteRuleDialog extends BaseDialogBean +{ + private static final String MSG_ERROR_DELETE_RULE = "error_delete_rule"; + private static final String MSG_DELETE_RULE = "delete_rule"; + private static final String MSG_YES = "yes"; + private static final String MSG_NO = "no"; + + private Rule currentRule; + protected RuleService ruleService; + private static Log logger = LogFactory.getLog(DeleteRuleDialog.class); + + @Override + public void init(Map parameters) + { + super.init(parameters); + + String nodeRef = parameters.get("nodeRef"); + + // make sure nodeRef was supplied + ParameterCheck.mandatoryString("nodeRef", nodeRef); + + if (logger.isDebugEnabled()) + logger.debug("Rule clicked, it's nodeRef is: " + nodeRef); + + this.currentRule = this.ruleService.getRule(new NodeRef(nodeRef)); + + } + + /** + * @param ruleService Sets the rule service to use + */ + public void setRuleService(RuleService ruleService) + { + this.ruleService = ruleService; + } + + /** + * Returns the current rule + * + * @return The current rule + */ + public Rule getCurrentRule() + { + return this.currentRule; + } + + /** + * @return The space to work against + */ + public Node getSpace() + { + return this.browseBean.getActionSpace(); + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + if (this.currentRule != null) + { + try + { + String ruleTitle = this.currentRule.getTitle(); + + this.ruleService.removeRule(getSpace().getNodeRef(), this.currentRule); + + // clear the current rule + this.currentRule = null; + + if (logger.isDebugEnabled()) + logger.debug("Deleted rule '" + ruleTitle + "'"); + } + catch (Throwable err) + { + Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), MSG_ERROR_DELETE_RULE) + err.getMessage(), err); + } + } + else + { + logger.warn("WARNING: deleteOK called without a current Rule!"); + } + + return outcome; + } + + @Override + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DELETE_RULE) + " '" + currentRule.getTitle() + "'"; + } + + @Override + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_NO); + } + + @Override + public boolean getFinishButtonDisabled() + { + return false; + } + + @Override + public String getFinishButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_YES); + } + +} diff --git a/source/java/org/alfresco/web/bean/rules/RulesDialog.java b/source/java/org/alfresco/web/bean/rules/RulesDialog.java index 63ae34d2eb..5b7ac9c808 100644 --- a/source/java/org/alfresco/web/bean/rules/RulesDialog.java +++ b/source/java/org/alfresco/web/bean/rules/RulesDialog.java @@ -49,10 +49,12 @@ import org.alfresco.web.app.context.IContextListener; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.dialog.BaseDialogBean; +import org.alfresco.web.bean.dialog.FilterViewSupport; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.UIActionLink; +import org.alfresco.web.ui.common.component.UIListItem; import org.alfresco.web.ui.common.component.UIModeList; import org.alfresco.web.ui.common.component.data.UIRichList; import org.apache.commons.logging.Log; @@ -63,48 +65,38 @@ import org.apache.commons.logging.LogFactory; * * @author gavinc */ -public class RulesDialog extends BaseDialogBean implements IContextListener +public class RulesDialog extends BaseDialogBean implements IContextListener, FilterViewSupport { - private static final String MSG_ERROR_DELETE_RULE = "error_delete_rule"; private static final String MSG_REAPPLY_RULES_SUCCESS = "reapply_rules_success"; private static final String MSG_IGNORE_INHERTIED_RULES = "ignore_inherited_rules"; private static final String MSG_INCLUDE_INHERITED_RULES = "include_inherited_rules"; private static final String LOCAL = "local"; private static final String INHERITED = "inherited"; + private final static String MSG_CLOSE = "close"; - private static final String MSG_DELETE_RULE = "delete_rule"; - private static final String MSG_YES = "yes"; - private static final String MSG_NO = "no"; + private static Log logger = LogFactory.getLog(RulesDialog.class); - private String viewMode = INHERITED; - protected BrowseBean browseBean; + private String filterModeMode = INHERITED; + protected RuleService ruleService; private List rules; private Rule currentRule; private UIRichList richList; private ActionService actionService; - private NodeService nodeService; + /** * Default constructor */ public RulesDialog() { + super(); UIContextService.getInstance(FacesContext.getCurrentInstance()).registerBean(this); } - /** - * Returns the current view mode the list of rules is in - * - * @return The current view mode - */ - public String getViewMode() - { - return this.viewMode; - } - + /** * @return The space to work against */ @@ -113,6 +105,16 @@ public class RulesDialog extends BaseDialogBean implements IContextListener return this.browseBean.getActionSpace(); } + /** + * Returns the current rule + * + * @return The current rule + */ + public Rule getCurrentRule() + { + return this.currentRule; + } + /** * Returns the list of rules to display * @@ -122,7 +124,7 @@ public class RulesDialog extends BaseDialogBean implements IContextListener { boolean includeInherited = true; - if (this.viewMode.equals(LOCAL)) + if (this.filterModeMode.equals(LOCAL)) { includeInherited = false; } @@ -187,7 +189,7 @@ public class RulesDialog extends BaseDialogBean implements IContextListener // Set the include inherited parameter to match the current filter value boolean executeInherited = true; - if (LOCAL.equals(this.getViewMode()) == true) + if (LOCAL.equals(this.getFilterMode()) == true) { executeInherited = false; } @@ -260,87 +262,24 @@ public class RulesDialog extends BaseDialogBean implements IContextListener } } - /** - * Returns the current rule - * - * @return The current rule - */ - public Rule getCurrentRule() - { - return this.currentRule; - } @Override protected String finishImpl(FacesContext context, String outcome) throws Exception { - if (this.currentRule != null) - { - try - { - String ruleTitle = this.currentRule.getTitle(); - - this.ruleService.removeRule(getSpace().getNodeRef(), - this.currentRule); - - // clear the current rule - this.currentRule = null; - - if (logger.isDebugEnabled()) - logger.debug("Deleted rule '" + ruleTitle + "'"); - } - catch (Throwable err) - { - Utils.addErrorMessage(Application.getMessage( - FacesContext.getCurrentInstance(), MSG_ERROR_DELETE_RULE) + err.getMessage(), err); - } - } - else - { - logger.warn("WARNING: deleteOK called without a current Rule!"); - } - - return outcome; + return null; } - @Override - public String getContainerTitle() + @Override + public void restored() { - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DELETE_RULE) + " '" + currentRule.getTitle() + "'"; + super.restored(); + contextUpdated(); } - @Override + @Override public String getCancelButtonLabel() { - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_NO); - } - - @Override - public boolean getFinishButtonDisabled() - { - return false; - } - - @Override - public String getFinishButtonLabel() - { - return Application.getMessage(FacesContext.getCurrentInstance(), MSG_YES); - } - - /** - * Change the current view mode based on user selection - * - * @param event ActionEvent - */ - public void viewModeChanged(ActionEvent event) - { - UIModeList viewList = (UIModeList)event.getComponent(); - this.viewMode = viewList.getValue().toString(); - - // force the list to be re-queried when the page is refreshed - if (this.richList != null) - { - this.richList.setValue(null); - } + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); } /** @@ -363,13 +302,6 @@ public class RulesDialog extends BaseDialogBean implements IContextListener return this.richList; } - /** - * @param browseBean The BrowseBean to set. - */ - public void setBrowseBean(BrowseBean browseBean) - { - this.browseBean = browseBean; - } /** * @param ruleService Sets the rule service to use @@ -389,15 +321,6 @@ public class RulesDialog extends BaseDialogBean implements IContextListener this.actionService = actionService; } - /** - * Set the node service to use - * - * @param nodeService the node service - */ - public void setNodeService(NodeService nodeService) - { - this.nodeService = nodeService; - } // ------------------------------------------------------------------------------ @@ -530,4 +453,49 @@ public class RulesDialog extends BaseDialogBean implements IContextListener return this.modifiedDate; } } + + public void filterModeChanged(ActionEvent event) + { + UIModeList viewList = (UIModeList)event.getComponent(); + this.filterModeMode = viewList.getValue().toString(); + + // force the list to be re-queried when the page is refreshed + if (this.richList != null) + { + this.richList.setValue(null); + } + } + + public List getFilterItems() + { + FacesContext context = FacesContext.getCurrentInstance(); + List items = new ArrayList(2); + + UIListItem item1 = new UIListItem(); + item1.setValue(INHERITED); + item1.setLabel(Application.getMessage(context, INHERITED)); + items.add(item1); + + UIListItem item2 = new UIListItem(); + item2.setValue(LOCAL); + item2.setLabel(Application.getMessage(context, LOCAL)); + items.add(item2); + + return items; + } + + public String getFilterMode() + { + return filterModeMode; + } + + public void setFilterMode(String filterMode) + { + this.filterModeMode = filterMode; + + // clear datalist cache ready to change results based on filter setting + contextUpdated(); + + } + } diff --git a/source/java/org/alfresco/web/bean/AdvancedSearchDialog.java b/source/java/org/alfresco/web/bean/search/AdvancedSearchDialog.java similarity index 97% rename from source/java/org/alfresco/web/bean/AdvancedSearchDialog.java rename to source/java/org/alfresco/web/bean/search/AdvancedSearchDialog.java index 2c944a07e2..a9144d8637 100644 --- a/source/java/org/alfresco/web/bean/AdvancedSearchDialog.java +++ b/source/java/org/alfresco/web/bean/search/AdvancedSearchDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.search; import java.io.Serializable; import java.text.MessageFormat; @@ -59,12 +59,12 @@ import org.alfresco.service.namespace.RegexQNamePattern; import org.alfresco.util.CachingDateFormat; import org.alfresco.util.ISO9075; import org.alfresco.web.app.Application; -import org.alfresco.web.bean.SearchContext.RangeProperties; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.User; +import org.alfresco.web.bean.search.SearchContext.RangeProperties; import org.alfresco.web.config.AdvancedSearchConfigElement; import org.alfresco.web.config.AdvancedSearchConfigElement.CustomProperty; import org.alfresco.web.data.IDataContainer; @@ -73,7 +73,6 @@ import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.UIModeList; import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent; import org.alfresco.web.ui.repo.component.UIAjaxCategoryPicker; -import org.alfresco.web.ui.repo.component.UICategorySelector; import org.alfresco.web.ui.repo.component.UISearchCustomProperties; /** diff --git a/source/java/org/alfresco/web/bean/EditSearchDialog.java b/source/java/org/alfresco/web/bean/search/EditSearchDialog.java similarity index 99% rename from source/java/org/alfresco/web/bean/EditSearchDialog.java rename to source/java/org/alfresco/web/bean/search/EditSearchDialog.java index 8f29ccdc88..c471c8d3ff 100644 --- a/source/java/org/alfresco/web/bean/EditSearchDialog.java +++ b/source/java/org/alfresco/web/bean/search/EditSearchDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.search; import java.io.Serializable; import java.text.MessageFormat; diff --git a/source/java/org/alfresco/web/bean/SaveSearchDialog.java b/source/java/org/alfresco/web/bean/search/SaveSearchDialog.java similarity index 99% rename from source/java/org/alfresco/web/bean/SaveSearchDialog.java rename to source/java/org/alfresco/web/bean/search/SaveSearchDialog.java index 5f7bdbdadc..c987b34fb2 100644 --- a/source/java/org/alfresco/web/bean/SaveSearchDialog.java +++ b/source/java/org/alfresco/web/bean/search/SaveSearchDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.search; import java.io.Serializable; import java.text.MessageFormat; diff --git a/source/java/org/alfresco/web/bean/SearchContext.java b/source/java/org/alfresco/web/bean/search/SearchContext.java similarity index 96% rename from source/java/org/alfresco/web/bean/SearchContext.java rename to source/java/org/alfresco/web/bean/search/SearchContext.java index cf219d474a..b9ce95617a 100644 --- a/source/java/org/alfresco/web/bean/SearchContext.java +++ b/source/java/org/alfresco/web/bean/search/SearchContext.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.search; import java.io.Serializable; import java.io.StringReader; @@ -566,7 +566,7 @@ public final class SearchContext implements Serializable * * @return the path */ - /*package*/ static String getPathFromSpaceRef(NodeRef ref, boolean children) + public static String getPathFromSpaceRef(NodeRef ref, boolean children) { FacesContext context = FacesContext.getCurrentInstance(); Path path = Repository.getServiceRegistry(context).getNodeService().getPath(ref); diff --git a/source/java/org/alfresco/web/bean/SearchProperties.java b/source/java/org/alfresco/web/bean/search/SearchProperties.java similarity index 99% rename from source/java/org/alfresco/web/bean/SearchProperties.java rename to source/java/org/alfresco/web/bean/search/SearchProperties.java index aae9ee46c9..a403458825 100644 --- a/source/java/org/alfresco/web/bean/SearchProperties.java +++ b/source/java/org/alfresco/web/bean/search/SearchProperties.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.search; import java.util.ArrayList; import java.util.Date; diff --git a/source/java/org/alfresco/web/bean/ApplyDocTemplateDialog.java b/source/java/org/alfresco/web/bean/spaces/ApplyDocTemplateDialog.java similarity index 97% rename from source/java/org/alfresco/web/bean/ApplyDocTemplateDialog.java rename to source/java/org/alfresco/web/bean/spaces/ApplyDocTemplateDialog.java index a82c95630d..9526e5a8c5 100644 --- a/source/java/org/alfresco/web/bean/ApplyDocTemplateDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/ApplyDocTemplateDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.spaces; import java.text.MessageFormat; @@ -31,6 +31,7 @@ import javax.faces.context.FacesContext; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.TemplateSupportBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; diff --git a/source/java/org/alfresco/web/bean/ApplyRssTemplateDialog.java b/source/java/org/alfresco/web/bean/spaces/ApplyRssTemplateDialog.java similarity index 97% rename from source/java/org/alfresco/web/bean/ApplyRssTemplateDialog.java rename to source/java/org/alfresco/web/bean/spaces/ApplyRssTemplateDialog.java index 37f3dff693..dcad73a9e4 100644 --- a/source/java/org/alfresco/web/bean/ApplyRssTemplateDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/ApplyRssTemplateDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.spaces; import java.text.MessageFormat; @@ -32,6 +32,7 @@ import javax.faces.event.ActionEvent; import org.alfresco.model.ApplicationModel; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.TemplateSupportBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; diff --git a/source/java/org/alfresco/web/bean/ApplySpaceTemplateDialog.java b/source/java/org/alfresco/web/bean/spaces/ApplySpaceTemplateDialog.java similarity index 97% rename from source/java/org/alfresco/web/bean/ApplySpaceTemplateDialog.java rename to source/java/org/alfresco/web/bean/spaces/ApplySpaceTemplateDialog.java index e4139165ed..6f71604b38 100644 --- a/source/java/org/alfresco/web/bean/ApplySpaceTemplateDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/ApplySpaceTemplateDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.spaces; import java.text.MessageFormat; @@ -32,6 +32,7 @@ import javax.faces.event.ActionEvent; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.TemplateSupportBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; diff --git a/source/java/org/alfresco/web/bean/EditSpaceSimpleWorkflowDialog.java b/source/java/org/alfresco/web/bean/spaces/EditSimpleWorkflowDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/EditSpaceSimpleWorkflowDialog.java rename to source/java/org/alfresco/web/bean/spaces/EditSimpleWorkflowDialog.java index f938b1ccbe..4aef3ccfa8 100644 --- a/source/java/org/alfresco/web/bean/EditSpaceSimpleWorkflowDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/EditSimpleWorkflowDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.spaces; import java.io.Serializable; import java.text.MessageFormat; @@ -43,7 +43,7 @@ import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; -public class EditSpaceSimpleWorkflowDialog extends BaseDialogBean +public class EditSimpleWorkflowDialog extends BaseDialogBean { protected Map workflowProperties; diff --git a/source/java/org/alfresco/web/bean/wizard/InviteSpaceUsersWizard.java b/source/java/org/alfresco/web/bean/spaces/InviteSpaceUsersWizard.java similarity index 92% rename from source/java/org/alfresco/web/bean/wizard/InviteSpaceUsersWizard.java rename to source/java/org/alfresco/web/bean/spaces/InviteSpaceUsersWizard.java index 178f850ab6..d6aebb9ce5 100644 --- a/source/java/org/alfresco/web/bean/wizard/InviteSpaceUsersWizard.java +++ b/source/java/org/alfresco/web/bean/spaces/InviteSpaceUsersWizard.java @@ -22,19 +22,20 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean.wizard; +package org.alfresco.web.bean.spaces; import java.util.Set; import org.alfresco.model.ContentModel; import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.wizard.BaseInviteUsersWizard; /** * Concrete implementation providing the ability to invite users to a space. * * @author gavinc */ -public class InviteSpaceUsersWizard extends InviteUsersWizard +public class InviteSpaceUsersWizard extends BaseInviteUsersWizard { /** Cache of available folder permissions */ Set folderPermissions = null; diff --git a/source/java/org/alfresco/web/bean/RecentSpacesBean.java b/source/java/org/alfresco/web/bean/spaces/RecentSpacesBean.java similarity index 95% rename from source/java/org/alfresco/web/bean/RecentSpacesBean.java rename to source/java/org/alfresco/web/bean/spaces/RecentSpacesBean.java index 498b279909..83f8a92c5b 100644 --- a/source/java/org/alfresco/web/bean/RecentSpacesBean.java +++ b/source/java/org/alfresco/web/bean/spaces/RecentSpacesBean.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.spaces; import java.text.MessageFormat; import java.util.LinkedList; @@ -36,6 +36,8 @@ import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.IContextListener; import org.alfresco.web.app.context.UIContextService; +import org.alfresco.web.bean.BrowseBean; +import org.alfresco.web.bean.NavigationBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.config.ClientConfigElement; diff --git a/source/java/org/alfresco/web/bean/SpaceDetailsBean.java b/source/java/org/alfresco/web/bean/spaces/SpaceDetailsDialog.java similarity index 89% rename from source/java/org/alfresco/web/bean/SpaceDetailsBean.java rename to source/java/org/alfresco/web/bean/spaces/SpaceDetailsDialog.java index 329eb870da..ca7d64af54 100644 --- a/source/java/org/alfresco/web/bean/SpaceDetailsBean.java +++ b/source/java/org/alfresco/web/bean/spaces/SpaceDetailsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.spaces; import java.text.MessageFormat; import java.util.Collection; @@ -38,9 +38,11 @@ import org.alfresco.model.ApplicationModel; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.TemplateService; -import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.Application; import org.alfresco.web.app.servlet.GuestTemplateContentServlet; +import org.alfresco.web.bean.BaseDetailsBean; +import org.alfresco.web.bean.TemplateSupportBean; +import org.alfresco.web.bean.dialog.NavigationSupport; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; @@ -52,11 +54,14 @@ import org.alfresco.web.ui.common.component.UIActionLink; * * @author Kevin Roast */ -public class SpaceDetailsBean extends BaseDetailsBean +public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSupport { private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories_space"; private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied_space"; private static final String MSG_ERROR_ASPECT_CLASSIFY = "error_aspect_classify_space"; + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; /** RSS Template ID */ private String rssTemplate; @@ -67,7 +72,7 @@ public class SpaceDetailsBean extends BaseDetailsBean /** * Default constructor */ - public SpaceDetailsBean() + public SpaceDetailsDialog() { super(); @@ -268,10 +273,10 @@ public class SpaceDetailsBean extends BaseDetailsBean * Action handler to clear the current Space properties before returning to the browse screen, * as the user may have modified the properties! */ - public String closeDialog() + public String cancel() { this.navigator.resetCurrentNodeProperties(); - return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME; + return super.cancel(); } // ------------------------------------------------------------------------------ @@ -484,4 +489,37 @@ public class SpaceDetailsBean extends BaseDetailsBean FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e); } } + + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + @Override + public String getContainerSubTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getSpace().getNodePath().toDisplayPath(nodeService, permissionService); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" + getName() + "'"; + } + + public String getOutcome(){ + return "dialog:close:dialog:showSpaceDetails"; + } + } diff --git a/source/java/org/alfresco/web/bean/TrashcanDeleteAllItemsDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteAllItemsDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/TrashcanDeleteAllItemsDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteAllItemsDialog.java index f9e969f2d0..2844137ad7 100644 --- a/source/java/org/alfresco/web/bean/TrashcanDeleteAllItemsDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteAllItemsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.text.MessageFormat; diff --git a/source/java/org/alfresco/web/bean/TrashcanDeleteItemDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteItemDialog.java similarity index 97% rename from source/java/org/alfresco/web/bean/TrashcanDeleteItemDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteItemDialog.java index d20ba42ab0..d4d0771297 100644 --- a/source/java/org/alfresco/web/bean/TrashcanDeleteItemDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteItemDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.text.MessageFormat; @@ -68,7 +68,7 @@ public class TrashcanDeleteItemDialog extends TrashcanDialog protected String finishImpl(FacesContext context, String outcome) throws Exception { deleteItem(context, outcome); - return "dialog:goToTrashList"; + return "dialog:close"; } diff --git a/source/java/org/alfresco/web/bean/TrashcanDeleteListedItemsDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteListedItemsDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/TrashcanDeleteListedItemsDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteListedItemsDialog.java index faeadbdc61..9cc4f320c9 100644 --- a/source/java/org/alfresco/web/bean/TrashcanDeleteListedItemsDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanDeleteListedItemsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.text.MessageFormat; import java.util.ArrayList; diff --git a/source/java/org/alfresco/web/bean/TrashcanDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/TrashcanDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanDialog.java index 1fad861a7f..5c18e0197e 100644 --- a/source/java/org/alfresco/web/bean/TrashcanDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.text.MessageFormat; import java.text.SimpleDateFormat; @@ -53,6 +53,7 @@ import org.alfresco.util.CachingDateFormat; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.IContextListener; import org.alfresco.web.app.context.UIContextService; +import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; @@ -83,6 +84,7 @@ public class TrashcanDialog extends BaseDialogBean implements IContextListener private static final String MSG_RECOVERY_REASON = "recovery_report_reason"; private static final String MSG_LOCATION = "location"; private static final String MSG_NAME = "name"; + private final static String MSG_CLOSE = "close"; private static final String PROP_RECOVERSTATUS = "recoverstatus"; @@ -92,7 +94,7 @@ public class TrashcanDialog extends BaseDialogBean implements IContextListener private static final String FILTER_DATE_MONTH = "month"; private static final String FILTER_USER_USER = "user"; - private static final String OUTCOME_DIALOGCLOSE = "dialog:userConsole"; + private static final String OUTCOME_DIALOGCLOSE = "dialog:close"; private final static String NAME_ATTR = Repository.escapeQName(ContentModel.PROP_NAME); private final static String USER_ATTR = Repository.escapeQName(ContentModel.PROP_ARCHIVED_BY); @@ -815,4 +817,18 @@ public class TrashcanDialog extends BaseDialogBean implements IContextListener { // nothing to do } -} + + @Override + public String cancel() + { + close(); + return super.cancel(); + } + + @Override + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + +} \ No newline at end of file diff --git a/source/java/org/alfresco/web/bean/TrashcanDialogProperty.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanDialogProperty.java similarity index 99% rename from source/java/org/alfresco/web/bean/TrashcanDialogProperty.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanDialogProperty.java index ce6e9e6fe4..9c2dc4c56d 100644 --- a/source/java/org/alfresco/web/bean/TrashcanDialogProperty.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanDialogProperty.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.util.Collections; import java.util.List; diff --git a/source/java/org/alfresco/web/bean/TrashcanItemDetailsDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanItemDetailsDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/TrashcanItemDetailsDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanItemDetailsDialog.java index 434b360a05..612ab73243 100644 --- a/source/java/org/alfresco/web/bean/TrashcanItemDetailsDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanItemDetailsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import javax.faces.context.FacesContext; diff --git a/source/java/org/alfresco/web/bean/TrashcanRecoverAllItemsDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverAllItemsDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/TrashcanRecoverAllItemsDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverAllItemsDialog.java index f9d442f986..ff72797b5a 100644 --- a/source/java/org/alfresco/web/bean/TrashcanRecoverAllItemsDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverAllItemsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.util.List; diff --git a/source/java/org/alfresco/web/bean/TrashcanRecoverItemDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverItemDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/TrashcanRecoverItemDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverItemDialog.java index 8c9e6bcd47..7b4e7645ed 100644 --- a/source/java/org/alfresco/web/bean/TrashcanRecoverItemDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverItemDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.text.MessageFormat; @@ -118,7 +118,7 @@ public class TrashcanRecoverItemDialog extends TrashcanDialog } } - return "dialog:goToTrashList"; + return "dialog:close"; } @Override diff --git a/source/java/org/alfresco/web/bean/TrashcanRecoverListedItemsDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverListedItemsDialog.java similarity index 98% rename from source/java/org/alfresco/web/bean/TrashcanRecoverListedItemsDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverListedItemsDialog.java index bfb28784c1..f80b000d08 100644 --- a/source/java/org/alfresco/web/bean/TrashcanRecoverListedItemsDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoverListedItemsDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import java.util.ArrayList; import java.util.List; diff --git a/source/java/org/alfresco/web/bean/TrashcanRecoveryReportDialog.java b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoveryReportDialog.java similarity index 95% rename from source/java/org/alfresco/web/bean/TrashcanRecoveryReportDialog.java rename to source/java/org/alfresco/web/bean/trashcan/TrashcanRecoveryReportDialog.java index be7c35a58d..5154c91f45 100644 --- a/source/java/org/alfresco/web/bean/TrashcanRecoveryReportDialog.java +++ b/source/java/org/alfresco/web/bean/trashcan/TrashcanRecoveryReportDialog.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.trashcan; import javax.faces.context.FacesContext; @@ -48,7 +48,7 @@ public class TrashcanRecoveryReportDialog extends TrashcanDialog @Override protected String getDefaultCancelOutcome() { - return "dialog:goToTrashList"; + return "dialog:close[2]"; } } diff --git a/source/java/org/alfresco/web/bean/users/ContentUsersBean.java b/source/java/org/alfresco/web/bean/users/ContentUsersBean.java index 3c9c54c706..a9cdbce7fa 100644 --- a/source/java/org/alfresco/web/bean/users/ContentUsersBean.java +++ b/source/java/org/alfresco/web/bean/users/ContentUsersBean.java @@ -24,6 +24,11 @@ */ package org.alfresco.web.bean.users; +import java.text.MessageFormat; + +import javax.faces.context.FacesContext; + +import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; /** @@ -33,6 +38,10 @@ import org.alfresco.web.bean.repository.Node; */ public class ContentUsersBean extends UserMembersBean { + private final static String MSG_MANAGE_CONTENT_USERS = "manage_content_users"; + private final static String MSG_CONTENT_OWNER = "content_owner"; + private final static String MSG_CLOSE= "close"; + /** * @return The space to work against */ @@ -40,4 +49,35 @@ public class ContentUsersBean extends UserMembersBean { return this.browseBean.getDocument(); } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + @Override + public Object getActionsContext() + { + return getNode(); + } + + @Override + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_MANAGE_CONTENT_USERS) + " '" + browseBean.getDocument().getName() + "'"; + } + + @Override + public String getContainerSubTitle() + { + String pattern = Application.getMessage(FacesContext.getCurrentInstance(), MSG_CONTENT_OWNER); + return MessageFormat.format(pattern, getOwner()); + } + + @Override + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } } diff --git a/source/java/org/alfresco/web/bean/users/SpaceUsersBean.java b/source/java/org/alfresco/web/bean/users/SpaceUsersBean.java index b572486dd0..ca2637e2da 100644 --- a/source/java/org/alfresco/web/bean/users/SpaceUsersBean.java +++ b/source/java/org/alfresco/web/bean/users/SpaceUsersBean.java @@ -24,6 +24,11 @@ */ package org.alfresco.web.bean.users; +import java.text.MessageFormat; + +import javax.faces.context.FacesContext; + +import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; /** @@ -33,6 +38,10 @@ import org.alfresco.web.bean.repository.Node; */ public class SpaceUsersBean extends UserMembersBean { + private final static String MSG_MANAGE_INVITED_USERS = "manage_invited_users"; + private final static String MSG_SPACE_OWNER = "space_owner"; + private final static String MSG_CLOSE= "close"; + /** * @return The space to work against */ @@ -40,4 +49,35 @@ public class SpaceUsersBean extends UserMembersBean { return this.browseBean.getActionSpace(); } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + @Override + public Object getActionsContext() + { + return getNode(); + } + + @Override + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_MANAGE_INVITED_USERS) + " '" + browseBean.getActionSpace().getName() + "'"; + } + + @Override + public String getContainerSubTitle() + { + String pattern = Application.getMessage(FacesContext.getCurrentInstance(), MSG_SPACE_OWNER); + return MessageFormat.format(pattern, getOwner()); + } + + @Override + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } } diff --git a/source/java/org/alfresco/web/bean/users/UserMembersBean.java b/source/java/org/alfresco/web/bean/users/UserMembersBean.java index 8bec66076a..d777a498d5 100644 --- a/source/java/org/alfresco/web/bean/users/UserMembersBean.java +++ b/source/java/org/alfresco/web/bean/users/UserMembersBean.java @@ -59,6 +59,7 @@ import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.NavigationBean; +import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; @@ -70,7 +71,7 @@ import org.alfresco.web.ui.repo.WebResources; /** * @author Kevin Roast */ -public abstract class UserMembersBean implements IContextListener +public abstract class UserMembersBean extends BaseDialogBean implements IContextListener { private static final String MSG_SUCCESS_INHERIT_NOT = "success_not_inherit_permissions"; private static final String MSG_SUCCESS_INHERIT = "success_inherit_permissions"; @@ -458,9 +459,10 @@ public abstract class UserMembersBean implements IContextListener /** * Action called to Close the dialog */ - public void close(ActionEvent event) + public String cancel() { UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans(); + return super.cancel(); } /** diff --git a/source/java/org/alfresco/web/bean/UserPreferencesBean.java b/source/java/org/alfresco/web/bean/users/UserPreferencesBean.java similarity index 99% rename from source/java/org/alfresco/web/bean/UserPreferencesBean.java rename to source/java/org/alfresco/web/bean/users/UserPreferencesBean.java index 613f38de00..c79f57c34d 100644 --- a/source/java/org/alfresco/web/bean/UserPreferencesBean.java +++ b/source/java/org/alfresco/web/bean/users/UserPreferencesBean.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.users; import java.util.ArrayList; import java.util.List; @@ -42,6 +42,7 @@ import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.app.servlet.FacesHelper; +import org.alfresco.web.bean.NavigationBean; import org.alfresco.web.bean.repository.PreferencesService; import org.alfresco.web.config.LanguagesConfigElement; diff --git a/source/java/org/alfresco/web/bean/UserShortcutsBean.java b/source/java/org/alfresco/web/bean/users/UserShortcutsBean.java similarity index 97% rename from source/java/org/alfresco/web/bean/UserShortcutsBean.java rename to source/java/org/alfresco/web/bean/users/UserShortcutsBean.java index d6fa57a15d..af80bf149e 100644 --- a/source/java/org/alfresco/web/bean/UserShortcutsBean.java +++ b/source/java/org/alfresco/web/bean/users/UserShortcutsBean.java @@ -22,7 +22,7 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ -package org.alfresco.web.bean; +package org.alfresco.web.bean.users; import java.io.Serializable; import java.text.MessageFormat; @@ -43,6 +43,7 @@ import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.security.AccessStatus; import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.PreferencesService; import org.alfresco.web.bean.repository.Repository; diff --git a/source/java/org/alfresco/web/bean/users/UsersDialog.java b/source/java/org/alfresco/web/bean/users/UsersDialog.java index 91ccd2df1b..f3996a0b81 100644 --- a/source/java/org/alfresco/web/bean/users/UsersDialog.java +++ b/source/java/org/alfresco/web/bean/users/UsersDialog.java @@ -49,19 +49,22 @@ import org.alfresco.web.app.context.IContextListener; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.bean.LoginBean; import org.alfresco.web.bean.dialog.BaseDialogBean; +import org.alfresco.web.bean.dialog.ChangeViewSupport; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.NodePropertyResolver; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.UIActionLink; +import org.alfresco.web.ui.common.component.UIListItem; +import org.alfresco.web.ui.common.component.UIModeList; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author Kevin Roast */ -public class UsersDialog extends BaseDialogBean implements IContextListener +public class UsersDialog extends BaseDialogBean implements IContextListener, ChangeViewSupport { private static Log logger = LogFactory.getLog(UsersDialog.class); @@ -71,8 +74,14 @@ public class UsersDialog extends BaseDialogBean implements IContextListener private static final String ERROR_DELETE = "error_delete_user"; private static final String ERROR_USER_DELETE = "error_delete_user_object"; - private static final String DEFAULT_OUTCOME = "manageUsers"; + private static final String DEFAULT_OUTCOME = "dialog:manageUsers"; private static final String DIALOG_CLOSE = "dialog:close"; + + private static final String VIEW_DETAILS = "user_details"; + private static final String LABEL_VIEW_DETAILS = "user_details"; + + /** RichList view mode */ + protected String viewMode = VIEW_DETAILS; protected UsersBeanProperties properties; private List users = Collections.emptyList(); @@ -423,13 +432,58 @@ public class UsersDialog extends BaseDialogBean implements IContextListener return null; } - public String close() + @Override + public String cancel() { contextUpdated(); - return DIALOG_CLOSE; + return super.cancel(); } + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "close"); + } + + @Override + public Object getActionsContext() + { + return this; + } + + public List getViewItems() + { + FacesContext context = FacesContext.getCurrentInstance(); + List items = new ArrayList(1); + + UIListItem item1 = new UIListItem(); + item1.setValue(VIEW_DETAILS); + item1.setLabel(Application.getMessage(context, LABEL_VIEW_DETAILS)); + items.add(item1); + + return items; + } + + + public String getViewMode() + { + return this.viewMode; + } + + + public void setViewMode(String viewMode) + { + this.viewMode = viewMode; + } + + + public void viewModeChanged(ActionEvent event) + { + UIModeList viewList = (UIModeList)event.getComponent(); + + // update view mode from user selection + setViewMode(viewList.getValue().toString()); + } // ------------------------------------------------------------------------------ // IContextListener implementation diff --git a/source/java/org/alfresco/web/bean/wcm/AVMDetailsBean.java b/source/java/org/alfresco/web/bean/wcm/AVMDetailsBean.java index a0b559b81f..2076e1444e 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMDetailsBean.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMDetailsBean.java @@ -41,6 +41,8 @@ import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.repository.TemplateImageResolver; import org.alfresco.service.cmr.security.OwnableService; import org.alfresco.web.app.Application; +import org.alfresco.web.bean.dialog.BaseDialogBean; +import org.alfresco.web.bean.dialog.NavigationSupport; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; @@ -53,7 +55,7 @@ import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent; * * @author Kevin Roast */ -public abstract class AVMDetailsBean +public abstract class AVMDetailsBean extends BaseDialogBean implements NavigationSupport { /** NodeService bean reference */ protected NodeService nodeService; diff --git a/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java b/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java index 5d93807b46..65315745f7 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java @@ -42,6 +42,7 @@ import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.Application; import org.alfresco.web.app.servlet.DownloadContentServlet; import org.alfresco.web.bean.FileUploadBean; +import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.forms.Form; import org.alfresco.web.forms.FormInstanceData; @@ -63,13 +64,14 @@ import org.w3c.dom.Document; * @author Ariel Backenroth * @author Kevin Roast */ -public class AVMEditBean +public class AVMEditBean extends BaseDialogBean { private static final Log LOGGER = LogFactory.getLog(AVMEditBean.class); private static final String MSG_ERROR_UPDATE = "error_update"; private static final String MSG_UPLOAD_SUCCESS = "file_upload_success"; - + private static final String MSG_APPLY_RSS_FEED= "update"; + private static final String MSG_UPDATE = "update"; private File file = null; private String fileName = null; @@ -225,13 +227,13 @@ public class AVMEditBean private void resetState() { // clean up and clear action context - clearUpload(); + removeUploadedFile(); } /** * Clear form state and upload file bean */ - private void clearUpload() + public void removeUploadedFile() { // delete the temporary file we uploaded earlier if (this.file != null) @@ -263,4 +265,29 @@ public class AVMEditBean } } } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return updateFileOK(); + } + + @Override + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_APPLY_RSS_FEED) + " '" + getAvmNode().getName() + "'"; + } + + @Override + public boolean getFinishButtonDisabled() + { + return getFileName() == null; + } + + @Override + public String getFinishButtonLabel() + { + // TODO Auto-generated method stub + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_UPDATE); + } } diff --git a/source/java/org/alfresco/web/bean/wcm/AddAvmContentDialog.java b/source/java/org/alfresco/web/bean/wcm/AddAvmContentDialog.java index 4830e794c4..5ee42cff07 100644 --- a/source/java/org/alfresco/web/bean/wcm/AddAvmContentDialog.java +++ b/source/java/org/alfresco/web/bean/wcm/AddAvmContentDialog.java @@ -37,6 +37,7 @@ import org.alfresco.service.cmr.avm.AVMService; import org.alfresco.service.cmr.repository.ContentWriter; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; +import org.alfresco.web.app.Application; import org.alfresco.web.bean.content.AddContentDialog; /** @@ -46,6 +47,8 @@ import org.alfresco.web.bean.content.AddContentDialog; */ public class AddAvmContentDialog extends AddContentDialog { + private static final String MSG_OK = "ok"; + /** The AVMService bean reference */ protected AVMService avmService; @@ -147,6 +150,20 @@ public class AddAvmContentDialog extends AddContentDialog @Override protected String getDefaultFinishOutcome() { - return "cancel"; + return "dialog:close"; + } + + @Override + public String cancel() + { + super.cancel(); + return getDefaultCancelOutcome(); + } + + @Override + public String getFinishButtonLabel() + { + + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_OK); } } diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java index 0e0a08fe5a..da41845c8f 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java @@ -66,7 +66,7 @@ import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.wizard.BaseWizardBean; -import org.alfresco.web.bean.wizard.InviteUsersWizard.UserGroupRole; +import org.alfresco.web.bean.wizard.BaseInviteUsersWizard.UserGroupRole; import org.alfresco.web.forms.Form; import org.alfresco.web.forms.FormNotFoundException; import org.alfresco.web.forms.FormsService; diff --git a/source/java/org/alfresco/web/bean/wcm/FileDetailsBean.java b/source/java/org/alfresco/web/bean/wcm/FileDetailsBean.java index d6fc915159..28a8296ccd 100644 --- a/source/java/org/alfresco/web/bean/wcm/FileDetailsBean.java +++ b/source/java/org/alfresco/web/bean/wcm/FileDetailsBean.java @@ -228,4 +228,33 @@ public class FileDetailsBean extends AVMDetailsBean try { if (tx != null) {tx.rollback();} } catch (Exception tex) {} } } + + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + // TODO Auto-generated method stub + return null; + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "close"); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "details_of") + " '" + getName() + "'"; + } + + public String getCurrentItemId() + { + return getAvmNode().getId(); + } + + + public String getOutcome() + { + return "dialog:close:dialog:showFileDetails"; + } } diff --git a/source/java/org/alfresco/web/bean/wcm/FolderDetailsBean.java b/source/java/org/alfresco/web/bean/wcm/FolderDetailsBean.java index 20b4bc0e3e..92dbfdc37d 100644 --- a/source/java/org/alfresco/web/bean/wcm/FolderDetailsBean.java +++ b/source/java/org/alfresco/web/bean/wcm/FolderDetailsBean.java @@ -26,9 +26,10 @@ package org.alfresco.web.bean.wcm; import java.util.List; -import org.alfresco.web.app.servlet.DownloadContentServlet; +import javax.faces.context.FacesContext; + +import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; -import org.alfresco.web.ui.common.Utils; /** * Backing bean for Folder Details page. @@ -72,4 +73,31 @@ public class FolderDetailsBean extends AVMDetailsBean { return (List)this.avmBrowseBean.getFolders(); } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + // TODO Auto-generated method stub + return null; + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "close"); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), "details_of") + " '" + getName() + "'"; + } + + public String getCurrentItemId() + { + return getAvmNode().getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:showFolderDetails"; + } } diff --git a/source/java/org/alfresco/web/bean/wcm/ImportWebsiteDialog.java b/source/java/org/alfresco/web/bean/wcm/ImportWebsiteDialog.java index b9a8417e4c..1af373a3b5 100644 --- a/source/java/org/alfresco/web/bean/wcm/ImportWebsiteDialog.java +++ b/source/java/org/alfresco/web/bean/wcm/ImportWebsiteDialog.java @@ -61,6 +61,7 @@ import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.bean.FileUploadBean; +import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; import org.apache.commons.logging.Log; @@ -75,7 +76,7 @@ import org.apache.tools.zip.ZipFile; * * @author Kevin Roast */ -public class ImportWebsiteDialog +public class ImportWebsiteDialog extends BaseDialogBean { private static final int BUFFER_SIZE = 16384; private static Log logger = LogFactory.getLog(ImportWebsiteDialog.class); @@ -434,4 +435,10 @@ public class ImportWebsiteDialog } } } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } } diff --git a/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java b/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java index e6abd59786..9cdfcda89a 100644 --- a/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java @@ -44,7 +44,7 @@ import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.RegexQNamePattern; import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; -import org.alfresco.web.bean.wizard.InviteUsersWizard; +import org.alfresco.web.bean.wizard.BaseInviteUsersWizard; import org.alfresco.web.ui.common.Utils; /** @@ -52,7 +52,7 @@ import org.alfresco.web.ui.common.Utils; * * @author kevinr */ -public class InviteWebsiteUsersWizard extends InviteUsersWizard +public class InviteWebsiteUsersWizard extends BaseInviteUsersWizard { /** Cache of available folder permissions */ Set folderPermissions = null; @@ -82,7 +82,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard } /** - * @see org.alfresco.web.bean.wizard.InviteUsersWizard#init(java.util.Map) + * @see org.alfresco.web.bean.wizard.BaseInviteUsersWizard#init(java.util.Map) */ @Override public void init(Map parameters) @@ -105,7 +105,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard } /** - * @see org.alfresco.web.bean.wizard.InviteUsersWizard#finishImpl(javax.faces.context.FacesContext, java.lang.String) + * @see org.alfresco.web.bean.wizard.BaseInviteUsersWizard#finishImpl(javax.faces.context.FacesContext, java.lang.String) */ @Override protected String finishImpl(FacesContext context, String outcome) throws Exception diff --git a/source/java/org/alfresco/web/bean/wcm/WebSiteDetailsDialog.java b/source/java/org/alfresco/web/bean/wcm/WebSiteDetailsDialog.java new file mode 100644 index 0000000000..78cd578740 --- /dev/null +++ b/source/java/org/alfresco/web/bean/wcm/WebSiteDetailsDialog.java @@ -0,0 +1,243 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.bean.wcm; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.model.ApplicationModel; +import org.alfresco.model.ContentModel; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.TemplateService; +import org.alfresco.web.app.Application; +import org.alfresco.web.bean.BaseDetailsBean; +import org.alfresco.web.bean.dialog.NavigationSupport; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.ui.common.component.UIActionLink; + +public class WebSiteDetailsDialog extends BaseDetailsBean implements NavigationSupport +{ + + private static final String MSG_DETAILS_OF = "details_of"; + private static final String MSG_LOCATION = "location"; + private final static String MSG_CLOSE = "close"; + + + /** + * Returns the Space this bean is currently representing + * + * @return The Space Node + */ + public Node getSpace() + { + return getNode(); + } + + @Override + protected Node getLinkResolvedNode() + { + Node space = getSpace(); + if (ApplicationModel.TYPE_FOLDERLINK.equals(space.getType())) + { + NodeRef destRef = (NodeRef) space.getProperties().get(ContentModel.PROP_LINK_DESTINATION); + if (nodeService.exists(destRef)) + { + space = new Node(destRef); + } + } + return space; + } + + @Override + public Node getNode() + { + return this.browseBean.getActionSpace(); + } + + @Override + protected String getPropertiesPanelId() + { + return "space-props"; + } + + @Override + public Map getTemplateModel() + { + HashMap model = new HashMap(1, 1.0f); + + model.put("space", getSpace().getNodeRef()); + model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver); + + return model; + + } + + @Override + protected String finishImpl(FacesContext context, String outcome) throws Exception + { + return null; + } + + public String getCurrentItemId() + { + return getId(); + } + + public String getOutcome() + { + return "dialog:close:dialog:showSpaceDetails"; + } + + public void nextItem(ActionEvent event) + { + boolean foundNextItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // perform a linear search - this is slow but stateless + // otherwise we would have to manage state of last selected node + // this gets very tricky as this bean is instantiated once and never + // reset - it does not know when the document has changed etc. + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node next; + // found our item - navigate to next + if (i != nodes.size() - 1) + { + next = nodes.get(i + 1); + } + else + { + // handle wrapping case + next = nodes.get(0); + } + + // prepare for showing details for this node + this.browseBean.setupSpaceAction(next.getId(), false); + + // we found a next item + foundNextItem = true; + } + } + } + + // if we did not find a next item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundNextItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public void previousItem(ActionEvent event) + { + boolean foundPreviousItem = false; + UIActionLink link = (UIActionLink) event.getComponent(); + Map params = link.getParameterMap(); + String id = params.get("id"); + if (id != null && id.length() != 0) + { + NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id); + List nodes = this.browseBean.getParentNodes(currNodeRef); + if (nodes.size() > 1) + { + // see above + for (int i = 0; i < nodes.size(); i++) + { + if (id.equals(nodes.get(i).getId()) == true) + { + Node previous; + // found our item - navigate to previous + if (i != 0) + { + previous = nodes.get(i - 1); + } + else + { + // handle wrapping case + previous = nodes.get(nodes.size() - 1); + } + + // show details for this node + this.browseBean.setupSpaceAction(previous.getId(), false); + + // we found a next item + foundPreviousItem = true; + } + } + } + + // if we did not find a previous item make sure the current node is + // in the dispatch context otherwise the details screen will go back + // to the default one. + if (foundPreviousItem == false) + { + Node currNode = new Node(currNodeRef); + this.navigator.setupDispatchContext(currNode); + } + } + + } + + public String cancel() + { + this.navigator.resetCurrentNodeProperties(); + return super.cancel(); + } + + public String getCancelButtonLabel() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE); + } + + @Override + public String getContainerSubTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getSpace().getNodePath().toDisplayPath(nodeService, permissionService); + } + + public String getContainerTitle() + { + return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" + getName() + "'"; + } + +} diff --git a/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java b/source/java/org/alfresco/web/bean/wizard/BaseInviteUsersWizard.java similarity index 96% rename from source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java rename to source/java/org/alfresco/web/bean/wizard/BaseInviteUsersWizard.java index ba1a7df855..6e8c6d331c 100644 --- a/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java +++ b/source/java/org/alfresco/web/bean/wizard/BaseInviteUsersWizard.java @@ -64,7 +64,7 @@ import org.springframework.mail.javamail.JavaMailSender; * * @author Kevin Roast */ -public abstract class InviteUsersWizard extends BaseWizardBean +public abstract class BaseInviteUsersWizard extends BaseWizardBean { /** I18N message strings */ protected static final String MSG_USERROLES = "invite_users_summary"; diff --git a/source/java/org/alfresco/web/config/WebClientConfigTest.java b/source/java/org/alfresco/web/config/WebClientConfigTest.java index 6ff6814219..a27b073a4f 100644 --- a/source/java/org/alfresco/web/config/WebClientConfigTest.java +++ b/source/java/org/alfresco/web/config/WebClientConfigTest.java @@ -684,7 +684,7 @@ public class WebClientConfigTest extends BaseTest // make sure the info on the dialog is correct assertEquals("name", "spaceDetails", dialog.getName()); - assertEquals("page", "/jsp/dialog/space-details.jsp", dialog.getPage()); + assertEquals("page", "/jsp/spaces/space-details.jsp", dialog.getPage()); assertEquals("managed-bean", "SpaceDetailsDialog", dialog.getManagedBean()); assertEquals("icon", "/images/icons/create_space_large.gif", dialog.getIcon()); assertEquals("title", "Space Details Dialog", dialog.getTitle()); diff --git a/source/java/org/alfresco/web/ui/common/component/UploadInput.java b/source/java/org/alfresco/web/ui/common/component/UploadInput.java new file mode 100644 index 0000000000..2860c0e11e --- /dev/null +++ b/source/java/org/alfresco/web/ui/common/component/UploadInput.java @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ +package org.alfresco.web.ui.common.component; + +import java.io.IOException; + +import javax.faces.component.NamingContainer; +import javax.faces.component.UIInput; +import javax.faces.context.FacesContext; +import javax.faces.context.ResponseWriter; + +public class UploadInput extends UIInput implements NamingContainer +{ + private static final long serialVersionUID = 4064734856565167835L; + + private String framework; + + public void encodeBegin(FacesContext context) throws IOException + { + ResponseWriter writer = context.getResponseWriter(); + String path = context.getExternalContext().getRequestContextPath(); + + writer.write("\n"); + + writer.write("\n"); + + super.encodeBegin(context); + + writer.write("\n"); + } + + public Object saveState(FacesContext context) + { + Object[] values = new Object[2]; + values[0] = super.saveState(context); + values[1] = framework; + return values; + } + + public void restoreState(FacesContext context, Object state) + { + Object[] values = (Object[]) state; + super.restoreState(context, values[0]); + framework = (String) values[1]; + } + + public String getFramework() + { + return framework; + } + + public void setFramework(String framework) + { + this.framework = framework; + } +} diff --git a/source/java/org/alfresco/web/ui/common/tag/UploadInputTag.java b/source/java/org/alfresco/web/ui/common/tag/UploadInputTag.java new file mode 100644 index 0000000000..3604a848fd --- /dev/null +++ b/source/java/org/alfresco/web/ui/common/tag/UploadInputTag.java @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2005-2007 Alfresco Software Limited. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" + */ + +package org.alfresco.web.ui.common.tag; + +import javax.faces.component.UIComponent; + +import org.apache.myfaces.taglib.html.HtmlInputTextTag; + +public class UploadInputTag extends HtmlInputTextTag +{ + + public static String COMPONENT_TYPE = "org.alfresco.faces.UploadInput"; + + private String framework; + + @Override + public String getComponentType() + { + return UploadInputTag.COMPONENT_TYPE; + } + + /** + * @see javax.faces.webapp.UIComponentTag#getRendererType() + */ + public String getRendererType() + { + return "javax.faces.Text"; + } + + protected void setProperties(UIComponent component) + { + super.setProperties(component); + setStringProperty(component, "framework", this.framework); + setBooleanProperty(component, "immediate", "true"); + setStringProperty(component, "style", "display:none;"); + } + + public void release() + { + super.release(); + this.framework = null; + } + + public void setFramework(String framework) + { + this.framework = framework; + } +} diff --git a/source/java/org/alfresco/web/ui/repo/component/UICategoryBrowser.java b/source/java/org/alfresco/web/ui/repo/component/UICategoryBrowser.java index f0dd3308bf..c542f716e2 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UICategoryBrowser.java +++ b/source/java/org/alfresco/web/ui/repo/component/UICategoryBrowser.java @@ -41,7 +41,7 @@ import org.alfresco.web.app.Application; import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.bean.CategoryBrowserBean; import org.alfresco.web.bean.NavigationBean; -import org.alfresco.web.bean.SearchContext; +import org.alfresco.web.bean.search.SearchContext; import org.alfresco.web.bean.ajax.CategoryBrowserPluginBean; import org.alfresco.web.data.IDataContainer; import org.alfresco.web.data.QuickSort; diff --git a/source/java/org/alfresco/web/ui/repo/component/UILanguageSelector.java b/source/java/org/alfresco/web/ui/repo/component/UILanguageSelector.java index a37389608f..eea1b7b3d9 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UILanguageSelector.java +++ b/source/java/org/alfresco/web/ui/repo/component/UILanguageSelector.java @@ -34,7 +34,7 @@ import javax.faces.model.SelectItem; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.servlet.FacesHelper; -import org.alfresco.web.bean.UserPreferencesBean; +import org.alfresco.web.bean.users.UserPreferencesBean; import org.alfresco.web.bean.users.SpaceUsersBean; /** diff --git a/source/java/org/alfresco/web/ui/repo/component/UISimpleSearch.java b/source/java/org/alfresco/web/ui/repo/component/UISimpleSearch.java index 11c7bf4b45..d79cdafab6 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UISimpleSearch.java +++ b/source/java/org/alfresco/web/ui/repo/component/UISimpleSearch.java @@ -38,7 +38,7 @@ import javax.faces.event.ActionEvent; import javax.faces.event.FacesEvent; import org.alfresco.web.app.Application; -import org.alfresco.web.bean.SearchContext; +import org.alfresco.web.bean.search.SearchContext; import org.alfresco.web.ui.common.Utils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/source/test-resources/test-config-dialogs-wizards.xml b/source/test-resources/test-config-dialogs-wizards.xml index 1413b6f8f2..99f525875e 100644 --- a/source/test-resources/test-config-dialogs-wizards.xml +++ b/source/test-resources/test-config-dialogs-wizards.xml @@ -19,7 +19,7 @@ actions-menu-label-id="actions_menu_label" more-actions-config-id="more-actions" more-actions-menu-label-id="more_actions_menu_label" /> - session + + browseBean + #{BrowseBean} + + + nodeService + #{NodeService} + + + multilingualContentService + #{MultilingualContentService} + + + contentFilterLanguagesService + #{ContentFilterLanguagesService} + + + editionService + #{EditionService} + + + versionService + #{VersionService} + + + translationDocument + #{DocumentDetailsDialog.translationDocument} + @@ -445,7 +473,7 @@ The bean that manages the state for the Recent Spaces Shelf component. RecentSpacesBean - org.alfresco.web.bean.RecentSpacesBean + org.alfresco.web.bean.spaces.RecentSpacesBean session navigator @@ -462,7 +490,7 @@ The bean that manages the state for the User Shortcuts Shelf component. UserShortcutsBean - org.alfresco.web.bean.UserShortcutsBean + org.alfresco.web.bean.users.UserShortcutsBean session nodeService @@ -483,7 +511,7 @@ The bean that holds a state for the Advanced Search screen. SearchProperties - org.alfresco.web.bean.SearchProperties + org.alfresco.web.bean.search.SearchProperties session @@ -492,7 +520,7 @@ The bean that holds a state for the Advanced Search screen. AdvancedSearchDialog - org.alfresco.web.bean.AdvancedSearchDialog + org.alfresco.web.bean.search.AdvancedSearchDialog session navigator @@ -542,11 +570,11 @@ personService #{PersonService} - - - contentUsageService - #{ContentUsageService} - + + + contentUsageService + #{ContentUsageService} + @@ -601,15 +629,15 @@ The bean that holds state for the Category Management screens. CategoriesDialog - org.alfresco.web.bean.CategoriesDialog + org.alfresco.web.bean.categories.CategoriesDialog session nodeService #{NodeService} - properties - #{CategoriesProperties} + categoryService + #{CategoryService} @@ -647,7 +675,7 @@ namespaceService #{NamespaceService} - + @@ -721,52 +749,52 @@ dictionaryService #{DictionaryService} - - - formsService - #{FormsService} - - - - - The bean that backs up the Edit Content Wizard - - EditContentWizard - org.alfresco.web.bean.content.EditContentWizard - session - - nodeService - #{NodeService} - - - fileFolderService - #{FileFolderService} - - - searchService - #{SearchService} - - - navigator - #{NavigationBean} - - - browseBean - #{BrowseBean} - - - contentService - #{ContentService} - - - dictionaryService - #{DictionaryService} - - - formsService - #{FormsService} - + + formsService + #{FormsService} + + + + + + The bean that backs up the Edit Content Wizard + + EditContentWizard + org.alfresco.web.bean.content.EditContentWizard + session + + nodeService + #{NodeService} + + + fileFolderService + #{FileFolderService} + + + searchService + #{SearchService} + + + navigator + #{NavigationBean} + + + browseBean + #{BrowseBean} + + + contentService + #{ContentService} + + + dictionaryService + #{DictionaryService} + + + formsService + #{FormsService} + @@ -1181,7 +1209,7 @@ The bean that backs up the Invite Users Wizard InviteSpaceUsersWizard - org.alfresco.web.bean.wizard.InviteSpaceUsersWizard + org.alfresco.web.bean.spaces.InviteSpaceUsersWizard session nodeService @@ -1226,7 +1254,7 @@ The bean that backs up the Invite Content Users Wizard InviteContentUsersWizard - org.alfresco.web.bean.wizard.InviteContentUsersWizard + org.alfresco.web.bean.content.InviteContentUsersWizard session nodeService @@ -1271,7 +1299,7 @@ The bean that presents the Checkin and Checkout bean's properties. CCProperties - org.alfresco.web.bean.CCProperties + org.alfresco.web.bean.coci.CCProperties session versionOperationsService @@ -1290,7 +1318,7 @@ The bean that backs up the Checkin and Checkout pages. CheckinCheckoutDialog - org.alfresco.web.bean.CheckinCheckoutDialog + org.alfresco.web.bean.coci.CheckinCheckoutDialog session browseBean @@ -1309,7 +1337,20 @@ #{CCProperties} - + + + The bean for the Update File Screen. + CCUpdateFileDialog + + org.alfresco.web.bean.coci.CCUpdateFileDialog + + session + + property + #{CCProperties} + + + The bean that holds manage content rules state @@ -1333,14 +1374,39 @@ nodeService #{NodeService} + + navigator + #{NavigationBean} + + + + + + The bean that holds delete content rules state + + DeleteRuleDialog + org.alfresco.web.bean.rules.DeleteRuleDialog + session + + browseBean + #{BrowseBean} + + + ruleService + #{RuleService} + + + nodeService + #{NodeService} + Backing bean used by the document details dialog - DocumentDetailsBean - org.alfresco.web.bean.DocumentDetailsBean + DocumentDetailsDialog + org.alfresco.web.bean.content.DocumentDetailsDialog session browseBean @@ -1392,12 +1458,46 @@ + + + Backing bean used by the document details dialog + + DocumentLinkDetailsDialog + org.alfresco.web.bean.content.DocumentLinkDetailsDialog + session + + browseBean + #{BrowseBean} + + + nodeService + #{NodeService} + + + copyService + #{CopyService} + + + ownableService + #{OwnableService} + + + + navigator + #{NavigationBean} + + + permissionService + #{PermissionService} + + + Backing bean used by the Space details dialog - SpaceDetailsBean - org.alfresco.web.bean.SpaceDetailsBean + SpaceDetailsDialog + org.alfresco.web.bean.spaces.SpaceDetailsDialog session browseBean @@ -1429,6 +1529,140 @@ + + + Backing bean used by the SpaceLink details dialog + + SpaceLinkDetailsDialog + org.alfresco.web.bean.SpaceLinkDetailsDialog + session + + browseBean + #{BrowseBean} + + + navigator + #{NavigationBean} + + + nodeService + #{NodeService} + + + permissionService + #{PermissionService} + + + ownableService + #{OwnableService} + + + copyService + #{CopyService} + + + + + + Backing bean used by the forum details dialog + + ForumDetailsDialog + org.alfresco.web.bean.forums.ForumDetailsDialog + session + + browseBean + #{BrowseBean} + + + nodeService + #{NodeService} + + + copyService + #{CopyService} + + + ownableService + #{OwnableService} + + + + navigator + #{NavigationBean} + + + permissionService + #{PermissionService} + + + + + + Backing bean used by the forums details dialog + + ForumsDetailsDialog + org.alfresco.web.bean.forums.ForumsDetailsDialog + session + + browseBean + #{BrowseBean} + + + nodeService + #{NodeService} + + + copyService + #{CopyService} + + + ownableService + #{OwnableService} + + + navigator + #{NavigationBean} + + + permissionService + #{PermissionService} + + + + + + Backing bean used by the topic details dialog + + TopicDetailsDialog + org.alfresco.web.bean.forums.TopicDetailsDialog + session + + browseBean + #{BrowseBean} + + + nodeService + #{NodeService} + + + copyService + #{CopyService} + + + ownableService + #{OwnableService} + + + + navigator + #{NavigationBean} + + + permissionService + #{PermissionService} + + + Backing bean used by screens requiring access to lists of Templates @@ -1483,7 +1717,7 @@ Backing bean used for the Export dialog ExportDialog - org.alfresco.web.bean.ExportDialog + org.alfresco.web.bean.admin.ExportDialog session browseBean @@ -1502,7 +1736,7 @@ Backing bean used for the Import dialog ImportDialog - org.alfresco.web.bean.ImportBean + org.alfresco.web.bean.admin.ImportDialog session browseBean @@ -1532,7 +1766,7 @@ Backing bean used for the low-level Node Browser AdminNodeBrowseBean - org.alfresco.web.bean.AdminNodeBrowseBean + org.alfresco.web.bean.admin.AdminNodeBrowseBean session nodeService @@ -1998,7 +2232,7 @@ The bean that holds state for the Manage Deleted Items screen. TrashcanDialogProperty - org.alfresco.web.bean.TrashcanDialogProperty + org.alfresco.web.bean.trashcan.TrashcanDialogProperty session nodeArchiveService @@ -2011,7 +2245,7 @@ The bean that holds state for the Manage Deleted Items screen. TrashcanDialog - org.alfresco.web.bean.TrashcanDialog + org.alfresco.web.bean.trashcan.TrashcanDialog session nodeService @@ -2029,6 +2263,10 @@ property #{TrashcanDialogProperty} + + navigator + #{NavigationBean} + @@ -2483,7 +2721,7 @@ Backing bean used for the Web Client Config Admin Console ConfigAdminConsoleBean - org.alfresco.web.bean.ConfigAdminConsoleBean + org.alfresco.web.bean.admin.ConfigAdminConsoleBean session configAdminInterpreter @@ -2564,7 +2802,7 @@ The bean that backs up the User Preferences page UserPreferencesBean - org.alfresco.web.bean.UserPreferencesBean + org.alfresco.web.bean.users.UserPreferencesBean session multilingualContentService @@ -2589,105 +2827,105 @@ session - - - - - The bean that backs up the Create XML Content Type Wizard - - CreateFormWizard - org.alfresco.web.bean.wcm.CreateFormWizard - session - - nodeService - #{NodeService} - - - fileFolderService - #{FileFolderService} - - - searchService - #{SearchService} - - - namespaceService - #{NamespaceService} - - - navigator - #{NavigationBean} - - - browseBean - #{BrowseBean} - - - contentService - #{ContentService} - - - mimetypeService - #{MimetypeService} - - - workflowService - #{WorkflowService} - - - formsService - #{FormsService} - - - - - - The bean that backs up the Edit Form Wizard - - EditFormWizard - org.alfresco.web.bean.wcm.EditFormWizard - session - - nodeService - #{NodeService} - - - fileFolderService - #{FileFolderService} - - - searchService - #{SearchService} - - - namespaceService - #{NamespaceService} - - - navigator - #{NavigationBean} - - - browseBean - #{BrowseBean} - - - contentService - #{ContentService} - - - mimetypeService - #{MimetypeService} - - - workflowService - #{WorkflowService} - - - formsService - #{FormsService} - - + + + + + The bean that backs up the Create XML Content Type Wizard + + CreateFormWizard + org.alfresco.web.bean.wcm.CreateFormWizard + session + + nodeService + #{NodeService} + + + fileFolderService + #{FileFolderService} + + + searchService + #{SearchService} + + + namespaceService + #{NamespaceService} + + + navigator + #{NavigationBean} + + + browseBean + #{BrowseBean} + + + contentService + #{ContentService} + + + mimetypeService + #{MimetypeService} + + + workflowService + #{WorkflowService} + + + formsService + #{FormsService} + + + + + + The bean that backs up the Edit Form Wizard + + EditFormWizard + org.alfresco.web.bean.wcm.EditFormWizard + session + + nodeService + #{NodeService} + + + fileFolderService + #{FileFolderService} + + + searchService + #{SearchService} + + + namespaceService + #{NamespaceService} + + + navigator + #{NavigationBean} + + + browseBean + #{BrowseBean} + + + contentService + #{ContentService} + + + mimetypeService + #{MimetypeService} + + + workflowService + #{WorkflowService} + + + formsService + #{FormsService} + + @@ -3461,6 +3699,31 @@ + + + Backing bean used by the WebSite details dialog + + WebSiteDetailsDialog + org.alfresco.web.bean.wcm.WebSiteDetailsDialog + session + + browseBean + #{BrowseBean} + + + navigator + #{NavigationBean} + + + nodeService + #{NodeService} + + + permissionService + #{PermissionService} + + + The bean that backs up the Edit AVM File Properties Dialog @@ -4261,10 +4524,10 @@ avmBrowseBean #{AVMBrowseBean} - - - navigator - #{NavigationBean} + + + navigator + #{NavigationBean} schema2XFormsProperties @@ -4320,9 +4583,9 @@ The bean that backs up the view of the Versioned Properties - VersionedDocumentDetailsBean + VersionedDocumentDetailsDialog - org.alfresco.web.bean.VersionedDocumentDetailsBean + org.alfresco.web.bean.content.VersionedDocumentDetailsDialog session @@ -4395,11 +4658,11 @@ ownableService #{OwnableService} - - - contentUsageService - #{ContentUsageService} - + + + contentUsageService + #{ContentUsageService} + @@ -4454,11 +4717,11 @@ properties #{UsersBeanProperties} - - - contentUsageService - #{ContentUsageService} - + + + contentUsageService + #{ContentUsageService} + @@ -4627,7 +4890,7 @@ AdminConsoleDialog - org.alfresco.web.bean.AdminConsoleDialog + org.alfresco.web.bean.admin.AdminConsoleDialog session @@ -4657,7 +4920,7 @@ EditCategoryDialog - org.alfresco.web.bean.EditCategoryDialog + org.alfresco.web.bean.categories.EditCategoryDialog session @@ -4665,8 +4928,8 @@ #{NodeService} - properties - #{CategoriesProperties} + categoryService + #{CategoryService} @@ -4676,7 +4939,7 @@ DeleteCategoryDialog - org.alfresco.web.bean.DeleteCategoryDialog + org.alfresco.web.bean.categories.DeleteCategoryDialog session @@ -4684,8 +4947,8 @@ #{NodeService} - properties - #{CategoriesProperties} + categoryService + #{CategoryService} @@ -4693,7 +4956,7 @@ The bean for the New Category screen. CreateCategoryDialog - org.alfresco.web.bean.CreateCategoryDialog + org.alfresco.web.bean.categories.CreateCategoryDialog session @@ -4701,8 +4964,8 @@ #{NodeService} - properties - #{CategoriesProperties} + categoryService + #{CategoryService} @@ -4710,7 +4973,7 @@ The bean for Apply Doc Template Screen. ApplyDocTemplateDialog - org.alfresco.web.bean.ApplyDocTemplateDialog + org.alfresco.web.bean.spaces.ApplyDocTemplateDialog session @@ -4727,7 +4990,7 @@ The bean for Apply RSS Template Screen. ApplyRssTemplateDialog - org.alfresco.web.bean.ApplyRssTemplateDialog + org.alfresco.web.bean.spaces.ApplyRssTemplateDialog session @@ -4744,7 +5007,7 @@ The bean for Apply Space Template Screen. ApplySpaceTemplateDialog - org.alfresco.web.bean.ApplySpaceTemplateDialog + org.alfresco.web.bean.spaces.ApplySpaceTemplateDialog session @@ -4761,7 +5024,7 @@ The bean for Edit Simple Workflow Screen. EditSimpleWorkflowDialog - org.alfresco.web.bean.EditSimpleWorkflowDialog + org.alfresco.web.bean.content.EditSimpleWorkflowDialog session @@ -4776,9 +5039,9 @@ The bean for Edit Simple Space Workflow Screen. - EditSpaceSimpleWorkflowDialog + EditSimpleWorkflowDialog - org.alfresco.web.bean.EditSpaceSimpleWorkflowDialog + org.alfresco.web.bean.spaces.EditSimpleWorkflowDialog session @@ -4822,7 +5085,7 @@ Bean that manages the deleting of trashitem. TrashcanDeleteItemDialog - org.alfresco.web.bean.TrashcanDeleteItemDialog + org.alfresco.web.bean.trashcan.TrashcanDeleteItemDialog session nodeService @@ -4847,7 +5110,7 @@ Bean that manages the deleting of all trashitems. TrashcanDeleteAllItemsDialog - org.alfresco.web.bean.TrashcanDeleteAllItemsDialog + org.alfresco.web.bean.trashcan.TrashcanDeleteAllItemsDialog session nodeService @@ -4872,7 +5135,7 @@ Bean that manages the deleting of listed trashitems. TrashcanDeleteListedItemsDialog - org.alfresco.web.bean.TrashcanDeleteListedItemsDialog + org.alfresco.web.bean.trashcan.TrashcanDeleteListedItemsDialog session nodeService @@ -4896,7 +5159,7 @@ The bean for the Item Details Screen. TrashcanItemDetailsDialog - org.alfresco.web.bean.TrashcanItemDetailsDialog + org.alfresco.web.bean.trashcan.TrashcanItemDetailsDialog session @@ -4925,7 +5188,7 @@ The bean for the Recover Item Screen. TrashcanRecoverItemDialog - org.alfresco.web.bean.TrashcanRecoverItemDialog + org.alfresco.web.bean.trashcan.TrashcanRecoverItemDialog session @@ -4950,7 +5213,7 @@ The bean for the Recover All Items Screen. TrashcanRecoverAllItemsDialog - org.alfresco.web.bean.TrashcanRecoverAllItemsDialog + org.alfresco.web.bean.trashcan.TrashcanRecoverAllItemsDialog session @@ -4975,7 +5238,7 @@ The bean for the Recover Listed Items Screen. TrashcanRecoverListedItemsDialog - org.alfresco.web.bean.TrashcanRecoverListedItemsDialog + org.alfresco.web.bean.trashcan.TrashcanRecoverListedItemsDialog session @@ -5022,7 +5285,7 @@ The bean for the Recovery Report Screen. TrashcanRecoveryReportDialog - org.alfresco.web.bean.TrashcanRecoveryReportDialog + org.alfresco.web.bean.trashcan.TrashcanRecoveryReportDialog session @@ -5047,7 +5310,7 @@ The bean for the Edit Html Inline Screen. CCEditHtmlInlineDialog - org.alfresco.web.bean.CCEditHtmlInlineDialog + org.alfresco.web.bean.coci.CCEditHtmlInlineDialog session @@ -5060,7 +5323,7 @@ The bean for the Edit Text Inline Screen. CCEditTextInlineDialog - org.alfresco.web.bean.CCEditTextInlineDialog + org.alfresco.web.bean.coci.CCEditTextInlineDialog session @@ -5073,7 +5336,7 @@ The bean for the Checkout File Screen. CCCheckoutFileDialog - org.alfresco.web.bean.CCCheckoutFileDialog + org.alfresco.web.bean.coci.CCCheckoutFileDialog session @@ -5098,7 +5361,7 @@ The bean for the Checkout File Link Screen. CCCheckoutFileLinkDialog - org.alfresco.web.bean.CCCheckoutFileLinkDialog + org.alfresco.web.bean.coci.CCCheckoutFileLinkDialog session @@ -5123,7 +5386,7 @@ The bean for the Edit File Screen. CCEditFileDialog - org.alfresco.web.bean.CCEditFileDialog + org.alfresco.web.bean.coci.CCEditFileDialog session @@ -5136,7 +5399,7 @@ The bean for the Undo Checkout File Screen. CCUndoCheckoutFileDialog - org.alfresco.web.bean.CCUndoCheckoutFileDialog + org.alfresco.web.bean.coci.CCUndoCheckoutFileDialog session @@ -5149,7 +5412,20 @@ The bean for the Working Copy Missing Screen. CCWorkingCopyMissingDialog - org.alfresco.web.bean.CCWorkingCopyMissingDialog + org.alfresco.web.bean.coci.CCWorkingCopyMissingDialog + + session + + property + #{CCProperties} + + + + + The bean for the Checkin File Screen. + CCCheckinFileDialog + + org.alfresco.web.bean.coci.CCCheckinFileDialog session @@ -5162,7 +5438,7 @@ The bean for the Edit Search Screen. EditSearchDialog - org.alfresco.web.bean.EditSearchDialog + org.alfresco.web.bean.search.EditSearchDialog session @@ -5191,7 +5467,7 @@ The bean for the Save Search Screen. SaveSearchDialog - org.alfresco.web.bean.SaveSearchDialog + org.alfresco.web.bean.search.SaveSearchDialog session @@ -5257,7 +5533,7 @@ The bean for the Save Search Screen. ShowSystemInfoDialog - org.alfresco.web.bean.ShowSystemInfoDialog + org.alfresco.web.bean.admin.ShowSystemInfoDialog session diff --git a/source/web/WEB-INF/faces-config-common.xml b/source/web/WEB-INF/faces-config-common.xml index 53aa647ebb..09f3df16b6 100644 --- a/source/web/WEB-INF/faces-config-common.xml +++ b/source/web/WEB-INF/faces-config-common.xml @@ -149,6 +149,11 @@ org.alfresco.web.ui.common.component.UISelectList + + org.alfresco.faces.UploadInput + org.alfresco.web.ui.common.component.UploadInput + + diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml index c85059a34f..55179b840c 100644 --- a/source/web/WEB-INF/faces-config-navigation.xml +++ b/source/web/WEB-INF/faces-config-navigation.xml @@ -45,38 +45,22 @@ /jsp/* - - showDocDetails - /jsp/dialog/document-details.jsp - showMLContainerDetails /jsp/ml/ml-container-details.jsp showVersionedDetails - /jsp/dialog/versioned-details.jsp - - - showSpaceDetails - /jsp/dialog/space-details.jsp + /jsp/content/versioned-details.jsp dashboard /jsp/browse/dashboard.jsp - - addContent - /jsp/content/add-content-dialog.jsp - addTranslation /jsp/ml/add-translation-dialog.jsp - - import - /jsp/dialog/import.jsp - manageCategories /jsp/categories/categories.jsp @@ -89,18 +73,10 @@ manageGroups /jsp/groups/groups.jsp - - showSystemInfo - /jsp/dialog/system-info.jsp - showNodeBrowser /jsp/admin/store-browser.jsp - - export - /jsp/dialog/export.jsp - @@ -108,7 +84,7 @@ /jsp/* advSearch - /jsp/dialog/advanced-search.jsp + /jsp/search/advanced-search.jsp @@ -141,38 +117,10 @@ /jsp/* - - addContent - /jsp/content/add-content-dialog.jsp - - - checkoutFile - /jsp/dialog/checkout-file.jsp - - - checkinFile - /jsp/dialog/checkin-file.jsp - undoCheckoutFile /jsp/dialog/undocheckout-file.jsp - - updateFile - /jsp/dialog/update-file.jsp - - - editFile - /jsp/dialog/edit-file.jsp - - - editHtmlInline - /jsp/dialog/edit-html-inline.jsp - - - editTextInline - /jsp/dialog/edit-text-inline.jsp - @@ -180,26 +128,6 @@ /jsp/browse/browse.jsp - - manageInvitedUsers - /jsp/roles/manage-invited-users.jsp - - - manageContentUsers - /jsp/roles/manage-content-users.jsp - - - manageRules - /jsp/dialog/rules.jsp - - - previewContent - /jsp/dialog/preview-file.jsp - - - previewSpace - /jsp/dialog/preview-space.jsp - startDiscussion /jsp/forums/create-topic.jsp @@ -212,14 +140,6 @@ showTopic /jsp/forums/topic.jsp - - saveNewSearch - /jsp/dialog/save-search.jsp - - - saveEditSearch - /jsp/dialog/edit-search.jsp - @@ -234,61 +154,9 @@ /jsp/admin/admin-console.jsp - - - /jsp/dialog/edit-file.jsp - - checkoutFile - /jsp/dialog/checkout-file.jsp - - - - - /jsp/ml/* - - addTranslation - /jsp/ml/add-translation-dialog.jsp - - - - - /jsp/dialog/edit-text-inline.jsp - - checkoutFile - /jsp/dialog/checkout-file.jsp - - - - - /jsp/dialog/edit-html-inline.jsp - - checkoutFile - /jsp/dialog/checkout-file.jsp - - - + /jsp/dialog/space-details.jsp - - manageInvitedUsers - /jsp/roles/manage-invited-users.jsp - - - manageRules - /jsp/dialog/rules.jsp - - - applyTemplate - /jsp/dialog/apply-space-template.jsp - - - applyRSSTemplate - /jsp/dialog/apply-rss-template.jsp - - - previewSpace - /jsp/dialog/preview-space.jsp - showForum /jsp/forums/forum.jsp @@ -297,82 +165,6 @@ editCategories /jsp/dialog/edit-space-category.jsp - - editSimpleWorkflow - /jsp/dialog/edit-space-simple-workflow.jsp - - - - - /jsp/dialog/* - - manageInvitedUsers - /jsp/roles/manage-invited-users.jsp - - - - - /jsp/dialog/document-details.jsp - - editSimpleWorkflow - /jsp/dialog/edit-simple-workflow.jsp - - - editCategories - /jsp/dialog/edit-category.jsp - - - previewContent - /jsp/dialog/preview-file.jsp - - - showForum - /jsp/forums/forum.jsp - - - manageContentUsers - /jsp/roles/manage-content-users.jsp - - - applyTemplate - /jsp/dialog/apply-doc-template.jsp - - - - - /jsp/dialog/edit-simple-workflow.jsp - - cancel - /jsp/dialog/document-details.jsp - - - finish - /jsp/dialog/document-details.jsp - - - - - /jsp/dialog/edit-space-simple-workflow.jsp - - cancel - /jsp/dialog/space-details.jsp - - - finish - /jsp/dialog/space-details.jsp - - - - - /jsp/dialog/edit-category.jsp - - cancel - /jsp/dialog/document-details.jsp - - - finish - /jsp/dialog/document-details.jsp - @@ -387,69 +179,6 @@ - - /jsp/dialog/rules.jsp - - deleteRule - /jsp/dialog/delete-rule.jsp - - - - - /jsp/dialog/delete-rule.jsp - - manageRules - /jsp/dialog/rules.jsp - - - cancel - /jsp/dialog/rules.jsp - - - browse - /jsp/dialog/rules.jsp - - - - - - /jsp/dialog/filelink-details.jsp - - editLinkProperties - /jsp/dialog/edit-link-properties.jsp - - - manageContentUsers - /jsp/roles/manage-content-users.jsp - - - - - - /jsp/dialog/spacelink-details.jsp - - editLinkProperties - /jsp/dialog/edit-link-properties.jsp - - - manageContentUsers - /jsp/roles/manage-content-users.jsp - - - - - - /jsp/dialog/edit-link-properties.jsp - - cancelEdit - /jsp/dialog/filelink-details.jsp - - - finishEdit - /jsp/dialog/filelink-details.jsp - - - /jsp/roles/manage-invited-users.jsp @@ -526,14 +255,6 @@ /jsp/wizard/invite-users/* - - invite - /jsp/wizard/invite-users/invite.jsp - - - notify - /jsp/wizard/invite-users/notify.jsp - cancel /jsp/roles/manage-invited-users.jsp @@ -580,10 +301,6 @@ /jsp/users/users.jsp - - createUser - /jsp/wizard/new-user/person-properties.jsp - editUser /jsp/wizard/new-user/person-properties.jsp @@ -805,10 +522,6 @@ showTopicDetails /jsp/forums/topic-details.jsp - - manageInvitedUsers - /jsp/roles/manage-invited-users.jsp - @@ -864,13 +577,9 @@ topicDeleted /jsp/forums/forum.jsp - - checkoutFileLink - /jsp/dialog/checkout-file-link.jsp - workingCopyMissing - /jsp/dialog/working-copy-missing.jsp + /jsp/coci/working-copy-missing.jsp @@ -884,14 +593,6 @@ browseSandbox /jsp/wcm/browse-sandbox.jsp - - importContent - /jsp/wcm/import-content-dialog.jsp - - - addAvmContent - /jsp/wcm/add-content-dialog.jsp - - - /jsp/projects/* - - manageInvitedUsers - /jsp/roles/manage-invited-users.jsp - - - diff --git a/source/web/WEB-INF/repo.tld b/source/web/WEB-INF/repo.tld index 01a7344668..b0e6e4e3d8 100644 --- a/source/web/WEB-INF/repo.tld +++ b/source/web/WEB-INF/repo.tld @@ -679,6 +679,42 @@ JSP + + upload + org.alfresco.web.ui.common.tag.UploadInputTag + JSP + + Component for uploading files in the dialog framework. It use + dynamically created hidden iframes to upload files. + + + + id + false + false + java.lang.String + + + + value + true + true + + This property points to name of the uploaded file. + + + + + framework + true + true + + This attribute describes framework type. + It can takes "dialog" or "wizard" values. + + + + spaceSelector org.alfresco.web.ui.repo.tag.SpaceSelectorTag diff --git a/source/web/WEB-INF/web.xml b/source/web/WEB-INF/web.xml index 26b7b1727b..e480392754 100644 --- a/source/web/WEB-INF/web.xml +++ b/source/web/WEB-INF/web.xml @@ -163,7 +163,7 @@ Admin Authentication Filter - /faces/jsp/dialog/system-info.jsp + /faces/jsp/admin/system-info.jsp @@ -315,10 +315,12 @@ org.alfresco.web.app.servlet.JBPMDeployProcessServlet + Faces Servlet @@ -480,10 +482,12 @@ /workflowdefinitionimage/* + 60 diff --git a/source/web/jsp/dialog/export.jsp b/source/web/jsp/admin/export.jsp similarity index 100% rename from source/web/jsp/dialog/export.jsp rename to source/web/jsp/admin/export.jsp diff --git a/source/web/jsp/admin/import.jsp b/source/web/jsp/admin/import.jsp new file mode 100644 index 0000000000..376373be97 --- /dev/null +++ b/source/web/jsp/admin/import.jsp @@ -0,0 +1,82 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1.
+ + + + + + + + + + + + + + +
  3.
+
 
+
+
\ No newline at end of file diff --git a/source/web/jsp/dialog/system-info.jsp b/source/web/jsp/admin/system-info.jsp similarity index 100% rename from source/web/jsp/dialog/system-info.jsp rename to source/web/jsp/admin/system-info.jsp diff --git a/source/web/jsp/categories/categories.jsp b/source/web/jsp/categories/categories.jsp index 5f22dff1cd..f71701ef6a 100644 --- a/source/web/jsp/categories/categories.jsp +++ b/source/web/jsp/categories/categories.jsp @@ -22,217 +22,50 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - - - - - - -
- -
-
- <%-- show either root message or the current category name --%> - - -
-
-
- <%-- Create actions menu --%> - - - - - <%-- More actions menu --%> - - - - - - - - - - - - <%-- View mode settings --%> - - - - -
-
- - - - - - -
- - <%-- Category Path Breadcrumb --%> -
- -
- - <%-- Categories List --%> -
- - - - - - <%-- Primary column for icons view mode --%> - - - - - - - - - - - - - - - - - - - - <%-- Actions column --%> - - - - - - - - - - - - - - - - - -
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
+ <%-- Primary column for icons view mode --%> + + + + + + + + + + + + + + + + + + -
\ No newline at end of file + <%-- Actions column --%> + + + + + + + + + + +
+ \ No newline at end of file diff --git a/source/web/jsp/categories/delete-category.jsp b/source/web/jsp/categories/delete-category.jsp index 0794e75e98..ebfc07624d 100644 --- a/source/web/jsp/categories/delete-category.jsp +++ b/source/web/jsp/categories/delete-category.jsp @@ -33,7 +33,7 @@ - + @@ -64,7 +64,7 @@ diff --git a/source/web/jsp/categories/edit-category.jsp b/source/web/jsp/categories/edit-category.jsp index 7561846a19..ff94eac667 100644 --- a/source/web/jsp/categories/edit-category.jsp +++ b/source/web/jsp/categories/edit-category.jsp @@ -62,7 +62,7 @@ @@ -70,7 +70,7 @@
@@ -48,7 +48,7 @@ - + - + : -  *
: - +
diff --git a/source/web/jsp/categories/new-category.jsp b/source/web/jsp/categories/new-category.jsp index fded5d646f..48beeab29a 100644 --- a/source/web/jsp/categories/new-category.jsp +++ b/source/web/jsp/categories/new-category.jsp @@ -61,7 +61,7 @@
: -  * @@ -71,7 +71,7 @@ : - diff --git a/source/web/jsp/coci/checkin-file.jsp b/source/web/jsp/coci/checkin-file.jsp new file mode 100644 index 0000000000..d7ad51b103 --- /dev/null +++ b/source/web/jsp/coci/checkin-file.jsp @@ -0,0 +1,102 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> + +<%@ 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 import="org.alfresco.web.bean.coci.CheckinCheckoutDialog"%> + +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+
+ + + + + + + + + + + + + + +
+
diff --git a/source/web/jsp/dialog/checkout-file-link.jsp b/source/web/jsp/coci/checkout-file-link.jsp similarity index 100% rename from source/web/jsp/dialog/checkout-file-link.jsp rename to source/web/jsp/coci/checkout-file-link.jsp diff --git a/source/web/jsp/dialog/checkout-file.jsp b/source/web/jsp/coci/checkout-file.jsp similarity index 100% rename from source/web/jsp/dialog/checkout-file.jsp rename to source/web/jsp/coci/checkout-file.jsp diff --git a/source/web/jsp/dialog/undocheckout-file.jsp b/source/web/jsp/coci/undocheckout-file.jsp similarity index 100% rename from source/web/jsp/dialog/undocheckout-file.jsp rename to source/web/jsp/coci/undocheckout-file.jsp diff --git a/source/web/jsp/dialog/working-copy-missing.jsp b/source/web/jsp/coci/working-copy-missing.jsp similarity index 100% rename from source/web/jsp/dialog/working-copy-missing.jsp rename to source/web/jsp/coci/working-copy-missing.jsp diff --git a/source/web/jsp/content/add-content-dialog.jsp b/source/web/jsp/content/add-content-dialog.jsp index ea40048443..8916cb1705 100644 --- a/source/web/jsp/content/add-content-dialog.jsp +++ b/source/web/jsp/content/add-content-dialog.jsp @@ -1,6 +1,6 @@ <%-- * Copyright (C) 2005-2007 Alfresco Software Limited. - + * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -15,347 +15,201 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> +<%@ 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="javax.faces.context.FacesContext" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="org.alfresco.web.bean.content.AddContentDialog" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="javax.faces.context.FacesContext"%> +<%@ page import="org.alfresco.web.app.Application"%> +<%@ page import="org.alfresco.web.bean.content.AddContentDialog"%> +<%@ page import="org.alfresco.web.app.servlet.FacesHelper"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> <% -boolean fileUploaded = false; + boolean fileUploaded = false; -AddContentDialog dialog = (AddContentDialog)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddContentDialog"); -if (dialog != null && dialog.getFileName() != null) + AddContentDialog dialog = (AddContentDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddContentDialog"); + if (dialog != null && dialog.getFileName() != null) + { + fileUploaded = true; + } +%> + + + +<% +if (fileUploaded) { - fileUploaded = true; + PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); + out.write("  "); + out.write(dialog.getFileUploadSuccessMsg()); + PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); + out.write("
"); } %> - + + + <% + if (fileUploaded == false) + { + %> + - + + + + + + + + <%} + if (fileUploaded) + { + %> + - - - <%-- load a bundle of properties with I18N strings --%> - - - - - <%-- Main outer table --%> -
+ + + + + + + + + +
- - <%-- Title bar --%> - - - <%-- Main area --%> - - <%-- Shelf --%> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + if (dialog.getOtherPropertiesChoiceVisible()) + { + %> + + + + + + + + + - - <%-- 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 --%> - - - - - -
- -
-
-
- -
- - - - - - -
- - - - <% - if (fileUploaded) - { - PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); - out.write("  "); - out.write(dialog.getFileUploadSuccessMsg()); - PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); - out.write("
"); - } - %> - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> - - - <% if (fileUploaded == false) { %> - - - - - - - - - - - - - - - - - - - - - - <% } %> - - - <% if (fileUploaded) { %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% if (dialog.getOtherPropertiesChoiceVisible()) { %> - - - - - - - - <% } } %> - -
- -
- -
- 2. <%=Application.getMessage(FacesContext.getCurrentInstance(), "click_upload")%> -
- " /> -
- - - - - - - -
- - -
- - - -
-
-   -
- - - - - -
- - - - - -
- - - - - -
- - - -
-   -
- - - - - - - - - - -
- -
- - - -
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
-
- - - - - - - -
\ No newline at end of file +
\ No newline at end of file diff --git a/source/web/jsp/dialog/apply-doc-template.jsp b/source/web/jsp/content/apply-doc-template.jsp similarity index 100% rename from source/web/jsp/dialog/apply-doc-template.jsp rename to source/web/jsp/content/apply-doc-template.jsp diff --git a/source/web/jsp/content/document-details.jsp b/source/web/jsp/content/document-details.jsp new file mode 100644 index 0000000000..43547c2f83 --- /dev/null +++ b/source/web/jsp/content/document-details.jsp @@ -0,0 +1,386 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> +<%@ page import="org.alfresco.web.app.Application"%> +<%@ page import="javax.faces.context.FacesContext"%> + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+ + +
+
+
+
+ + +
+
+ + + + + + + + + + + + + + +
+
+
+ + +
+
+ + + + + + + + + + + + + + + +
<%-- icon image for the doc --%> + + + + + + + + +
+
+
+
<%-- properties for the doc --%> + +
+
+
+ + + + + + + +
<%-- icon image for the doc --%> + + + + + + + + +
+
+
+
+
+
+ + +
+
+ +<%-- Multilingual properties --%> + + + + + + + + +<%-- Panel if the node has the multilingual aspect--%> + + + <%-- properties for Ml container --%> + +
+
+ + +
+
+ + + + +
+
+ + + + +
+
+ <%-- list of translations --%> + + + <%-- Name and icon columns --%> + + + + + + + + + + + <%-- Language columns --%> + + + + + + + + <%-- view actions --%> + + + + + + <%-- + Start the new edition wizard from this translation + --%> + + + + + + + + +
+ + <%-- Actions - Add Translation, Add Translation with Content --%> + + +
+ + + + +
+
+
+
+ +<%-- Panel if the node has not the multilingual aspect--%> + + + <%-- Action - Add Translation --%> + + +
+
+
+
+ + +
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + <%-- Primary column for details view mode --%> + + + + + + + + + <%-- Version notes columns --%> + + + + + + + + <%-- Description columns --%> + + + + + + + + <%-- Created Date column for details view mode --%> + + + + + + + + + + <%-- view the contents of the specific version --%> + + + + + + + + + + + + + + + + + + + + + + +
+ + +<%-- Document Actions --%> + + + + +
+
\ No newline at end of file diff --git a/source/web/jsp/dialog/edit-file.jsp b/source/web/jsp/content/edit-file.jsp similarity index 100% rename from source/web/jsp/dialog/edit-file.jsp rename to source/web/jsp/content/edit-file.jsp diff --git a/source/web/jsp/dialog/edit-html-inline.jsp b/source/web/jsp/content/edit-html-inline.jsp similarity index 100% rename from source/web/jsp/dialog/edit-html-inline.jsp rename to source/web/jsp/content/edit-html-inline.jsp diff --git a/source/web/jsp/dialog/edit-link-properties.jsp b/source/web/jsp/content/edit-link-properties.jsp similarity index 100% rename from source/web/jsp/dialog/edit-link-properties.jsp rename to source/web/jsp/content/edit-link-properties.jsp diff --git a/source/web/jsp/dialog/edit-simple-workflow.jsp b/source/web/jsp/content/edit-simple-workflow.jsp similarity index 96% rename from source/web/jsp/dialog/edit-simple-workflow.jsp rename to source/web/jsp/content/edit-simple-workflow.jsp index 9bb20ef7d3..5a4160f7b1 100644 --- a/source/web/jsp/dialog/edit-simple-workflow.jsp +++ b/source/web/jsp/content/edit-simple-workflow.jsp @@ -150,7 +150,7 @@ diff --git a/source/web/jsp/dialog/edit-text-inline.jsp b/source/web/jsp/content/edit-text-inline.jsp similarity index 100% rename from source/web/jsp/dialog/edit-text-inline.jsp rename to source/web/jsp/content/edit-text-inline.jsp diff --git a/source/web/jsp/content/filelink-details.jsp b/source/web/jsp/content/filelink-details.jsp new file mode 100644 index 0000000000..332b175f03 --- /dev/null +++ b/source/web/jsp/content/filelink-details.jsp @@ -0,0 +1,111 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> + + + +
+ value="#{DocumentDetailsDialog.workflowProperties.rejectAction}">
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
<%-- icon image for the doc --%> + + + + + + + + +
+
+
+
<%-- properties for the doc link --%> +
+
+ + <%-- Document Actions --%> + + +
+
\ No newline at end of file diff --git a/source/web/jsp/content/preview-file.jsp b/source/web/jsp/content/preview-file.jsp new file mode 100644 index 0000000000..3ada76d5b9 --- /dev/null +++ b/source/web/jsp/content/preview-file.jsp @@ -0,0 +1,49 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> + + + + + + + + <%-- Template component --%> + + +
+ <%-- Get current template noderef and bind current document as model --%> + + +
+
diff --git a/source/web/jsp/content/update-file.jsp b/source/web/jsp/content/update-file.jsp new file mode 100644 index 0000000000..850442c984 --- /dev/null +++ b/source/web/jsp/content/update-file.jsp @@ -0,0 +1,59 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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"%> + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
diff --git a/source/web/jsp/dialog/versioned-details.jsp b/source/web/jsp/content/versioned-details.jsp similarity index 90% rename from source/web/jsp/dialog/versioned-details.jsp rename to source/web/jsp/content/versioned-details.jsp index 9aedd903cc..1efd09fdd7 100644 --- a/source/web/jsp/dialog/versioned-details.jsp +++ b/source/web/jsp/content/versioned-details.jsp @@ -86,19 +86,19 @@
- '' + ''
- : ' + : '
<%-- Navigation --%> - + - + @@ -145,8 +145,8 @@
- - + +
@@ -158,7 +158,7 @@ <%-- properties for the doc --%> - @@ -176,7 +176,7 @@ <%-- Panel if the node has the multilingual aspect--%> <%-- properties for Ml container --%> @@ -184,7 +184,7 @@
- @@ -194,7 +194,7 @@
<%-- list of translations --%> - @@ -234,10 +234,10 @@
- @@ -282,7 +282,7 @@ - + @@ -301,8 +301,8 @@
- - + +
diff --git a/source/web/jsp/dialog/about.jsp b/source/web/jsp/dialog/about.jsp index 6a4b30825c..18f3514f3c 100644 --- a/source/web/jsp/dialog/about.jsp +++ b/source/web/jsp/dialog/about.jsp @@ -32,74 +32,7 @@ <%@ 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 --%> - - - - - <%-- separator row with bottom panel graphics --%> - - - - - - -
- <%@ 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 --%> - - - - - -
- - <%-- Status and Actions inner contents table --%> - <%-- Generally this consists of an icon, textual summary and actions for the current object --%> - - - - - -
- -
-
 - v
-
- -
- +
@@ -285,41 +218,7 @@
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- -
- - - - -
- -
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/source/web/jsp/dialog/checkin-file.jsp b/source/web/jsp/dialog/checkin-file.jsp deleted file mode 100644 index 0fb1b37f6b..0000000000 --- a/source/web/jsp/dialog/checkin-file.jsp +++ /dev/null @@ -1,257 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.bean.CheckinCheckoutDialog" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="javax.faces.context.FacesContext" %> - - - - - - <%-- load a bundle of properties with I18N strings --%> - - - <%-- set the form name here --%> - - - <%-- 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 --%> - - - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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(), "greyround", "#F5F5F5"); %> - - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - -
- - -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - <% - CheckinCheckoutDialog bean = (CheckinCheckoutDialog)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "CheckinCheckoutDialog"); - if (bean != null && bean.getFileName() != null) { - %> - - - - - <% } %> -
1.
- : -
2.
- " /> -
- - <%=bean.getFileUploadSuccessMsg()%> -
-
-
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
diff --git a/source/web/jsp/dialog/container.jsp b/source/web/jsp/dialog/container.jsp index b4ea534d50..f7639c9f25 100644 --- a/source/web/jsp/dialog/container.jsp +++ b/source/web/jsp/dialog/container.jsp @@ -147,12 +147,12 @@ + showLink="false" actionListener="#{DialogManager.bean.previousItem}" action="#{DialogManager.bean.getOutcome}"> + showLink="false" actionListener="#{DialogManager.bean.nextItem}" action="#{DialogManager.bean.getOutcome}"> diff --git a/source/web/jsp/dialog/document-details.jsp b/source/web/jsp/dialog/document-details.jsp deleted file mode 100644 index 27214acd71..0000000000 --- a/source/web/jsp/dialog/document-details.jsp +++ /dev/null @@ -1,550 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="javax.faces.context.FacesContext" %> - - - - - <% - FacesContext fc = FacesContext.getCurrentInstance(); - - // set locale for JSF framework usage - fc.getViewRoot().setLocale(Application.getLanguage(fc)); - %> - - <%-- 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - <%-- Navigation --%> - - -
- - -
- '' -
-
- : -
- -
- : - - - -
-
-
-
- - - - - - - -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
- - - - - - -
- <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - - - - - - - -
- - - - -
- - -
-
-
-
- -
- - - - - - - - - - - - - -
- - - - - -
- - - - - -
-
- -
- - - - - - - - - - - - - - -
- <%-- icon image for the doc --%> - - - - - - - - -
-
- -
-
-
- <%-- properties for the doc --%> - - - - - - -
-
- - - - - - -
- <%-- icon image for the doc --%> - - - - - - - - -
-
- -
-
-
- - - -
-
- -
- - <%-- Multilingual properties --%> - - - - - - - - - <%-- Panel if the node has the multilingual aspect--%> - - - <%-- properties for Ml container --%> -
- -
- - - -
- - - -
- <%-- list of translations --%> - - - <%-- Name and icon columns --%> - - - - - - - - - - - <%-- Language columns --%> - - - - - - - - <%-- view actions --%> - - - - - - <%-- - Start the new edition wizard from this translation - --%> - - - - - - - - -
- - <%-- Actions - Add Translation, Add Translation with Content --%> - -
- - - - -
-
-
- - <%-- Panel if the node has not the multilingual aspect--%> - - - <%-- Action - Add Translation --%> - -
-
-
- -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - <%-- Primary column for details view mode --%> - - - - - - - - - <%-- Version notes columns --%> - - - - - - - - <%-- Description columns --%> - - - - - - - - <%-- Created Date column for details view mode --%> - - - - - - - - - - <%-- view the contents of the specific version --%> - - - - - - - - - - - - - - - - - - - - - -
- - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Document Actions --%> - - - -
-
-
- -
- -
- -
diff --git a/source/web/jsp/dialog/filelink-details.jsp b/source/web/jsp/dialog/filelink-details.jsp deleted file mode 100644 index 006c1f7fa5..0000000000 --- a/source/web/jsp/dialog/filelink-details.jsp +++ /dev/null @@ -1,242 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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="64kb" 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 --%> - - - - - - <%-- Navigation --%> - - -
- - -
- '' -
-
- : -
-
-
- - - - - - - -
-
- - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- <%-- icon image for the doc --%> - - - - - - - - -
-
- -
-
-
- <%-- properties for the doc link --%> - - - -
-
- -
- - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Document Actions --%> - - - -
-
-
- -
- -
- -
\ No newline at end of file diff --git a/source/web/jsp/dialog/import.jsp b/source/web/jsp/dialog/import.jsp deleted file mode 100644 index 7109491462..0000000000 --- a/source/web/jsp/dialog/import.jsp +++ /dev/null @@ -1,209 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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" %> -<%@ page import="org.alfresco.web.bean.ImportBean" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="javax.faces.context.FacesContext" %> - - - - - - <%-- 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"); %> - - - - - - - - - - - - - - - - - - - - - - <% - ImportBean bean = (ImportBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "ImportDialog"); - if (bean != null && bean.getFileName() != null) { - %> - - - - <% } %> - - - - - - - - -
1.
- : -
2.
- " /> -
- - <%=bean.getFileUploadSuccessMsg()%> -
-   - 3. -
-
-   - -
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
-
- -
- -
- -
\ No newline at end of file diff --git a/source/web/jsp/dialog/preview-file.jsp b/source/web/jsp/dialog/preview-file.jsp deleted file mode 100644 index 984237222f..0000000000 --- a/source/web/jsp/dialog/preview-file.jsp +++ /dev/null @@ -1,177 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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="64kb" 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 --%> - - - - - - - <%-- Preview area --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - - - <%-- Navigation --%> - - - -
- - -
- '' -
-
-
- <%-- Available Templates --%> -
- <%-- Templates drop-down selector --%> - - - -
-
- - - - - - - -
-
- - - <%-- Template component --%> - - - - -
- - <%-- Get current template noderef and bind current document as model --%> - - - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
- -
diff --git a/source/web/jsp/dialog/preview-space.jsp b/source/web/jsp/dialog/preview-space.jsp deleted file mode 100644 index 2c70437960..0000000000 --- a/source/web/jsp/dialog/preview-space.jsp +++ /dev/null @@ -1,177 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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="64kb" 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 --%> - - - - - - - <%-- Preview area --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - - - <%-- Navigation --%> - - - -
- - -
- '' -
-
-
- <%-- Available Templates --%> -
- <%-- Templates drop-down selector --%> - - - -
-
- - - - - - - -
-
- - - <%-- Template component --%> - - - - -
- - <%-- Get current template noderef and bind current document as model --%> - - - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
- -
diff --git a/source/web/jsp/dialog/rules.jsp b/source/web/jsp/dialog/rules.jsp deleted file mode 100644 index b9590ac612..0000000000 --- a/source/web/jsp/dialog/rules.jsp +++ /dev/null @@ -1,310 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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 --%> - - - - - - - <%-- infomation panel --%> - - - - - - - - - - - - - - <%-- Details --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - - - - -
- -
-
-
- <%-- Current object actions --%> - - - <%-- More actions menu --%> - - - - - <%-- Filters --%> - - - - -
-
- - -
- - <%PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc");%> -
- - - - - - - -
- <%PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner");%> -
-
- - - - - - -
- - <%-- Rules List --%> - - - - - <%-- Primary column for details view mode --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- Description column --%> - - - - - - - - <%-- Column to show whether the rule is local --%> - - - - - - - - - - <%-- Created Date column for details view mode --%> - - - - - - - - - - <%-- Modified Date column for details/icons view modes --%> - - - - - - - - - - <%-- Rule status collumn --%> - - - - - - - - - - <%-- Actions column --%> - - - - - - - - - - - - - - - - - - - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
- -
diff --git a/source/web/jsp/dialog/space-details.jsp b/source/web/jsp/dialog/space-details.jsp deleted file mode 100644 index b61c4f1316..0000000000 --- a/source/web/jsp/dialog/space-details.jsp +++ /dev/null @@ -1,435 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="javax.faces.context.FacesContext" %> - - - - - <% - FacesContext fc = FacesContext.getCurrentInstance(); - - // set locale for JSF framework usage - fc.getViewRoot().setLocale(Application.getLanguage(fc)); - %> - - <%-- 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - <%-- Navigation --%> - - -
- - -
''
-
:
-
-
- - - - - - - -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
- - - - - - -
- <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - - - - - - - -
- - - - -
- - -
-
-
-
- -
- - - - - - - - - - - - -
- - - -
- - - - - -
-
- -
- - <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - - - - - - - -
- <%-- icon image for the space --%> - - - - - - - - -
-
-
-
-
- <%-- properties for the space --%> - - -
-
- -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - <%-- Primary column for details view mode --%> - - - - - - - - <%-- Description columns --%> - - - - - - - - <%-- Column to show whether the rule is local --%> - - - - - - - - - - <%-- Created Date column for details view mode --%> - - - - - - - - - - <%-- Modified Date column for details/icons view modes --%> - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - -
-
- - <%-- TODO: implement this - but READONLY details only! Manage Space Users for edits... - need support for panel with facets - so can hide edit link unless edit permissions - also need to wrap this panel with an permissions check: ReadPermissions - - - -
-
-
- --%> - - <%-- TBD - -
-
- --%> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Space Actions --%> - - - -
-
-
- -
- -
- -
diff --git a/source/web/jsp/dialog/spacelink-details.jsp b/source/web/jsp/dialog/spacelink-details.jsp deleted file mode 100644 index 17a48e55b8..0000000000 --- a/source/web/jsp/dialog/spacelink-details.jsp +++ /dev/null @@ -1,230 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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="64kb" 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 --%> - - - - - - <%-- Navigation --%> - - -
- - -
''
-
:
-
-
- - - - - - - -
-
- - - - - - -
- - - - - - - - - - - - - - -
- - - - - - - -
- -
-
- -
- - <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - - - - - - - -
- <%-- icon image for the space --%> - - - - - - - - -
-
-
-
-
- <%-- properties for the space link --%> - - - -
-
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Space Actions --%> - - - -
-
-
- -
- -
- -
\ No newline at end of file diff --git a/source/web/jsp/dialog/update-file.jsp b/source/web/jsp/dialog/update-file.jsp deleted file mode 100644 index f7489a0238..0000000000 --- a/source/web/jsp/dialog/update-file.jsp +++ /dev/null @@ -1,204 +0,0 @@ -<%-- - * Copyright (C) 2005-2007 Alfresco Software Limited. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" ---%> -<%@ 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" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.bean.CheckinCheckoutDialog" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="javax.faces.context.FacesContext" %> - - - - - - <%-- load a bundle of properties with I18N strings --%> - - - <%-- set the form name here --%> - - - <%-- 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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"); %> - - - - - - - - - - - - - - - - - - - - - - <% - CheckinCheckoutDialog bean = (CheckinCheckoutDialog)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "CheckinCheckoutDialog"); - if (bean != null && bean.getFileName() != null) { - %> - - - - <% } %> - - - -
- 1. -
- : -
2.
- " /> -
- - <%=bean.getFileUploadSuccessMsg()%> -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
- -
diff --git a/source/web/jsp/forums/forum-details.jsp b/source/web/jsp/forums/forum-details.jsp index 4f1257db1e..ecaad42a53 100644 --- a/source/web/jsp/forums/forum-details.jsp +++ b/source/web/jsp/forums/forum-details.jsp @@ -22,196 +22,74 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ page buffer="64kb" 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 --%> - - - - - - <%-- Navigation --%> - - -
- - -
''
-
:
-
-
- - - - - - - -
-
- - - - - - -
- - - - - - - -
- - - - - -
-
- -
- - <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - - - - - - - - -
- <%-- icon image for the space --%> - - - - - - - - -
-
-
-
-
- <%-- properties for the space --%> - - -
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Actions Panel --%> - - - -
-
-
- -
- -
+ + + + + + + +
+ + + + + + + + +
+
+
- \ No newline at end of file +
+ + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + + + + + + +
<%-- icon image for the space --%> + + + + + + + + +
+
+
+
<%-- properties for the space --%> + +
+
+
+ <%-- Actions Panel --%> + + +
+
\ No newline at end of file diff --git a/source/web/jsp/forums/forums-details.jsp b/source/web/jsp/forums/forums-details.jsp index f628885fd8..35fea288c4 100644 --- a/source/web/jsp/forums/forums-details.jsp +++ b/source/web/jsp/forums/forums-details.jsp @@ -22,197 +22,76 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ page buffer="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> - + + + + - - - - <%-- separator row with bottom panel graphics --%> - - - - - - -
+ + + + + + + + +
+
+
- - - <%-- 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 --%> - - - - -
+
+ + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + + + + + - <%-- Status and Actions inner contents table --%> - <%-- Generally this consists of an icon, textual summary and actions for the current object --%> -
<%-- icon image for the space --%> + + + + + + + + +
+
+
+
+ + <%-- properties for the space --%> +
- - - - - <%-- Navigation --%> - - -
- - -
''
-
:
-
-
- - - - - - - -
-
- - - +
- - - - - - - -
- - - - - -
-
- -
- - <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - +
+
- - - - -
- <%-- icon image for the space --%> - - - - - - - - -
-
-
-
-
- <%-- properties for the space --%> - - -
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Actions Panel --%> - - - -
+ + <%-- Actions Panel --%> + + +
-
- - - - - - - - -
\ No newline at end of file + + + \ No newline at end of file diff --git a/source/web/jsp/forums/topic-details.jsp b/source/web/jsp/forums/topic-details.jsp index 0c91c57114..497e41c3ec 100644 --- a/source/web/jsp/forums/topic-details.jsp +++ b/source/web/jsp/forums/topic-details.jsp @@ -22,197 +22,75 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ page buffer="64kb" 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 --%> - - - - - <%-- separator row with bottom panel graphics --%> - - - - - - -
- <%@ 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 --%> - - - - - - -
- - <%-- Status and Actions inner contents table --%> - <%-- Generally this consists of an icon, textual summary and actions for the current object --%> - - - - +
- - <%-- Navigation --%> - - -
- - -
''
-
:
-
-
- - - - - - - -
-
- - - - -
- - - - - - - -
- - - - - -
-
- -
- - <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + + + + + + +
<%-- icon image for the space --%> + + + + + + + + +
+
+
+
+ <%-- properties for the space --%> +
+
+
- - - - -
- <%-- icon image for the space --%> - - - - - - - - -
-
-
-
-
- <%-- properties for the space --%> - - -
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Actions Panel --%> - - - -
-
-
- - - - + +
-
\ No newline at end of file + <%-- Actions Panel --%> + + + + + + \ No newline at end of file diff --git a/source/web/jsp/ml/add-translation-dialog.jsp b/source/web/jsp/ml/add-translation-dialog.jsp index 9786b4327e..db477124e4 100644 --- a/source/web/jsp/ml/add-translation-dialog.jsp +++ b/source/web/jsp/ml/add-translation-dialog.jsp @@ -22,341 +22,189 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> +<%@ 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="javax.faces.context.FacesContext" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> -<%@ page import="org.alfresco.web.bean.ml.AddTranslationDialog" %> +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="javax.faces.context.FacesContext"%> +<%@ page import="org.alfresco.web.app.Application"%> +<%@ page import="org.alfresco.web.app.servlet.FacesHelper"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> +<%@ page import="org.alfresco.web.bean.ml.AddTranslationDialog"%> <% -boolean fileUploaded = false; + boolean fileUploaded = false; -AddTranslationDialog dialog = (AddTranslationDialog)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddTranslationDialog"); + AddTranslationDialog dialog = (AddTranslationDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddTranslationDialog"); -if (dialog != null && dialog.getFileName() != null) -{ - fileUploaded = true; -} + if (dialog != null && dialog.getFileName() != null) + { + fileUploaded = true; + } %> - + - +<% + if (fileUploaded) + { + PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); + out.write("  "); + out.write(dialog.getFileUploadSuccessMsg()); + PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); + out.write("
"); + } +%> - + + + <% + if (fileUploaded == false) + { + %> + + + + + + + + + + + + <%}%> - <%-- load a bundle of properties with I18N strings --%> - - - - - <%-- Main outer table --%> -
+ + + + + + + + +
- - <%-- Title bar --%> + <% + if (fileUploaded) + { + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- language selection drop-down --%> + + + + + + - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/source/web/jsp/ml/ml-container-details.jsp b/source/web/jsp/ml/ml-container-details.jsp index 7956f4380b..0240b748a7 100644 --- a/source/web/jsp/ml/ml-container-details.jsp +++ b/source/web/jsp/ml/ml-container-details.jsp @@ -22,386 +22,262 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ page buffer="64kb" 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 --%> -
+ - - - <%-- 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 --%> - - - - - -
-
-
-
- -
- - - - - - -
<% - if (fileUploaded) - { - PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); - out.write("  "); - out.write(dialog.getFileUploadSuccessMsg()); - PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); - out.write("
"); - } - %> <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> - - - <% if (fileUploaded == false) { %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% } %> - - - <% if (fileUploaded) { %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- language selection drop-down --%> - - - - - - - - <% if (dialog.getOtherPropertiesChoiceVisible()) { %> - - - - - - - - - - <% } } %> - -
2. <%=Application.getMessage(FacesContext.getCurrentInstance(), "click_upload")%> -
" /> -
- - - - - - - - -
-
-
 
- -
- -
- - - - - -
 
- - - - - - - - - - - - -
- - - -
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
-
+
 
+ +
+ + +
- - <%-- 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - -
- - -
- '' -
-
-
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
- - - - -
- <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - - - - <%-- - Multlingual details - --%> - - <%-- properties for Ml container --%> - - - - - - - - - + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + <%-- + Multlingual details + --%> + <%-- properties for Ml container --%> + + + + + + + + - - - + + + + +
+
+ <%-- list of translations --%> + -
+ - <%-- list of translations --%> - + <%-- Icon details view mode --%> + + + + + + - + <%-- Name Columns --%> + + + + + + - <%-- Icon details view mode --%> - - - - - - + <%-- Language columns --%> + + + + + + - <%-- Name Columns --%> - - - - - - - - <%-- Language columns --%> - - - - - - - - <%-- view actions --%> - - - - - - <%-- + <%-- view actions --%> + + + + + + <%-- Start the new edition wizard from this translation --%> - - - - - + + + + + - - - + + +
+ +
+
+ <%-- + Editions details + --%> + -
+ - <%-- - Editions details - --%> - + <%-- Icon details view mode --%> + + + + + - + <%-- edition label --%> + + + + + - <%-- Icon details view mode --%> - - - - - + <%-- edition notes --%> + + + + + - <%-- edition label --%> - - - - - + <%-- edition author --%> + + + + + - <%-- edition notes --%> - - - - - + <%-- edition date --%> + + + + + + - <%-- edition author --%> - - - - - - <%-- edition date --%> - - - - - - + - + - + <%-- Icon details view mode --%> + + + - <%-- Icon details view mode --%> - - - + <%-- edition label --%> + + + - <%-- edition label --%> - - - + <%-- edition notes --%> + + + - <%-- edition notes --%> - - - + <%-- edition author --%> + + + - <%-- edition author --%> - - - + <%-- edition date --%> + + + + + + - <%-- edition date --%> - - - - - - + +
+ -
+ - + - + <%-- Icon details view mode --%> + + + - <%-- Icon details view mode --%> - - - + <%-- Versioned name --%> + + + + + + - <%-- Versioned name --%> - - - - - - + <%-- Versioned description --%> + + + + + + - <%-- Versioned description --%> - - - - - - + <%-- Versioned creation date --%> + + + + + + + + - <%-- Versioned creation date --%> - - - - - - - - + <%-- Versioned modified date --%> + + + + + + + + - <%-- Versioned modified date --%> - - - - - - - - + <%-- Versioned language --%> + + + + + + - <%-- Versioned language --%> - - - - - - - - <%-- view actions --%> - - - - - - - - - - - - -
- - - -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Document Actions --%> - - - -
-
-
- - - -
- -
\ No newline at end of file + <%-- view actions --%> + + + + + + + + + + +
+
+ + + + +
+ + + <%-- Document Actions --%> + + + + + + + \ No newline at end of file diff --git a/source/web/jsp/parts/titlebar.jsp b/source/web/jsp/parts/titlebar.jsp index c3f3435b83..cce2cfe6d8 100644 --- a/source/web/jsp/parts/titlebar.jsp +++ b/source/web/jsp/parts/titlebar.jsp @@ -29,7 +29,7 @@ - + <%-- Navigation --%> @@ -113,17 +113,17 @@
<%-- Toolbar --%> diff --git a/source/web/jsp/projects/project-details.jsp b/source/web/jsp/projects/project-details.jsp index fb35e1b359..bb8a01cb74 100644 --- a/source/web/jsp/projects/project-details.jsp +++ b/source/web/jsp/projects/project-details.jsp @@ -77,18 +77,18 @@ -
''
-
:
+
''
+
:
- - + + - - + +
+ expanded='#{SpaceDetailsDialog.panels["links-panel"]}' expandedActionListener="#{SpaceDetailsDialog.expandPanel}"> <%-- TODO: add mail-to link etc. --%> @@ -137,7 +137,7 @@ <%-- wrapper comment used by the panel to add additional component facets --%> - + @@ -154,7 +154,7 @@ @@ -166,7 +166,7 @@ diff --git a/source/web/jsp/roles/manage-content-users.jsp b/source/web/jsp/roles/manage-content-users.jsp index 3f834a1527..2f64db106c 100644 --- a/source/web/jsp/roles/manage-content-users.jsp +++ b/source/web/jsp/roles/manage-content-users.jsp @@ -22,112 +22,30 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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" %> +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> - + +
- + - + - +
-
<%-- properties for the space --%> - @@ -181,7 +181,7 @@
- +
@@ -191,7 +191,7 @@ <%-- Actions Panel --%> - +
+ <%-- Details --%> + + + + + - \ No newline at end of file + + + + + +
+ + + + +
+ - - - <%-- 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 --%> - - - - - - - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - - - <%-- View mode settings - - - --%> - -
- -
''
-
- - - -
-
-
- <%-- Current object actions --%> - - - - - - - -
-
- - - - - - -
- - - - - + + <%-- Primary column with full name --%> @@ -174,72 +92,26 @@ - - - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- - - - - - - - -
- - -   -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
+
+
+ + + + + + +
 
+
+ \ No newline at end of file diff --git a/source/web/jsp/roles/manage-invited-users.jsp b/source/web/jsp/roles/manage-invited-users.jsp index 6dc21fa952..668ffbae59 100644 --- a/source/web/jsp/roles/manage-invited-users.jsp +++ b/source/web/jsp/roles/manage-invited-users.jsp @@ -22,112 +22,32 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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" %> +<%@ 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 --%> - - -
- - <%-- Status and Actions inner contents table --%> - <%-- Generally this consists of an icon, textual summary and actions for the current object --%> - - - - - - - - <%-- View mode settings - - - --%> - -
- -
''
-
- - - -
-
-
- <%-- Current object actions --%> - - - - - - - -
-
- - - + -
- - - - - + + + + <%-- Details --%> + + + - - - - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- separator row with bottom panel graphics --%> - - - - - - -
+ + + - - - -
+ + + + <%-- Primary column with full name --%> @@ -174,72 +94,28 @@ - - - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- - - - - - - - -
- - -   -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- - - - +
+
+ + + + + +
 
+
+ diff --git a/source/web/jsp/dialog/delete-rule.jsp b/source/web/jsp/rules/delete-rule.jsp similarity index 100% rename from source/web/jsp/dialog/delete-rule.jsp rename to source/web/jsp/rules/delete-rule.jsp diff --git a/source/web/jsp/rules/rules.jsp b/source/web/jsp/rules/rules.jsp new file mode 100644 index 0000000000..777122d9b3 --- /dev/null +++ b/source/web/jsp/rules/rules.jsp @@ -0,0 +1,147 @@ +<%-- +* Copyright (C) 2005-2007 Alfresco Software Limited. + +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. + +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. + +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +* As a special exception to the terms and conditions of version 2.0 of +* the GPL, you may redistribute this Program in connection with Free/Libre +* and Open Source Software ("FLOSS") applications as described in Alfresco's +* FLOSS exception. You should have recieved a copy of the text describing +* the FLOSS exception, and it is also available here: +* http://www.alfresco.com/legal/licensing" +--%> +<%@ 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"%> + + + + <%PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc");%> + + + + + +
+ <%PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner");%> +
+
+ +
+
+ + + + <%-- Primary column for details view mode --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- Description column --%> + + + + + + + + <%-- Column to show whether the rule is local --%> + + + + + + + + + + <%-- Created Date column for details view mode --%> + + + + + + + + + + <%-- Modified Date column for details/icons view modes --%> + + + + + + + + + + <%-- Rule status collumn --%> + + + + + + + + + + <%-- Actions column --%> + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/web/jsp/dialog/advanced-search.jsp b/source/web/jsp/search/advanced-search.jsp similarity index 100% rename from source/web/jsp/dialog/advanced-search.jsp rename to source/web/jsp/search/advanced-search.jsp diff --git a/source/web/jsp/dialog/edit-search.jsp b/source/web/jsp/search/edit-search.jsp similarity index 100% rename from source/web/jsp/dialog/edit-search.jsp rename to source/web/jsp/search/edit-search.jsp diff --git a/source/web/jsp/dialog/save-search.jsp b/source/web/jsp/search/save-search.jsp similarity index 100% rename from source/web/jsp/dialog/save-search.jsp rename to source/web/jsp/search/save-search.jsp diff --git a/source/web/jsp/dialog/apply-rss-template.jsp b/source/web/jsp/spaces/apply-rss-template.jsp similarity index 98% rename from source/web/jsp/dialog/apply-rss-template.jsp rename to source/web/jsp/spaces/apply-rss-template.jsp index 73f726a0f0..6bd3959abb 100644 --- a/source/web/jsp/dialog/apply-rss-template.jsp +++ b/source/web/jsp/spaces/apply-rss-template.jsp @@ -52,7 +52,7 @@ value="#{msg.manage_invited_users}" actionListener="#{BrowseBean.setupSpaceAction}" action="dialog:manageInvitedUsers"> - +
diff --git a/source/web/jsp/dialog/apply-space-template.jsp b/source/web/jsp/spaces/apply-space-template.jsp similarity index 100% rename from source/web/jsp/dialog/apply-space-template.jsp rename to source/web/jsp/spaces/apply-space-template.jsp diff --git a/source/web/jsp/dialog/delete-space.jsp b/source/web/jsp/spaces/delete-space.jsp similarity index 100% rename from source/web/jsp/dialog/delete-space.jsp rename to source/web/jsp/spaces/delete-space.jsp diff --git a/source/web/jsp/dialog/edit-space-simple-workflow.jsp b/source/web/jsp/spaces/edit-simple-workflow.jsp similarity index 91% rename from source/web/jsp/dialog/edit-space-simple-workflow.jsp rename to source/web/jsp/spaces/edit-simple-workflow.jsp index c9c85d999a..1e81027eb3 100644 --- a/source/web/jsp/dialog/edit-space-simple-workflow.jsp +++ b/source/web/jsp/spaces/edit-simple-workflow.jsp @@ -80,7 +80,7 @@ : @@ -94,7 +94,7 @@ @@ -105,7 +105,7 @@ @@ -124,7 +124,7 @@ @@ -154,7 +154,7 @@
+ value="#{EditSimpleWorkflowDialog.workflowProperties.approveAction}">
@@ -141,7 +141,7 @@
@@ -165,7 +165,7 @@ diff --git a/source/web/jsp/spaces/preview-space.jsp b/source/web/jsp/spaces/preview-space.jsp new file mode 100644 index 0000000000..26bbbc958b --- /dev/null +++ b/source/web/jsp/spaces/preview-space.jsp @@ -0,0 +1,51 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> + + +
+ value="#{EditSimpleWorkflowDialog.workflowProperties.rejectAction}">
+ + + + + + + <%-- Template component --%> + + +
+ <%-- Get current template noderef and bind current document as model --%> + + +
+
diff --git a/source/web/jsp/spaces/space-details.jsp b/source/web/jsp/spaces/space-details.jsp new file mode 100644 index 0000000000..c130ca3407 --- /dev/null +++ b/source/web/jsp/spaces/space-details.jsp @@ -0,0 +1,279 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> + + + + + + + + +
+ + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + + + + + + +
+ + + + + +
+ + +
+
+
+
+ +
+ + + + + + + + + + + + + +
+
+
+ +
+ + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + + + + + + +
<%-- icon image for the space --%> + + + + + + + + +
+
+
+
+ + <%-- properties for the space --%> +
+
+
+ +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + <%-- Primary column for details view mode --%> + + + + + + + + <%-- Description columns --%> + + + + + + + + <%-- Column to show whether the rule is local --%> + + + + + + + + + + <%-- Created Date column for details view mode --%> + + + + + + + + + + <%-- Modified Date column for details/icons view modes --%> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+
+
+ <%-- TODO: implement this - but READONLY details only! Manage Space Users for edits... + need support for panel with facets - so can hide edit link unless edit permissions + also need to wrap this panel with an permissions check: ReadPermissions + + +
+
+
+ --%> <%-- TBD + +
+
+ --%> + +
+ + + <%-- Space Actions --%> + + +
+
diff --git a/source/web/jsp/spaces/spacelink-details.jsp b/source/web/jsp/spaces/spacelink-details.jsp new file mode 100644 index 0000000000..23e3ad26bd --- /dev/null +++ b/source/web/jsp/spaces/spacelink-details.jsp @@ -0,0 +1,110 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ 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="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> + + + + + + + + +
+ + + + + + + + + + + + + + + +
+
+
+ +
+ + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + + + + + + + + + +
<%-- icon image for the space --%> + + + + + + + + +
+
+
+
+ <%-- properties for the space link --%> + + +
+
+
+ + + <%-- Space Actions --%> + + +
+
\ No newline at end of file diff --git a/source/web/jsp/trashcan/trash-list.jsp b/source/web/jsp/trashcan/trash-list.jsp index a31e834690..41910289a5 100644 --- a/source/web/jsp/trashcan/trash-list.jsp +++ b/source/web/jsp/trashcan/trash-list.jsp @@ -22,39 +22,38 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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" %> - - +<%@ 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 --%> + + + + <%PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc");%> +
- + + +
- <%@ include file="../parts/titlebar.jsp" %> +
+ <%PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner");%> + + <%-- Search controls --%> +
+
+   +   +   + + +
+ + <%-- Filter controls --%> + + + - - <%-- Main area --%> - - <%-- Shelf --%> - - - <%-- Work Area --%> - + + + + +
+ + + + + + +
: + + + + +
- <%@ include file="../parts/shelf.jsp" %> - - - <%-- Breadcrumb --%> - <%@ include file="../parts/breadcrumb.jsp" %> - - <%-- Status and Actions --%> + + <%-- Only the admin user needs the username filter --%> + + + + - -
+ - - + + - - - <%-- separator row with gradient shadow --%> - - - - - - - <%-- Details --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - - -
- -
-
-
- <%-- Admin only global actions --%> -  - -
+
: + + + + + +
+ + +
- - - - - - -
- - <%-- Deleted Items List --%> - - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %> - - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %> - - <%-- Search controls --%> -
-  -  -  - -
- - <%-- Filter controls --%> - - - - - <%-- Only the admin user needs the username filter --%> - - - - - -
- - - - - - -
: - - - - - - -
-
- - - - - - -
: -
- - - - - - -
-
-
- -
- - <%-- Recover Listed Items actions --%> -  - -
- - - - <%-- Primary column showing item name --%> - - - - - - - - - - - - - - - <%-- Original Location Path column --%> - - - - - - - - <%-- Deleted Date column --%> - - - - - - - - - - <%-- Deleted by user column --%> - - - - - - - - <%-- Actions column --%> - - - - - - - - - - - - - - - - - -
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- - - - +
-
\ No newline at end of file +
+ + <%-- Recover Listed Items actions --%> +   + + +
+ + + + <%-- Primary column showing item name --%> + + + + + + + + + + + + + + + <%-- Original Location Path column --%> + + + + + + + + <%-- Deleted Date column --%> + + + + + + + + + + <%-- Deleted by user column --%> + + + + + + + + <%-- Actions column --%> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/web/jsp/wizard/invite-users/invite.jsp b/source/web/jsp/users/invite-users-wizard/invite.jsp similarity index 100% rename from source/web/jsp/wizard/invite-users/invite.jsp rename to source/web/jsp/users/invite-users-wizard/invite.jsp diff --git a/source/web/jsp/wizard/invite-users/notify.jsp b/source/web/jsp/users/invite-users-wizard/notify.jsp similarity index 100% rename from source/web/jsp/wizard/invite-users/notify.jsp rename to source/web/jsp/users/invite-users-wizard/notify.jsp diff --git a/source/web/jsp/users/edit-user-properties.jsp b/source/web/jsp/users/new-user-wizard/edit-user-properties.jsp similarity index 100% rename from source/web/jsp/users/edit-user-properties.jsp rename to source/web/jsp/users/new-user-wizard/edit-user-properties.jsp diff --git a/source/web/jsp/users/new-user-properties.jsp b/source/web/jsp/users/new-user-wizard/new-user-properties.jsp similarity index 100% rename from source/web/jsp/users/new-user-properties.jsp rename to source/web/jsp/users/new-user-wizard/new-user-properties.jsp diff --git a/source/web/jsp/users/person-properties.jsp b/source/web/jsp/users/new-user-wizard/person-properties.jsp similarity index 100% rename from source/web/jsp/users/person-properties.jsp rename to source/web/jsp/users/new-user-wizard/person-properties.jsp diff --git a/source/web/jsp/users/users.jsp b/source/web/jsp/users/users.jsp index 0f63905a43..99587e842d 100644 --- a/source/web/jsp/users/users.jsp +++ b/source/web/jsp/users/users.jsp @@ -22,272 +22,154 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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" %> - - +<%@ 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - - - - - -
- -
-
-
- <%-- Current object actions --%> - - - <%-- View mode settings --%> - - - -
-
- - - - - - -
- - <%-- Users List --%> - - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %> - - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %> - -
-   -   - -
- - - - <%-- Primary column with full name --%> - - - - - - - - - - - <%-- Username column --%> - - - - - - - - <%-- Home Space Path column --%> - - - - - - - - <%-- Usage column --%> - - - - - - - - - - <%-- Quota column --%> - - - - - - - - - - <%-- Actions column --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
-
+ + + + +
+ + <%-- Users List --%> + + + <% + PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); + %> + + + + + +
+ <% + PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); + %> +
+
+   +   + +
+ + + + <%-- Primary column with full name --%> + + + + + + + + + + + <%-- Username column --%> + + + + + + + + <%-- Home Space Path column --%> + + + + + + + + <%-- Usage column --%> + + + + + + + + + + <%-- Quota column --%> + + + + + + + + + + <%-- Actions column --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
\ No newline at end of file diff --git a/source/web/jsp/wcm/add-content-dialog.jsp b/source/web/jsp/wcm/add-content-dialog.jsp index 08e8549011..d1c78cd032 100644 --- a/source/web/jsp/wcm/add-content-dialog.jsp +++ b/source/web/jsp/wcm/add-content-dialog.jsp @@ -22,278 +22,172 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> +<%@ 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="javax.faces.context.FacesContext"%> +<%@ page import="org.alfresco.web.app.Application"%> +<%@ page import="org.alfresco.web.bean.wcm.AddAvmContentDialog"%> +<%@ page import="org.alfresco.web.app.servlet.FacesHelper"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> -<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="javax.faces.context.FacesContext" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="org.alfresco.web.bean.wcm.AddAvmContentDialog" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> <% -boolean fileUploaded = false; + boolean fileUploaded = false; -AddAvmContentDialog dialog = (AddAvmContentDialog)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddAvmContentDialog"); -if (dialog != null && dialog.getFileName() != null) -{ - fileUploaded = true; -} + AddAvmContentDialog dialog = (AddAvmContentDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddAvmContentDialog"); + if (dialog != null && dialog.getFileName() != null) + { + fileUploaded = true; + } %> + + + <% + if (fileUploaded) + { + PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); + out.write("  "); + out.write(dialog.getFileUploadSuccessMsg()); + PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); + out.write("
"); + } + %> + + + <% + if (fileUploaded == false) + { + %> + + + + + + + +<% + } +%> +<% + if (fileUploaded) + { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + } + %> + +
+ + + +
+ - + + - + + + +
+ + + + + + + + +
+
+
  + + + +
+ + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + +
- - - <%-- 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 --%> - - - - - -
- -
-
-
- -
- - - - - - -
- - - - <% - if (fileUploaded) - { - PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); - out.write("  "); - out.write(dialog.getFileUploadSuccessMsg()); - PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); - out.write("
"); - } - %> - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> - - - <% if (fileUploaded == false) { %> - - - - - - - - - - - - - - - - - - - - - - <% } %> - - - <% if (fileUploaded) { %> - - - - - - - - - - - - - - - - - - - - - - - - <% } %> - -
- -
- -
- 2. <%=Application.getMessage(FacesContext.getCurrentInstance(), "click_upload")%> -
- " /> -
- - - - - - - -
- - -
- - - -
-
-   -
- - - - - -
- - - -
- - - -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
-
- - - -
- -
- - \ No newline at end of file +
\ No newline at end of file diff --git a/source/web/jsp/wcm/file-details.jsp b/source/web/jsp/wcm/file-details.jsp index 6be657819d..38032e0137 100644 --- a/source/web/jsp/wcm/file-details.jsp +++ b/source/web/jsp/wcm/file-details.jsp @@ -22,258 +22,120 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ 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" %> + +
+ + - - - - - - <%-- separator row with gradient shadow --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- Details --%> - - - - - - - <%-- separator row with bottom panel graphics --%> - - - - - - -
- <%-- Status and Actions --%> -
- - <%-- Status and Actions inner contents table --%> - <%-- Generally this consists of an icon, textual summary and actions for the current object --%> - - - - - - <%-- Navigation --%> - - - - -
- - -
- '' -
-
-
- - - - - - - -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
- - - - - - -
- - - - - - - - -
- - - - - - - -
-
- -
- - - - - - - - - - - - - - - - -
- <%-- icon image for the doc --%> - - - - - - - - -
-
- -
-
-
- <%-- properties for the doc --%> - -
-
- -
- - - - - - <%-- Primary column --%> - - - - - - - - <%-- Modified Date column --%> - - - - - - - - - - <%-- actions --%> - - - - - - - - - - - - - - -
- - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Document Actions --%> - - - -
-
-
- -
- -
+ <%-- icon image for the doc --%> + + + + + + + + +
+
+ +
+
+
+ <%-- properties for the doc --%> + +
+ -
\ No newline at end of file +
+ + + + + + <%-- Primary column --%> + + + + + + + + <%-- Modified Date column --%> + + + + + + + + + + <%-- actions --%> + + + + + + + + + + + + + + + + + + <%-- Document Actions --%> + + + + + + \ No newline at end of file diff --git a/source/web/jsp/wcm/folder-details.jsp b/source/web/jsp/wcm/folder-details.jsp index 118d434cf3..37777df0d4 100644 --- a/source/web/jsp/wcm/folder-details.jsp +++ b/source/web/jsp/wcm/folder-details.jsp @@ -22,204 +22,71 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a"%> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%> -<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> + + + + - \ No newline at end of file + + +
+ + + + + + +
+
- +
- - - <%-- 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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 --%> - - - - - - <%-- Navigation --%> - - - - -
- - -
- '' -
-
-
- - - - - - - -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
- - - - - - -
- - - - - - -
- - - -
-
- -
- - - - - - - - - - - - - - -
- <%-- icon image for the folder --%> - - - - - - - - -
-
-
-
-
- <%-- properties for the folder --%> - -
-
- -
- - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Document Actions --%> - - - -
-
-
- -
- -
+ + + + + + +
+ <%-- icon image for the folder --%> + + + + + + + + +
+
+
+
+
+ <%-- properties for the folder --%> + +
+
+
+ + <%-- Document Actions --%> + + + +
\ No newline at end of file diff --git a/source/web/jsp/wcm/import-content-dialog.jsp b/source/web/jsp/wcm/import-content-dialog.jsp index cb7ee3adee..b9650b4f05 100644 --- a/source/web/jsp/wcm/import-content-dialog.jsp +++ b/source/web/jsp/wcm/import-content-dialog.jsp @@ -22,216 +22,78 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> +<%@ 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="javax.faces.context.FacesContext" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="org.alfresco.web.bean.wcm.ImportWebsiteDialog" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="javax.faces.context.FacesContext"%> +<%@ page import="org.alfresco.web.app.Application"%> +<%@ page import="org.alfresco.web.bean.wcm.ImportWebsiteDialog"%> +<%@ page import="org.alfresco.web.app.servlet.FacesHelper"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> - + + + + <% + ImportWebsiteDialog bean = (ImportWebsiteDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "ImportWebsiteDialog"); + boolean foundFile = (bean != null && bean.getFileName() != null); + if (foundFile == false) + { + %> + + + + + + + - <%-- load a bundle of properties with I18N strings --%> - - - - - <%-- Main outer table --%> -
+ - + + + + + + +
- - <%-- Title bar --%> + <% } + if (foundFile) + { + %> + - + - - <%-- 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"); %> - - - <% - ImportWebsiteDialog bean = (ImportWebsiteDialog)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "ImportWebsiteDialog"); - boolean foundFile = (bean != null && bean.getFileName() != null); - if (foundFile == false) { - %> - - - - - - - - - - - - - - - - - - - - - - <% } %> - - - <% if (foundFile) { %> - - - - - - - <% } %> -
- -
- -
- 2. <%=Application.getMessage(FacesContext.getCurrentInstance(), "click_upload")%> -
- " /> -
- - - - - - - -
- - -
- - - -
-
- -
-   - + +   +
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
-
- - - - - -
\ No newline at end of file + + + <%}%> + + + \ No newline at end of file diff --git a/source/web/jsp/wcm/update-file.jsp b/source/web/jsp/wcm/update-file.jsp index 9146264661..932d7d7b97 100644 --- a/source/web/jsp/wcm/update-file.jsp +++ b/source/web/jsp/wcm/update-file.jsp @@ -22,182 +22,35 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> +<%@ 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" %> -<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %> -<%@ page import="org.alfresco.web.bean.wcm.AVMEditBean" %> -<%@ page import="org.alfresco.web.app.Application" %> -<%@ page import="javax.faces.context.FacesContext" %> +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%> - + + + + + + + + +
+ - - - <%-- load a bundle of properties with I18N strings --%> - - - <%-- set the form name here --%> - - - <%-- 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 --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- 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"); %> - - - - - - - - - - - - - - - - - - - - - - <% - AVMEditBean bean = (AVMEditBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AVMEditBean"); - if (bean != null && bean.getFileName() != null) { - %> - - - - <% } %> - - - -
- 1. -
- : -
2.
- " /> -
- - <%=bean.getFileUploadSuccessMsg()%> -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
+ + - \ No newline at end of file + + + + + + + + +
+
+
diff --git a/source/web/jsp/wcm/website-details.jsp b/source/web/jsp/wcm/website-details.jsp index 53641e6576..5c0c876b55 100644 --- a/source/web/jsp/wcm/website-details.jsp +++ b/source/web/jsp/wcm/website-details.jsp @@ -22,202 +22,82 @@ * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" --%> -<%@ 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" %> +<%@ 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="64kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> +<%@ page buffer="64kb" contentType="text/html;charset=UTF-8"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%> - + + + + + - - - - <%-- Main area --%> - - <%-- Shelf --%> - - - <%-- Work Area --%> - - -
+ + + + + + + + + +
+
+
- - - <%-- load a bundle of properties with I18N strings --%> - - - - - <%-- Main outer table --%> - +
+ + <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + +
+ + + + +
<%-- icon image for the space --%> + + + + + + + + +
+
+
+
+ + <%-- properties for the space --%> + + +
+ +
- <%-- Title bar --%> -
- <%@ 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 --%> - - - - - - <%-- Navigation --%> - - -
- - -
''
-
:
-
- - - - - - - -
-
- - - - - - -
- - - - - - - - - -
- - - - - - - -
-
- -
- - <%-- wrapper comment used by the panel to add additional component facets --%> - - - - - - - - - - - - - -
- <%-- icon image for the space --%> - - - - - - - - -
-
-
-
-
- <%-- properties for the space --%> - - - -
-
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> - -
- - <%-- Website Actions --%> - - - -
-
-
- - - - +
-
\ No newline at end of file + + <%-- Website Actions --%> + + + + + + \ No newline at end of file