You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

templates.vm 18 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. #*
  2. * ============================================================================
  3. * The Apache Software License, Version 1.1
  4. * ============================================================================
  5. *
  6. * Copyright (C) 2000-2003 The Apache Software Foundation. All
  7. * rights reserved.
  8. *
  9. * Redistribution and use in source and binary forms, with or without modifica-
  10. * tion, are permitted provided that the following conditions are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright notice,
  13. * this list of conditions and the following disclaimer.
  14. *
  15. * 2. Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. *
  19. * 3. The end-user documentation included with the redistribution, if any, must
  20. * include the following acknowledgment: "This product includes software
  21. * developed by the Apache Software Foundation (http://www.apache.org/)."
  22. * Alternately, this acknowledgment may appear in the software itself, if
  23. * and wherever such third-party acknowledgments normally appear.
  24. *
  25. * 4. The names "Ant" and "Apache Software Foundation" must not be used to
  26. * endorse or promote products derived from this software without prior
  27. * written permission. For written permission, please contact
  28. * apache@apache.org.
  29. *
  30. * 5. Products derived from this software may not be called "Apache", nor may
  31. * "Apache" appear in their name, without prior written permission of the
  32. * Apache Software Foundation.
  33. *
  34. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  35. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  36. * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  37. * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  38. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
  39. * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  40. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  41. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  42. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  43. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  44. *
  45. * This software consists of voluntary contributions made by many individuals
  46. * on behalf of the Apache Software Foundation. For more information on the
  47. * Apache Software Foundation, please see <http://www.apache.org/>.
  48. *
  49. *#
  50. ## This is where the common macro's live
  51. #macro ( table $table)
  52. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  53. #foreach ( $items in $table.getChildren() )
  54. #if ($items.getName().equals("tr"))
  55. #tr ($items)
  56. #end
  57. #end
  58. </table>
  59. #end
  60. #macro ( tr $tr)
  61. <tr>
  62. #foreach ( $items in $tr.getChildren() )
  63. #if ($items.getName().equals("td"))
  64. #td ($items)
  65. #elseif ($items.getName().equals("th"))
  66. #th ($items)
  67. #end
  68. #end
  69. </tr>
  70. #end
  71. #macro ( td $value)
  72. #if ($value.getAttributeValue("colspan"))
  73. #set ($colspan = $value.getAttributeValue("colspan"))
  74. #else
  75. #set ($colspan = 1)
  76. #end
  77. #if ($value.getAttributeValue("rowspan"))
  78. #set ($rowspan = $value.getAttributeValue("rowspan"))
  79. #else
  80. #set ($rowspan = 1)
  81. #end
  82. <td colspan="$!colspan" rowspan="$!rowspan"
  83. valign="top" align="left">
  84. #if ($value.getText().length() != 0 || $value.hasChildren())
  85. $xmlout.outputString($value, true)
  86. #else
  87. &nbsp;
  88. #end
  89. </td>
  90. #end
  91. #macro ( th $value)
  92. #if ($value.getAttributeValue("colspan"))
  93. #set ($colspan = $value.getAttributeValue("colspan"))
  94. #else
  95. #set ($colspan = 1)
  96. #end
  97. #if ($value.getAttributeValue("rowspan"))
  98. #set ($rowspan = $value.getAttributeValue("rowspan"))
  99. #else
  100. #set ($rowspan = 1)
  101. #end
  102. <th colspan="$!colspan" rowspan="$!rowspan"
  103. valign="top" align="left">
  104. #if ($value.getText().length() != 0 || $value.hasChildren())
  105. $xmlout.outputString($value, true)
  106. #else
  107. &nbsp;
  108. #end
  109. </th>
  110. #end
  111. #macro ( projectanchor $name $value )
  112. #if ($value.startsWith("http://"))
  113. <a href="$value">$name</a>
  114. #elseif ($value.startsWith("/site"))
  115. <a href="http://jakarta.apache.org$value">$name</a>
  116. #else
  117. <a href="$relativePath$value">$name</a>
  118. #end
  119. #end
  120. #macro ( metaauthor $author $email )
  121. <meta name="author" content="$author">
  122. <meta name="email" content="$email">
  123. #end
  124. #macro ( image $value )
  125. #if ($value.getAttributeValue("width"))
  126. #set ($width=$value.getAttributeValue("width"))
  127. #end
  128. #if ($value.getAttributeValue("height"))
  129. #set ($height=$value.getAttributeValue("height"))
  130. #end
  131. #if ($value.getAttributeValue("align"))
  132. #set ($align=$value.getAttributeValue("align"))
  133. #end
  134. #if ($value.getAttributeValue("alt"))
  135. #set ($align=$value.getAttributeValue("alt"))
  136. #end
  137. <img src="$relativePath$value.getAttributeValue("src")"
  138. width="$!width" height="$!height" align="$!align" alt="$!alt">
  139. #end
  140. #macro ( source $value)
  141. <pre class="code">$escape.getText($value.getText())</pre>
  142. #end
  143. #macro ( makeTabs )
  144. <div class="tab">
  145. <table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
  146. <tr>
  147. #set ( $tabs = $project.getChild("body").getChildren("menusection"))
  148. #if ( $project.getChild("body").getChild("menusection") )
  149. #foreach ( $tab in $tabs )
  150. #set ($currentIndex = $root.getChild("properties").getChild("index").getAttributeValue("value") )
  151. #set ($index = $tab.getAttributeValue("index"))
  152. #set ($name = $tab.getAttributeValue("name"))
  153. #set ($link = $tab.getAttributeValue("href"))
  154. #if ( ($currentIndex && $currentIndex.trim().equals( $index )) || ((!$currentIndex) && $velocityCount == 1) )
  155. <td width="8"><img alt="" height="5" width="8" src="images/spacer.gif"></td><td valign="bottom">
  156. <table summary="selected tab" style="height: 1.5em" border="0" cellpadding="0" cellspacing="0">
  157. <tr>
  158. <td valign="top" width="5" bgcolor="$blue2"><img height="5" width="5" alt="" src="$relativePath/images/tabSel-left.gif"></td><td valign="middle" bgcolor="$blue2"><font color="$lightfg" size="2" face="Arial, Helvetica, Sans-serif"><b>$name</b></font></td><td valign="top" width="5" bgcolor="$blue2"><img height="5" width="5" alt="" src="$relativePath/images/tabSel-right.gif"></td>
  159. </tr>
  160. </table>
  161. </td>
  162. #else
  163. <td width="5"><img alt="" height="8" width="8" src="$relativePath/images/spacer.gif"></td><td valign="bottom">
  164. <table summary="non selected tab" style="height: 1.4em" border="0" cellpadding="0" cellspacing="0">
  165. <tr>
  166. <td valign="top" width="5" bgcolor="$blue4"><img height="5" width="5" alt="" src="$relativePath/images/tab-left.gif"></td><td valign="middle" bgcolor="$blue4"><a href="$relativePath$link"><font size="2" face="Arial, Helvetica, Sans-serif">$name</font></a></td><td valign="top" width="5" bgcolor="$blue4"><img height="5" width="5" alt="" src="$relativePath/images/tab-right.gif"></td>
  167. </tr>
  168. </table>
  169. </td>
  170. #end
  171. #end
  172. #else
  173. <td width="8"><img alt="" height="5" width="8" src="images/spacer.gif"></td><td valign="bottom">
  174. <table summary="selected tab" style="height: 1.5em" border="0" cellpadding="0" cellspacing="0">
  175. <tr>
  176. <td valign="top" width="5" bgcolor="$blue2"><img height="5" width="5" alt="" src="$relativePath/images/tabSel-left.gif"></td><td valign="middle" bgcolor="$blue2"><font color="$lightfg" size="2" face="Arial, Helvetica, Sans-serif"><b>Home</b></font></td><td valign="top" width="5" bgcolor="$blue2"><img height="5" width="5" alt="" src="$relativePath/images/tabSel-right.gif"></td>
  177. </tr>
  178. </table>
  179. </td>
  180. #end
  181. </tr>
  182. </table>
  183. </div>
  184. #end
  185. #macro ( makeMainNavigation )
  186. #set ( $tabs = $project.getChild("body").getChildren("menusection"))
  187. #if ( $project.getChild("body").getChild("menusection") )
  188. #set ( $currentIndex = $root.getChild("properties").getChild("index").getAttributeValue("value") )
  189. #if ( $currentIndex )
  190. #foreach ( $tab in $tabs )
  191. #set ($index = $tab.getAttributeValue("index"))
  192. #if ( $currentIndex.trim().equals( $index ) )
  193. #set ($menus = $tab.getChildren("menu"))
  194. #end
  195. #end
  196. #else
  197. #set ($menus = $project.getChild("body").getChild("menusection").getChildren("menu"))
  198. #end
  199. #else
  200. #set ($menus = $project.getChild("body").getChildren("menu"))
  201. #end
  202. #makeProject ( $menus )
  203. #end
  204. #macro ( makeProject $menus)
  205. <div class="menu"><ul>
  206. #foreach ( $menu in $menus )
  207. <li><font color="$blue1">$menu.getAttributeValue("name")</font>
  208. <ul>
  209. #foreach ( $item in $menu.getChildren() )
  210. #set ($name = $item.getAttributeValue("name"))
  211. #set ($current = $root.getChild("properties").getChild("title").getText() )
  212. <li>
  213. #if ( $current.trim().equals( $name ) )
  214. <span class="sel"><font color="$active">$name</font></span>
  215. #else
  216. #projectanchor($name $item.getAttributeValue("href"))
  217. #end
  218. </li>
  219. #end
  220. </ul>
  221. </li>
  222. #end
  223. </ul></div>
  224. #end
  225. #macro (header)
  226. <html>
  227. <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
  228. <head>
  229. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  230. <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
  231. <link type="text/css" href="$relativePath/page.css" rel="stylesheet">
  232. #set ($authors = $root.getChild("properties").getChildren("author"))
  233. #foreach ( $au in $authors )
  234. #metaauthor ( $au.getText() $au.getAttributeValue("email") )
  235. #end
  236. </head>
  237. <body text="$darkfg" bgcolor="$lightbg">
  238. <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0">
  239. <tr>
  240. <td nowrap="nowrap" valign="middle" bgcolor="$blue1" height="20"><img height="1" width="5" alt="" border="0" src="$relativePath/images/spacer.gif"><font size="2" face="Arial, Helvetica, Sans-serif"><script src="$relativePath/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td>
  241. </tr>
  242. <tr>
  243. <td bgcolor="$blue2" height="2"><img height="2" width="2" alt="" border="0" src="$relativePath/images/spacer.gif"></td>
  244. </tr>
  245. </table>
  246. <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0">
  247. <tr>
  248. <td bgcolor="$blue3"><a href="http://ant.apache.org/"><img border="0" alt="Apache Ant site" src="$relativePath/images/group-logo.gif"></a></td><td width="100%" align="center" bgcolor="$blue3"><a href="http://ant.apache.org/"><img alt="Apache Ant logo" border="0" src="$relativePath/images/project-logo.gif"></a></td><td valign="top" rowspan="2" bgcolor="$blue3">
  249. <form target="_blank" onsubmit="q.value = query.value + ' site:ant.apache.org'" action="http://www.google.com/search" method="get">
  250. <table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="$blue2">
  251. <tr>
  252. <td colspan="3"><img height="10" width="1" alt="" src="$relativePath/images/spacer.gif"></td>
  253. </tr>
  254. <tr>
  255. <td><img height="1" width="1" alt="" src="$relativePath/images/spacer.gif"></td><td nowrap="nowrap"><input name="q" type="hidden"><input size="15" id="query" type="text"><img height="1" width="5" alt="" src="$relativePath/images/spacer.gif"><input name="Search" value="Search" type="submit">
  256. <br>
  257. <font face="Arial, Helvetica, Sans-serif" size="2" color="white">
  258. the Apache Ant site
  259. </font></td><td><img height="1" width="1" alt="" src="$relativePath/images/spacer.gif"></td>
  260. </tr>
  261. <tr>
  262. <td><img alt="" border="0" height="10" width="9" src="$relativePath/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="$relativePath/images/spacer.gif"></td><td><img alt="" border="0" height="10" width="9" src="$relativePath/images/search-right.gif"></td>
  263. </tr>
  264. </table>
  265. </form>
  266. </td><td bgcolor="$blue3"><img height="10" width="10" alt="" src="$relativePath/images/spacer.gif"></td>
  267. </tr>
  268. <tr>
  269. <td valign="bottom" bgcolor="$blue3" colspan="2">
  270. #makeTabs()
  271. </td><td bgcolor="$blue3"><img alt="" width="1" height="1" src="$relativePath/images/spacer.gif"></td>
  272. </tr>
  273. <tr>
  274. <td bgcolor="$blue2" colspan="4"><img width="1" height="10" alt="" src="$relativePath/images/spacer.gif"></td>
  275. </tr>
  276. </table>
  277. <table summary="page content" bgcolor="$lightbg" width="100%" border="0" cellpadding="0" cellspacing="0">
  278. <tr>
  279. <td valign="top">
  280. <table summary="menu" border="0" cellspacing="0" cellpadding="0">
  281. <tr>
  282. <td rowspan="3" valign="top">
  283. <table summary="blue line" border="0" cellpadding="0" cellspacing="0">
  284. <tr>
  285. <td bgcolor="$blue3"><img width="10" height="1" alt="" src="$relativePath/images/spacer.gif"></td>
  286. </tr>
  287. <tr>
  288. <td bgcolor="$blue1"><font color="$blue2" size="4" face="Arial, Helvetica, Sans-serif">&nbsp;</font></td>
  289. </tr>
  290. <tr>
  291. <td bgcolor="$blue3"><img width="10" height="1" alt="" src="$relativePath/images/spacer.gif"></td>
  292. </tr>
  293. </table>
  294. </td><td bgcolor="$blue3"><img width="1" height="1" alt="" src="$relativePath/images/spacer.gif"></td><td valign="bottom" bgcolor="$blue2"><img width="10" height="10" alt="" src="$relativePath/images/spacer.gif"></td><td nowrap="nowrap" valign="top" bgcolor="$blue2">
  295. #makeMainNavigation()
  296. </td><td valign="bottom" bgcolor="$blue2"><img width="10" height="10" alt="" src="$relativePath/images/spacer.gif"></td><td bgcolor="$blue3"><img width="1" height="1" alt="" src="$relativePath/images/spacer.gif"></td>
  297. </tr>
  298. <tr>
  299. <td valign="bottom" align="left" colspan="2" rowspan="2" bgcolor="$blue2"><img height="10" width="10" border="0" alt="" src="$relativePath/images/menu-left.gif"></td><td bgcolor="$blue2"><img height="10" width="10" border="0" alt="" src="$relativePath/images/spacer.gif"></td><td valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="$blue2"><img height="10" width="10" border="0" alt="" src="$relativePath/images/menu-right.gif"></td>
  300. </tr>
  301. <tr>
  302. <td height="1" bgcolor="$blue3"><img width="1" height="1" alt="" src="$relativePath/images/spacer.gif"></td>
  303. </tr>
  304. </table>
  305. </td><td valign="top" width="100%">
  306. <table summary="content" width="100%" border="0" cellpadding="0" cellspacing="0">
  307. <tr>
  308. <td colspan="4" bgcolor="$blue3"><img width="10" height="1" alt="" src="$relativePath/images/spacer.gif"></td>
  309. </tr>
  310. <tr>
  311. <td align="left" width="10" bgcolor="$blue1"><img width="10" height="1" alt="" src="$relativePath/images/spacer.gif"></td><td align="left" width="50%" bgcolor="$blue1"><font color="$blue2" size="3" face="Arial, Helvetica, Sans-serif">
  312. &nbsp;
  313. </font><img width="10" height="8" alt="" src="$relativePath/images/spacer.gif"></td><td align="right" width="50%" bgcolor="$blue1"><font color="$blue2" size="3" face="Arial, Helvetica, Sans-serif">
  314. &nbsp;
  315. </font><img width="10" height="8" alt="" src="$relativePath/images/spacer.gif"></td><td width="10" bgcolor="$blue1"><img width="10" height="1" alt="" src="$relativePath/images/spacer.gif"></td>
  316. </tr>
  317. <tr>
  318. <td colspan="4" bgcolor="$blue3"><img width="10" height="1" alt="" src="$relativePath/images/spacer.gif"></td>
  319. </tr>
  320. <tr>
  321. <td align="left" width="10"><img width="10" height="1" alt="" src="$relativePath/images/spacer.gif"></td><td align="left" width="100%">
  322. <div class="content">
  323. #end
  324. #macro (footer)
  325. </div>
  326. </td><td width="10"><img width="10" height="4" alt="" src="$relativePath/images/spacer.gif"></td>
  327. </tr>
  328. </table>
  329. </td>
  330. </tr>
  331. </table>
  332. <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0">
  333. <tr>
  334. <td colspan="2" height="1" bgcolor="$blue2"><img height="1" width="1" alt="" src="$relativePath/images/spacer.gif"><a href="$relativePath/images/label.gif"></a><a href="$relativePath/images/page.gif"></a><a href="$relativePath/images/chapter.gif"></a><a href="$relativePath/images/chapter_open.gif"></a><a href="$relativePath/images/current.gif"></a><a href="/favicon.ico"></a></td>
  335. </tr>
  336. <tr>
  337. <td colspan="2" bgcolor="$blue1" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy; 2000-2003&nbsp;The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!--
  338. document.write(" - "+"Last Published: " + document.lastModified);
  339. // --></script></font></td>
  340. </tr>
  341. </table>
  342. </body>
  343. </html>
  344. #end