mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
7650: Merged V2.1 to V2.2 7542: ML contribution fixes 7545: Merged V2.0 to V2.1 7544: Merged V1.4 to V2.0 7338: Fix for potential time-based GUID issues 7554: Fixed imports after library package change 7582: WCM-967 7584: Fixed dependecy list for SDK for jug-lgpl-2.0.0.jar 7642: Fix for WCM-949 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8455 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ForumModel;
|
||||
import org.alfresco.web.bean.ml.MultilingualUtils;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Create a forum around a multilingual content node.
|
||||
*
|
||||
* @author Yanick Pignot
|
||||
*/
|
||||
public class CreateForumMLNodeEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
private static final long serialVersionUID = -8621940623410511065L;
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
// the current user must have enough right to add a content to the space
|
||||
// where the pivot translation is located in
|
||||
return MultilingualUtils.canAddChildrenToPivotSpace(node, FacesContext.getCurrentInstance())
|
||||
&& node.hasAspect(ForumModel.ASPECT_DISCUSSABLE) == false
|
||||
&& node.isLocked() == false;
|
||||
|
||||
}
|
||||
}
|
@@ -262,8 +262,10 @@ public class MultilingualManageDialog extends BaseDialogBean
|
||||
mapNode.put("language", lgge);
|
||||
mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName()));
|
||||
|
||||
mapNode.put("notEmpty", new Boolean(!getNodeService().hasAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION)));
|
||||
mapNode.put("userHasRight", new Boolean(canNewEdtion));
|
||||
boolean isEmpty = new Boolean(getNodeService().hasAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION));
|
||||
|
||||
mapNode.put("notEmpty", !isEmpty);
|
||||
mapNode.put("userHasRight", new Boolean(canNewEdtion && !isEmpty));
|
||||
// add the client side version to the list
|
||||
translations.add(mapNode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user