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:
Gavin Cornwell
2008-03-07 10:32:22 +00:00
parent 7cdde20e6e
commit a0d2e45611
5 changed files with 108 additions and 20 deletions

View File

@@ -72,6 +72,18 @@
</params> </params>
</action> </action>
<!-- Discuss multilingual content e.g. jump to Forums view for this node -->
<action id="create_forum_ml_node">
<evaluator>org.alfresco.web.action.evaluator.CreateForumMLNodeEvaluator</evaluator>
<label-id>start_discussion</label-id>
<image>/images/icons/create_forum.gif</image>
<action>dialog:createDiscussion</action>
<action-listener>#{DialogManager.setupParameters}</action-listener>
<params>
<param name="id">#{actionContext.id}</param>
</params>
</action>
<!-- Create a Forums space --> <!-- Create a Forums space -->
<action id="create_forums"> <action id="create_forums">
<permissions> <permissions>
@@ -231,6 +243,12 @@
<action idref="create_forum_node" /> <action idref="create_forum_node" />
</action-group> </action-group>
<!-- Actions Menu for Multilingual Document Details screen -->
<action-group id="multilingual_details_actions">
<action idref="create_forum_ml_node" />
<action idref="discuss_node" />
</action-group>
<!-- Actions Menu for Space Details screen --> <!-- Actions Menu for Space Details screen -->
<action-group id="space_details_actions"> <action-group id="space_details_actions">
<action idref="discuss_node" /> <action idref="discuss_node" />

View File

@@ -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;
}
}

View File

@@ -262,8 +262,10 @@ public class MultilingualManageDialog extends BaseDialogBean
mapNode.put("language", lgge); mapNode.put("language", lgge);
mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName())); mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName()));
mapNode.put("notEmpty", new Boolean(!getNodeService().hasAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION))); boolean isEmpty = new Boolean(getNodeService().hasAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION));
mapNode.put("userHasRight", new Boolean(canNewEdtion));
mapNode.put("notEmpty", !isEmpty);
mapNode.put("userHasRight", new Boolean(canNewEdtion && !isEmpty));
// add the client side version to the list // add the client side version to the list
translations.add(mapNode); translations.add(mapNode);
} }

View File

@@ -225,7 +225,7 @@
Start the new edition wizard from this translation Start the new edition wizard from this translation
--%> --%>
<h:outputText id="space" value=" " /> <h:outputText id="space" value=" " />
<a:actionLink id="new-edition-from" value="#{msg.new_edition}" action="wizard:newEditionFrom" actionListener="#{NewEditionWizard.skipFirstStep}" rendered="#{r.notEmpty && r.userHasRight}"> <a:actionLink id="new-edition-from" value="#{msg.new_edition}" action="wizard:newEditionFrom" actionListener="#{NewEditionWizard.skipFirstStep}" rendered="#{r.userHasRight}">
<f:param name="lang" value="#{r.language}" /> <f:param name="lang" value="#{r.language}" />
</a:actionLink> </a:actionLink>
</a:column> </a:column>
@@ -254,7 +254,7 @@
<%-- Action - Add Translation --%> <%-- Action - Add Translation --%>
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalApply"> <r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalApply">
<f:verbatim> <f:verbatim>
<div style="padding: 16px"></f:verbatim><a:actionLink id="act-make-multilingual" value="#{msg.make_multilingual}" action="dialog:makeMultilingual" showLink="true" image="/images/icons/make_ml.gif" /><f:verbatim></div> <div style="padding: 16px"></f:verbatim><a:actionLink id="act-make-multilingual" value="#{msg.make_multilingual}" action="dialog:makeMultilingual" showLink="true" image="/images/icons/make_ml.gif" rendered="#{DialogManager.bean.locked == false && DialogManager.bean.workingCopy == false}"/><f:verbatim></div>
</f:verbatim> </f:verbatim>
</r:permissionEvaluator> </r:permissionEvaluator>
</a:panel> </a:panel>

View File

