⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 top.vm

📁 jetspeed源代码
💻 VM
字号:
#*
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*#

##
## Calculate the URI for the logo
##
#if ($config.getString("topnav.logo.file"))
  #set ($LogoFile = $config.getString("topnav.logo.file"))
  #set ($BgImage = $config.getString("topnav.bg.image"))
  #set ($BgColor = $config.getString("topnav.bg.color"))
  #set ($FontFace = $config.getString("topnav.font.face"))
  #set ($FontSize = $config.getString("topnav.font.size"))
  #set ($FontColor = $config.getString("topnav.font.color"))
  #set ($LogoURI = $clink.setURI("$LogoFile").Absolute)
#else
  #set ($LogoURI = $config.getString("topnav.logo.url"))
  #set ($BgImage = $config.getString("topnav.bg.image"))
  #set ($BgColor = $config.getString("topnav.bg.color"))
  #set ($FontFace = $config.getString("topnav.font.face"))
  #set ($FontSize = $config.getString("topnav.font.size"))
  #set ($FontColor = $config.getString("topnav.font.color"))
#end

#if($FontColor && $FontColor != "")
  #set($FontStyle="style=color:$FontColor; ")
#end 
#if(($FontSize && $FontColor) && ($FontSize!="" && $FontColor!=""))
  #set($FontStyle="style=color:$FontColor; font-size:$FontSize;") 
#elseif ($FontSize && $FontSize !="") 
  #set($FontStyle="style=font-size:$FontSize;")
#else
  #set($FontStyle="style=font-size:10;")
#end


<div>
#if ($data.User.hasLoggedIn())
##
## This is the top naviation bar displayed for a logged in user
##
  <table cellspacing="0" border="0" width="100%" #if($BgColor && $BgColor!="") bgcolor="$BgColor" #end #if($BgImage && $BgImage!="") background="$BgImage" #end>
    <tr valign="middle">
      ##
      ## Display the company logo with link back to the the portal home page
      ##
      <td align="left" width="30%">
        <a href="$jslink.HomePage">
          <img border="0" alt="$l10n.HOME" src="$LogoFile">
        </a>
      </td>
      ##
      ## Display the welcome message.  This is typicaly where a Banner AD is displayed
      ##
      <td align="center">
        <img src="images/welcome.gif">
      </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" $FontStyle>
              $l10n.TOP_USERWELCOMEMSG <b>$!data.User.FirstName $!data.User.LastName</b>
            </td>
            <td>&nbsp;</td>
          </tr>
          #if( $config.getBoolean("topnav.my_pages.enable") == true)
          <tr>
            <td align="right" $FontStyle>
              $l10n.PSML_MANAGER_MY_PAGES $jetspeed.getParameter($data, "MyPagesListBox", "mypages", "", "")
            </td>
          </tr>
          #end
          <tr>
            <td align="right"  $FontStyle>
              $l10n.TOP_CUSTOMIZE: 
              <a href="$jslink.setAction("controls.Customize").addQueryData("reset","on")" $FontStyle>HTML</a>
              <a href="$jslink.setAction("controls.Customize").addQueryData("reset","on").addQueryData("mtype","wml")"  $FontStyle>WML</a>
            </td>
          </tr>
          <tr>
            <td align="right" $FontStyle>
              <a href="$jslink.setTemplate("EditAccount")" $FontStyle>$l10n.TOP_EDITACCOUNT $data.User.UserName</a>
            </td>
          </tr>
          <tr>
            <td align="right" $FontStyle>
              <a href="$jslink.setAction($config.getString("action.logout"))" $FontStyle>$l10n.TOP_LOGOUT</a>
            </td>
          </tr>
          ## Leave space between last line and content
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
#else
##
## This is the top naviation bar displayed for the anonymous user, i.e. they are not logged in
##
  <table cellspacing="0" border="0" width="100%"  #if($BgColor && $BgColor!="") bgcolor="$BgColor"  #end #if($BgImage && $BgImage!="")  background="$BgImage" #end>
    <tr valign="middle">
      ##
      ## Display the company logo with link back to the the portal home page
      ##
      <td align="left" width="30%">
        <a href="$jslink.Template">
          <img border="0" alt="$l10n.HOME" src="$LogoFile">
        </a>
      </td>
      ##
      ## Display the welcome message.  This is typicaly where a Banner AD is displayed
      ##
      <td align="center">
         <img src="images/welcome.gif">
      </td>
      ##
      ## Right column of top navigation bar.
      ## Optionally allow user login. Required for user creation
      ## Optionally allow user creation.
      ##
      #if( $config.getBoolean("topnav.user_login.enable") == true)
      <td align="right" valign="bottom" width="30%">
        <form method="POST" action="$link" enctype="application/x-www-form-urlencoded">
          <input name="$jslink.ActionKey" type="hidden" value="$config.getString("action.login")">
          <table border="0" cellspacing="2" cellpadding="0">
            <tr>
              <td $FontStyle>$l10n.USERFORM_USERNAMEMSG</td>
              <td>
                <input value="" name="username" maxlength="25" type="text" tabindex="1" $FontStyle>
              </td>
              <td rowspan="2" align="center">
                <input name="submit" type="submit" value="$l10n.USERFORM_LOGIN" tabindex="4"  $FontStyle />
              </td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td $FontStyle>$l10n.USERFORM_PASSWORDMSG</td>
              <td>
                <input value="" name="password" maxlength="25" type="password" tabindex="2" $FontStyle>
              </td>
            </tr>
            #if ( $config.getBoolean("automatic.logon.enable") == true )
            <tr>
              <td $FontStyle colspan="2">
                <input name="rememberme" value="true" type="checkbox" tabindex="3" />$l10n.USERFORM_REMEMBERME
              </td>
            </tr>
            #end
            <tr>
              <td align="center" colspan="3">
                #if( $config.getBoolean("topnav.user_creation.enable") == true && $config.getBoolean("newuser.confirm.enable") == true)
                <a href="$jslink.setTemplate("NewAccount")" $FontStyle>$l10n.TOP_CREATENEWACCOUNT</a>
                &nbsp;|&nbsp;
                #end
                <a href="$jslink.setTemplate("LoginHelp")" $FontStyle>$l10n.TOP_LOGINHELP</a>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="3">
                <div $FontStyle>$l10n.TOP_TITLE</div>            
              </td>              
            </tr>
            ## Leave space between last line and content
            <tr>
              <td>&nbsp;</td>
            </tr>            
          </table>
        </form>
      </td>
      #end
    </tr>
  </table>
#end
</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -