Fix for ALFCOM-2298, ETHREEOH-1127 and ETWOTWO-859.

- Actions for applying/removing templates not applicable for locked documents
IE6 fixes for footer logo in JSF client.
Fix up of broken document-details custom view panel JSP tags/verbatim - since 3.0 dialog conversions.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14758 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2009-06-17 10:50:36 +00:00
parent 8b022f9e76
commit a8210b72eb
3 changed files with 60 additions and 13 deletions

View File

@@ -0,0 +1,45 @@
/*
* 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 org.alfresco.web.bean.repository.Node;
/**
* UI Action Evaluator - Proceed if the document is not locked.
*
* @author Kevin Roast
*/
public class UnlockedDocEvaluator extends BaseActionEvaluator
{
private static final long serialVersionUID = -3216759932698306123L;
/**
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
*/
public boolean evaluate(Node node)
{
return (node.isLocked() == false);
}
}

View File

@@ -350,7 +350,7 @@ public class PageTag extends TagSupport
final HttpServletRequest req = (HttpServletRequest)pageContext.getRequest();
PageTag.alfresco = ("<center><table style='margin: 0px auto;'><tr><td>" +
"<a href='" + ALF_URL + "'>" +
"<img style='vertical-align:middle;border-width:0px;' alt='' title='" + ALF_TEXT +
"<img style='vertical-align:middle;border-width:0px;' width='176' height='26' alt='' title='" + ALF_TEXT +
"' src='" + ("http".equals(req.getScheme()) ? ALF_LOGO_HTTP : ALF_LOGO_HTTPS) +
"'>" +"</a></td><td align='center'>" +
"<span class='footer'>" + ALF_COPY +

View File

@@ -42,8 +42,10 @@
<h:panelGroup id="dashboard-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalChange">
<r:actionInstanceEvaluator id="eval1" value="#{DialogManager.bean.document}" evaluatorClassName="org.alfresco.web.action.evaluator.UnlockedDocEvaluator">
<a:actionLink id="actModify" value="#{msg.modify}" action="dialog:applyDocTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" />
<a:actionLink id="actRemove" value="#{msg.remove}" actionListener="#{DialogManager.bean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" />
</r:actionInstanceEvaluator>
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>
@@ -52,15 +54,15 @@
<f:verbatim>
<table width=100% cellspacing=0 cellpadding=0 border=0>
<tr>
<td align=left></f:verbatim><r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalApply">
<td align=left></f:verbatim>
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalApply">
<a:actionLink id="actDashboard" value="#{msg.apply_template}" rendered="#{!DialogManager.bean.hasCustomView}" action="dialog:applyDocTemplate" />
</r:permissionEvaluator> <a:panel id="template-panel" rendered="#{DialogManager.bean.hasCustomView}">
<f:verbatim>
<div style="padding: 4px; border: 1px dashed #cccccc"><r:webScript id="webscript" scriptUrl="#{DialogManager.bean.webscriptUrl}" context="#{DialogManager.bean.document.nodeRef}"
rendered="#{DialogManager.bean.hasWebscriptView}" />
</f:verbatim>
</r:permissionEvaluator>
<a:panel id="template-panel" rendered="#{DialogManager.bean.hasCustomView}">
<f:verbatim><div style="padding: 4px; border: 1px dashed #cccccc"></f:verbatim>
<r:webScript id="webscript" scriptUrl="#{DialogManager.bean.webscriptUrl}" context="#{DialogManager.bean.document.nodeRef}" rendered="#{DialogManager.bean.hasWebscriptView}" />
<r:template id="dashboard" template="#{DialogManager.bean.templateRef}" model="#{DialogManager.bean.templateModel}" rendered="#{!DialogManager.bean.hasWebscriptView && DialogManager.bean.hasTemplateView}" />
</div>
<f:verbatim></div></f:verbatim>
</a:panel><f:verbatim></td>
</tr>
</table>