Author: thomas.heute(a)jboss.com
Date: 2008-06-16 05:12:16 -0400 (Mon, 16 Jun 2008)
New Revision: 11055
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
Log:
JBPORTAL-2042: Error when trying to preview a binary file submitted for approval
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2008-06-16
08:29:31 UTC (rev 11054)
+++
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2008-06-16
09:12:16 UTC (rev 11055)
@@ -413,13 +413,31 @@
if (manageWorkflowAccessible.booleanValue())
{
%>
- <td>
+ <td>
+ <%
+ if (cour.getMimeType().equals("text/html") ||
cour.getMimeType().equals("text/plain"))
+ {
+ %>
<a href="<portlet:renderURL>
<portlet:param name="op" value="<%=
CMSAdminConstants.OP_VIEWPENDINGPREVIEW %>"/>
<portlet:param name="pid"
value="<%=cour.getProcessId()%>"/>
<portlet:param name="path"
value="<%=sCurrPath%>"/>
<portlet:param name="contentPath"
value="<%=cour.getPath()%>"/>
</portlet:renderURL>">${n:i18n("CMS_PREVIEW")}</a>
+
+ <% }
+ else
+ {
+ //save the principal for the preview servlet
+ String remoteUser = request.getRemoteUser();
+ request.getSession().setAttribute("remoteUser", remoteUser);
+ %>
+ <a target="_blank"
+ href="<%= request.getContextPath() %>/cmspreview?pid=<%=
cour.getProcessId() %>&p=<%= cour.getPath()
%>">${n:i18n("CMS_PREVIEW")}</a>
+ <%
+ }
+ %>
+
<a href="<portlet:actionURL>
<portlet:param name="op"
value="<%=CMSAdminConstants.OP_APPROVE%>"/>
Show replies by date