Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
html
html
<td width="50%"align="left"><img src="images/o3portal.gif" width="104" height="75"></td>

Recordar agregar la imagen en la carpeta <O3>/jboss/server/default/deploy/gserver/0o3.ear/o3portal.war/images

...

salvamos y re-iniciamos el server

Seleccionar un theme según el usuario que ingresa al sistema

El siguiente código muestra como seleccionar el theme según el login name del usuario.

Code Block
title<O3>/jboss/server/default/deploy/gserver/0o3.ear/o3portal.war/i18n- init.jsp

<%
	//initialize the theme
	String theme = csApplication.getContext().getProperty("ideasoft.themes.defaultTheme", "red");
	session.setAttribute(THEME_SESSION_ATTRIBUTE, theme);
	session.setAttribute(THEME_PATH_SESSION_ATTRIBUTE, "/themes/" + theme);
%>

REEMPLAZAR POR:

<%
	//initialize the theme
	String login = csClient.getUserLogin();
	String theme;
	if ("user".equals(login)) {
		theme = "red";
	} else if ("admin".equals(login)) {
		theme = "blue";
	} else {
		theme = csApplication.getContext().getProperty("ideasoft.themes.defaultTheme", "red");
	}
	session.setAttribute(THEME_SESSION_ATTRIBUTE, theme);
	session.setAttribute(THEME_PATH_SESSION_ATTRIBUTE, "/themes/" + theme);
%>