Author: thomas.heute(a)jboss.com
Date: 2007-04-26 05:42:59 -0400 (Thu, 26 Apr 2007)
New Revision: 7063
Modified:
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
Log:
Fixed typo
Fixed Dashboard link on dashboard (linking to default portal)
Modified:
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2007-04-26
09:20:47 UTC (rev 7062)
+++
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2007-04-26
09:42:59 UTC (rev 7063)
@@ -177,6 +177,14 @@
Controller controller = controllerCtx.getController();
User user = controllerCtx.getUser();
request.setAttribute("org.jboss.portal.header.USER", user);
+
+ if (user == null)
+ {
+ URLContext ctx =
controllerCtx.getServerInvocation().getServerContext().getURLContext();
+ ctx = URLContext.newInstance(ctx.isSecure(), true);
+ String loginURL = controllerCtx.renderURL(cc, ctx, null);
+ request.setAttribute("org.jboss.portal.header.LOGIN_URL",
loginURL);
+ }
// Edit dashboard page || Copy to dashboard link
boolean isDashboard = false;
@@ -194,7 +202,7 @@
PortletParametersStateString navState = new
PortletParametersStateString();
navState.setValue("editPageSelect", pageName);
InvokePortletInstanceRenderCommand command = new
InvokePortletInstanceRenderCommand("DashboardConfigPortletInstance", navState);
-
request.setAttribute("org.jboss.portal.header.EDIT_DASDHBOARD_URL",
controllerCtx.renderURL(command, null, null));
+
request.setAttribute("org.jboss.portal.header.EDIT_DASHBOARD_URL",
controllerCtx.renderURL(command, null, null));
}
else
{
@@ -252,7 +260,7 @@
{
// Link to default page of default portal
ViewPageCommand _rpc = new ViewPageCommand(new PortalObjectId(new
String[]{"default", "default"}));
- request.setAttribute("org.jboss.portal.header.DASHBOARD_URL",
controllerCtx.renderURL(_rpc, null, null));
+ request.setAttribute("org.jboss.portal.header.DEFAULT_PORTAL_URL",
controllerCtx.renderURL(_rpc, null, null));
}
//
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2007-04-26
09:20:47 UTC (rev 7062)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2007-04-26
09:42:59 UTC (rev 7063)
@@ -3,9 +3,10 @@
<%
User user = (User) request.getAttribute("org.jboss.portal.header.USER");
String dashboardURL = (String)
request.getAttribute("org.jboss.portal.header.DASHBOARD_URL");
+ String loginURL = (String)
request.getAttribute("org.jboss.portal.header.LOGIN_URL");
String defaultPortalURL = (String)
request.getAttribute("org.jboss.portal.header.DEFAULT_PORTAL_URL");
String adminPortalURL = (String)
request.getAttribute("org.jboss.portal.header.ADMIN_PORTAL_URL");
- String editDashboardURL = (String)
request.getAttribute("org.jboss.portal.header.EDIT_DASDHBOARD_URL");
+ String editDashboardURL = (String)
request.getAttribute("org.jboss.portal.header.EDIT_DASHBOARD_URL");
String copyToDashboardURL = (String)
request.getAttribute("org.jboss.portal.header.COPY_TO_DASHBOARD_URL");
String signOutURL = (String)
request.getAttribute("org.jboss.portal.header.SIGN_OUT_URL");
%>
@@ -14,7 +15,7 @@
if (user == null)
{
%>
- <a href="/portal/auth/portal/default/default">Login</a>
+ <a href="<%= loginURL %>">Login</a>
<%
}
else
Show replies by date