<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>

<%@ page import = "org.apache.turbine.util.RunData" %>
<%@ page import = "org.apache.jetspeed.services.resources.JetspeedResources" %>

<%
RunData data = (RunData) request.getAttribute("rundata");                 
%>

<div>     
  <table cellspacing="0" border="0" width="100%">
    <tr valign="middle">
      <%
      //
      // Display the welcome message.  This is typicaly where a Banner AD is displayed
      //
      %>
      <td align="center">
        <h2><jetspeed:l10n key="TOP_TITLE"/></h2>
      </td>
      <%
      //
      // Right column of top navigation bar. Here we are displaying the
      // user's name, link(s) to page customizers, link to account editor, logout
      //
      %>
      <td align="right" valign="bottom" width="30%" >
        <table cellpadding="0" cellspacing="0" border="0" >
          <tr>
            <td align="right" style="font-size:10">
              <jetspeed:l10n key="TOP_USERWELCOMEMSG"/> <b><%=data.getUser().getFirstName()%> <%=data.getUser().getLastName()%></b>
            </td>
            <td>&nbsp;</td>
          </tr>
          <%if( JetspeedResources.getBoolean("topnav.my_pages.enable") == true) { %>          
          <tr>
            <td align="right" style="font-size:10">
              <jetspeed:l10n key="PSML_MANAGER_MY_PAGES"/> <jetspeed:parameterStyle name="mypages" style="MyPagesListBox"/>
            </td>
          </tr>
          <%}%>
          <tr>
            <td align="right"  style="font-size:10">
              <jetspeed:l10n key="TOP_CUSTOMIZE"/>: 
              <a href="<jetspeed:uriLookup type="Customize"/>" style="font-size:10"><jetspeed:l10n key="TOP_LOGGEDIN_HTML_JSP"/></a>
              <a href="<jetspeed:uriLookup type="Customize"/>&mtype=wml"  style="font-size:10"><jetspeed:l10n key="TOP_LOGGEDIN_WML_JSP"/></a>
            </td>
          </tr>
          <tr>
            <td align="right" style="font-size:10">
              <a href="<jetspeed:uriLookup type="EditAccount"/>" style="font-size:10"><jetspeed:l10n key="TOP_EDITACCOUNT"/> <%=data.getUser().getUserName()%></a>
            </td>
          </tr>
          <tr>
            <td align="right" style="font-size:10">
              <a href="<jetspeed:uriLookup type="Logout"/>" style="font-size:10"><jetspeed:l10n key="TOP_LOGOUT"/></a>
            </td>
          </tr>
          <%
          // Leave space between last line and content
          %>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>