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 14 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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. #if ($table.getAttributeValue("class"))
  53. #set ($class = $table.getAttributeValue("class"))
  54. #else
  55. #set ($class = "ForrestTable")
  56. #end
  57. <table class="$!class" cellspacing="1" cellpadding="4">
  58. #foreach ( $items in $table.getChildren() )
  59. #if ($items.getName().equals("tr"))
  60. #tr ($items)
  61. #end
  62. #end
  63. </table>
  64. #end
  65. #macro ( tr $tr)
  66. <tr>
  67. #foreach ( $items in $tr.getChildren() )
  68. #if ($items.getName().equals("td"))
  69. #td ($items)
  70. #elseif ($items.getName().equals("th"))
  71. #th ($items)
  72. #end
  73. #end
  74. </tr>
  75. #end
  76. #macro ( td $value)
  77. #if ($value.getAttributeValue("colspan"))
  78. #set ($colspan = $value.getAttributeValue("colspan"))
  79. #else
  80. #set ($colspan = 1)
  81. #end
  82. #if ($value.getAttributeValue("rowspan"))
  83. #set ($rowspan = $value.getAttributeValue("rowspan"))
  84. #else
  85. #set ($rowspan = 1)
  86. #end
  87. <td colspan="$!colspan" rowspan="$!rowspan"
  88. valign="top" align="left">
  89. #if ($value.getText().length() != 0 || $value.hasChildren())
  90. $xmlout.outputString($value, true)
  91. #else
  92. &nbsp;
  93. #end
  94. </td>
  95. #end
  96. #macro ( th $value)
  97. #if ($value.getAttributeValue("colspan"))
  98. #set ($colspan = $value.getAttributeValue("colspan"))
  99. #else
  100. #set ($colspan = 1)
  101. #end
  102. #if ($value.getAttributeValue("rowspan"))
  103. #set ($rowspan = $value.getAttributeValue("rowspan"))
  104. #else
  105. #set ($rowspan = 1)
  106. #end
  107. <th colspan="$!colspan" rowspan="$!rowspan"
  108. valign="top" align="left">
  109. #if ($value.getText().length() != 0 || $value.hasChildren())
  110. $xmlout.outputString($value, true)
  111. #else
  112. &nbsp;
  113. #end
  114. </th>
  115. #end
  116. #macro ( projectanchor $name $value )
  117. #if ($value.startsWith("http://"))
  118. <a href="$value">$name</a>
  119. #elseif ($value.startsWith("/site"))
  120. <a href="http://jakarta.apache.org$value">$name</a>
  121. #else
  122. <a href="$relativePath$value">$name</a>
  123. #end
  124. #end
  125. #macro ( metaauthor $author $email )
  126. <meta name="author" content="$author">
  127. <meta name="email" content="$email">
  128. #end
  129. #macro ( image $value )
  130. #if ($value.getAttributeValue("width"))
  131. #set ($width=$value.getAttributeValue("width"))
  132. #end
  133. #if ($value.getAttributeValue("height"))
  134. #set ($height=$value.getAttributeValue("height"))
  135. #end
  136. #if ($value.getAttributeValue("align"))
  137. #set ($align=$value.getAttributeValue("align"))
  138. #end
  139. #if ($value.getAttributeValue("alt"))
  140. #set ($align=$value.getAttributeValue("alt"))
  141. #end
  142. <img src="$relativePath$value.getAttributeValue("src")"
  143. width="$!width" height="$!height" align="$!align" alt="$!alt">
  144. #end
  145. #macro ( source $value)
  146. <pre class="code">$escape.getText($value.getText())</pre>
  147. #end
  148. #macro ( makeTabs )
  149. <div class="tab">
  150. <table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
  151. <tr>
  152. #set ( $tabs = $project.getChild("body").getChildren("menusection"))
  153. #if ( $project.getChild("body").getChild("menusection") )
  154. #foreach ( $tab in $tabs )
  155. #set ($currentIndex = $root.getChild("properties").getChild("index").getAttributeValue("value") )
  156. #set ($index = $tab.getAttributeValue("index"))
  157. #set ($name = $tab.getAttributeValue("name"))
  158. #set ($link = $tab.getAttributeValue("href"))
  159. #if ( ($currentIndex && $currentIndex.trim().equals( $index )) || ((!$currentIndex) && $velocityCount == 1) )
  160. <td width="8"><img alt="" height="5" width="8" src="$relativePath/images/spacer.gif"></td><td valign="bottom">
  161. <table summary="selected tab" style="height: 1.5em" border="0" cellpadding="0" cellspacing="0">
  162. <tr>
  163. <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>
  164. </tr>
  165. </table>
  166. </td>
  167. #else
  168. <td width="5"><img alt="" height="8" width="8" src="$relativePath/images/spacer.gif"></td><td valign="bottom">
  169. <table summary="non selected tab" style="height: 1.4em" border="0" cellpadding="0" cellspacing="0">
  170. <tr>
  171. <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>
  172. </tr>
  173. </table>
  174. </td>
  175. #end
  176. #end
  177. #else
  178. <td width="8"><img alt="" height="5" width="8" src="$relativePath/images/spacer.gif"></td><td valign="bottom">
  179. <table summary="selected tab" style="height: 1.5em" border="0" cellpadding="0" cellspacing="0">
  180. <tr>
  181. <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>
  182. </tr>
  183. </table>
  184. </td>
  185. #end
  186. </tr>
  187. </table>
  188. </div>
  189. #end
  190. #macro ( makeMainNavigation )
  191. #set ( $tabs = $project.getChild("body").getChildren("menusection"))
  192. #if ( $project.getChild("body").getChild("menusection") )
  193. #set ( $currentIndex = $root.getChild("properties").getChild("index").getAttributeValue("value") )
  194. #if ( $currentIndex )
  195. #foreach ( $tab in $tabs )
  196. #set ($index = $tab.getAttributeValue("index"))
  197. #if ( $currentIndex.trim().equals( $index ) )
  198. #set ($menus = $tab.getChildren("menu"))
  199. #end
  200. #end
  201. #else
  202. #set ($menus = $project.getChild("body").getChild("menusection").getChildren("menu"))
  203. #end
  204. #else
  205. #set ($menus = $project.getChild("body").getChildren("menu"))
  206. #end
  207. #makeProject ( $menus )
  208. #end
  209. #macro (makeProject $menus)
  210. <div class="menucontainer">
  211. <div class="menu">
  212. <ul>
  213. #foreach ( $menu in $menus )
  214. <li class="menuheader">$menu.getAttributeValue("name")
  215. <ul>
  216. #foreach ( $item in $menu.getChildren() )
  217. #set ($name = $item.getAttributeValue("name"))
  218. #set ($current = $root.getChild("properties").getChild("title").getText() )
  219. <li>
  220. #if ( $current.trim().equals( $name ) )
  221. <span class="sel">$name</span>
  222. #else
  223. #projectanchor($name $item.getAttributeValue("href"))
  224. #end
  225. </li>
  226. #end
  227. </ul>
  228. </li>
  229. #end
  230. </ul>
  231. </div>
  232. <img style="float: left" height="10" width="10" border="0" alt="" src="$relativePath/images/menu-left.gif">
  233. <img style="float: right" height="10" width="10" border="0" alt="" src="$relativePath/images/menu-right.gif">
  234. </div>
  235. #end
  236. #macro (header)
  237. <html lang="en">
  238. <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
  239. <head>
  240. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  241. <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
  242. <link type="text/css" href="$relativePath/page.css" rel="stylesheet">
  243. #set ($authors = $root.getChild("properties").getChildren("author"))
  244. #foreach ( $au in $authors )
  245. #metaauthor ( $au.getText() $au.getAttributeValue("email") )
  246. #end
  247. </head>
  248. <body>
  249. <p class="navpath">
  250. <script src="$relativePath/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  251. </p>
  252. <div class="logobar">
  253. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  254. <tr>
  255. <td align="left"><img border="0" alt="Apache Ant site" src="$relativePath/images/group-logo.gif"></td>
  256. <td align="center" width="100%"><img alt="Apache Ant logo" border="0" src="$relativePath/images/project-logo.gif"></td>
  257. <td align="right">
  258. <form target="_blank" onsubmit="q.value = query.value + ' site:ant.apache.org'" action="http://www.google.com/search" method="get">
  259. <table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="$blue2">
  260. <tr>
  261. <td colspan="3"><img height="10" width="1" alt="" src="$relativePath/images/spacer.gif"></td>
  262. </tr>
  263. <tr>
  264. <td><img height="1" width="1" alt="" src="$relativePath/images/spacer.gif"></td>
  265. <td nowrap="nowrap" class="searchcaption">
  266. <input name="q" type="hidden">
  267. <input size="15" id="query" type="text">
  268. <img height="1" width="5" alt="" src="$relativePath/images/spacer.gif">
  269. <input name="Search" value="Search" type="submit">
  270. <br>
  271. the Apache Ant site
  272. </td>
  273. <td><img height="1" width="1" alt="" src="$relativePath/images/spacer.gif"></td>
  274. </tr>
  275. <tr>
  276. <td><img alt="" border="0" height="10" width="9" src="$relativePath/images/search-left.gif"></td>
  277. <td><img height="1" width="1" alt="" src="$relativePath/images/spacer.gif"></td>
  278. <td><img alt="" border="0" height="10" width="9" src="$relativePath/images/search-right.gif"></td>
  279. </tr>
  280. </table>
  281. </form>
  282. </td>
  283. </tr>
  284. </table>
  285. </div>
  286. #makeTabs()
  287. <div class="bluebar"></div>
  288. #makeMainNavigation()
  289. <div class="lightbluebar">&nbsp;</div>
  290. #end
  291. #macro (footer)
  292. <p class="copyright">
  293. Copyright &copy; 2000-2003&nbsp;The Apache Software Foundation. All rights reserved.
  294. <script type="text/javascript" language="JavaScript"><!--
  295. document.write(" - "+"Last Published: " + document.lastModified);
  296. // -->
  297. </script>
  298. </p>
  299. </body>
  300. </html>
  301. #end