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

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

<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.
      // Optionally allow user login. Required for user creation
      // Optionally allow user creation.
      //
      %>
      <%if( JetspeedResources.getBoolean("topnav.user_login.enable") == true) { %>
      <td align="right" valign="bottom" width="30%">
        <form method="POST" action="<jetspeed:dynamicUri/>" enctype="application/x-www-form-urlencoded">
          <input name="action" type="hidden" value="<%=JetspeedResources.getString("action.login")%>">
          <table border="0" cellspacing="2" cellpadding="0">
            <tr>
              <td style="font-size:10"><jetspeed:l10n key="USERFORM_USERNAMEMSG"/></td>
              <td>
                <input value="" name="username" maxlength="25" type="text" tabindex="1" style="font-size:10">
              </td>
              <td rowspan="2" align="center">
                <input name="submit" type="submit" value="<jetspeed:l10n key="USERFORM_LOGIN"/>" tabindex="4"  style="font-size:10" />
              </td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td style="font-size:10"><jetspeed:l10n key="USERFORM_PASSWORDMSG"/></td>
              <td>
                <input value="" name="password" maxlength="25" type="password" tabindex="2" style="font-size:10">
              </td>
            </tr>
            <%if ( JetspeedResources.getBoolean("automatic.logon.enable") == true ) {%>
            <tr>
              <td style="font-size:10" colspan="2">
                <input name="rememberme" value="true" type="checkbox" tabindex="3" /><jetspeed:l10n key="USERFORM_REMEMBERME"/>
              </td>
            </tr>
            <%}%>
            <tr>
              <td align="center" colspan="3">
                <%if( JetspeedResources.getBoolean("topnav.user_creation.enable") == true &&
                      JetspeedResources.getBoolean("newuser.confirm.enable") == true ) { %>
                <a href="<jetspeed:link template="NewAccount"/>" style="font-size:10"><jetspeed:l10n key="TOP_CREATENEWACCOUNT"/></a>
                &nbsp;|&nbsp;
                <%}%>
                <a href="<jetspeed:link template="LoginHelp"/>" style="font-size:10"><jetspeed:l10n key="TOP_LOGINHELP"/></a>
              </td>
            </tr>
            <%
            // Leave space between last line and content
            %>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table>
        </form>
      </td>
      <%}%>
    </tr>
  </table>
 </div>