@@ -54,22 +54,29 @@
</r:permissionEvaluator> </r:permissionEvaluator>
</f:facet> </f:facet>
</h:panelGroup> </h:panelGroup>
<a:panel label="#{msg.properties}" facetsId="dialog:dialog-body:ml-props-panel-facets" id="ml-properties-panel" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" <a:panel label="#{msg.properties}" facetsId="dialog:dialog-body:ml-props-panel-facets" id="ml-properties-panel" progressive="true"
expanded='#{DialogManager.bean.panels["ml-properties-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}"> border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
expanded='#{DialogManager.bean.panels["ml-properties-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
<h:outputText styleClass="nodeWorkflowInfoTitle" /> <h:outputText styleClass="nodeWorkflowInfoTitle" />
<r:propertySheetGrid id="ml-container-props-sheet" value="#{DialogManager.bean.document}" var="mlContainerProps" columns="1" labelStyleClass="propertiesLabel" externalConfig="true" cellpadding="2" cellspacing="2" mode="view" /> <r:propertySheetGrid id="ml-container-props-sheet" value="#{DialogManager.bean.document}"
var="mlContainerProps" columns="1" labelStyleClass="propertiesLabel"
externalConfig="true" cellpadding="2" cellspacing="2" mode="view" />
</a:panel> </a:panel>
<f:verbatim> <f:verbatim>
<div style="padding: 4px"></div> <div style="padding: 4px"></div>
</f:verbatim> </f:verbatim>
<%-- list of translations --%> <%-- list of translations --%>
<a:panel label="#{msg.translations}" id="ml-translation-panel" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" expanded='#{DialogManager.bean.panels["ml-translation-panel"]}' <a:panel label="#{msg.translations}" id="ml-translation-panel" progressive="true"
expandedActionListener="#{DialogManager.bean.expandPanel}"> border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted"
titleBgcolor="white" expanded='#{DialogManager.bean.panels["ml-translation-panel"]}'
expandedActionListener="#{DialogManager.bean.expandPanel}">
<a:richList id="TranslationList" viewMode="details" value="#{DialogManager.bean.translations}" var="r" styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%" pageSize="10" initialSortColumn="Name" <a:richList id="TranslationList" viewMode="details" value="#{DialogManager.bean.translations}" var="r"
initialSortDescending="false"> styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
altRowStyleClass="recordSetRowAlt" width="100%" pageSize="10" initialSortColumn="Name"
initialSortDescending="false">
<%-- Icon details view mode --%> <%-- Icon details view mode --%>
<a:column id="col20" primary="true" width="20" style="padding:2px;"> <a:column id="col20" primary="true" width="20" style="padding:2px;">
@@ -105,7 +112,7 @@
Start the new edition wizard from this translation Start the new edition wizard from this translation
--%> --%>
<h:outputText id="space" value=" " /> <h:outputText id="space" value=" " />
<a:actionLink id="new-edition-from" value="#{msg.new_edition}" action="wizard:newEditionFrom" actionListener="#{NewEditionWizard.skipFirstStep}" rendered="#{r.notEmpty && r.userHasRight}"> <a:actionLink id="new-edition-from" value="#{msg.new_edition}" action="wizard:newEditionFrom" actionListener="#{NewEditionWizard.skipFirstStep}" rendered="#{r.userHasRight}">
<f:param id="par1" name="lang" value="#{r.language}" /> <f:param id="par1" name="lang" value="#{r.language}" />
</a:actionLink> </a:actionLink>
</a:column> </a:column>
@@ -113,14 +120,18 @@
<a:dataPager id="pager" styleClass="pager" /> <a:dataPager id="pager" styleClass="pager" />
</a:richList> </a:richList>
</a:panel> </a:panel>
<f:verbatim> <f:verbatim>
<div style="padding: 4px"></div> <div style="padding: 4px"></div>
</f:verbatim> </f:verbatim>
<%-- <%--
Editions details Editions details
--%> --%>
<a:panel label="#{msg.editions}" id="ml-editions-panel" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" expanded='#{DialogManager.bean.panels["ml-editions-panel"]}' <a:panel label="#{msg.editions}" id="ml-editions-panel" progressive="true"
expandedActionListener="#{DialogManager.bean.expandPanel}"> border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted"
titleBgcolor="white" expanded='#{DialogManager.bean.panels["ml-editions-panel"]}'
expandedActionListener="#{DialogManager.bean.expandPanel}">
<a:richList id="EditionTitle" viewMode="details" value="#{DialogManager.bean.emptyListAndInitEditions}" var="ed" styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%" initialSortDescending="true"> <a:richList id="EditionTitle" viewMode="details" value="#{DialogManager.bean.emptyListAndInitEditions}" var="ed" styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%" initialSortDescending="true">
@@ -198,10 +209,13 @@
<div style="padding-left: 25"> <div style="padding-left: 25">
</f:verbatim> </f:verbatim>
<a:panel label="#{msg.related_content}" id="ml-versions-panel${idx}" progressive="true" expanded="false" expandedActionListener="#{DialogManager.bean.expandPanel}" styleClass="nodeWorkflowInfoTitle"> <a:panel label="#{msg.related_content}" id="ml-versions-panel${idx}" progressive="true" expanded="false"
expandedActionListener="#{DialogManager.bean.expandPanel}" styleClass="nodeWorkflowInfoTitle">
<a:richList id="ml-versions-list${idx}" viewMode="details" value="#{DialogManager.bean.currentSingleEditionBean.translations}" var="tr" styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%" <a:richList id="ml-versions-list${idx}" viewMode="details" value="#{DialogManager.bean.currentSingleEditionBean.translations}"
pageSize="10" initialSortColumn="versionName" initialSortDescending="true" style="padding-left:12px;padding-top:10px;"> var="tr" styleClass="recordSet" headerStyleClass="recordSetHeader"
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
pageSize="10" initialSortColumn="versionName" initialSortDescending="true" style="padding-left:12px;padding-top:10px;">
<%-- Icon details view mode --%> <%-- Icon details view mode --%>
<a:column id="column-view-mode${idx}" primary="true" width="20" style="padding:2px;"> <a:column id="column-view-mode${idx}" primary="true" width="20" style="padding:2px;">
@@ -275,7 +289,7 @@
<%-- Document Actions --%> <%-- Document Actions --%>
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="text-align:center" progressive="true" expanded='#{DialogManager.bean.panels["actions-panel"]}' <a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="text-align:center" progressive="true" expanded='#{DialogManager.bean.panels["actions-panel"]}'
expandedActionListener="#{DialogManager.bean.expandPanel}"> expandedActionListener="#{DialogManager.bean.expandPanel}">
<r:actions id="actions_doc" value="multilingual_details_actions" context="#{DialogManager.bean.document}" verticalSpacing="3" style="white-space:nowrap" /> <r:actions id="actions_doc" value="multilingual_details_actions" context="#{DialogManager.bean.documentMlContainer}" verticalSpacing="3" style="white-space:nowrap" />
</a:panel><f:verbatim> </a:panel><f:verbatim>
</td> </td>
</tr> </tr>