Author: tfischer
Date: Sat Dec 10 03:35:29 2005
New Revision: 355742
URL: http://svn.apache.org/viewcvs?rev=355742&view=rev
Log:
Formatting of documentation generated by the generator is now done using css
style sheets
Modified:
db/torque/templates/trunk/src/templates/doc/html/datamodel.vm
db/torque/templates/trunk/src/templates/doc/html/table.vm
Modified: db/torque/templates/trunk/src/templates/doc/html/datamodel.vm
URL:
http://svn.apache.org/viewcvs/db/torque/templates/trunk/src/templates/doc/html/datamodel.vm?rev=355742&r1=355741&r2=355742&view=diff
==============================================================================
--- db/torque/templates/trunk/src/templates/doc/html/datamodel.vm (original)
+++ db/torque/templates/trunk/src/templates/doc/html/datamodel.vm Sat Dec 10
03:35:29 2005
@@ -1,39 +1,22 @@
-## Copyright 2001-2005 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.
#set ( $database = $dataModel )
<html>
<header>
<title>$dataModel.name</title>
- <style>
- .normalFont {
- $docHtmlNormalFont
- }
- </style>
+ <link rel="stylesheet" type="text/css" href="dataModel.css">
</header>
<body class="normalFont">
- <table border="1" cellspacing="0" cellpadding="0">
- <tr bgcolor="#CCCCCC">
- <th class="normalFont">Table Name</th>
- <th class="normalFont">OM Class</th>
- <th class="normalFont">Description</th>
+ <table class="summarytable">
+ <tr class=summaryhead">
+ <th class="summaryheadbackground summaryborder
summaryheadtablename">Table Name</th>
+ <th class="summaryheadbackground summaryborder summaryheadjavaname">OM
Class</th>
+ <th class="summaryheadbackground summaryborder
summaryheaddescription">Description</th>
</tr>
#foreach ($tbl in $database.tables)
- <tr>
- <td class="normalFont"><a href="#$tbl.Name">$tbl.Name</a></td>
- <td class="normalFont">$tbl.JavaName</td>
- <td class="normalFont">#if ($tbl.Description) $tbl.Description#else
#end</td>
+ <tr class=summaryrow">
+ <td class="summarybackground summaryborder summarytablename"><a
href="#$tbl.Name" class="link summarytablenamelink">$tbl.Name</a></td>
+ <td class="summarybackground summaryborder
summaryjavaname">$tbl.JavaName</td>
+ <td class="summarybackground summaryborder summarydescription">#if
($tbl.Description) $tbl.Description#else #end</td>
</tr>
#end
</table>
Modified: db/torque/templates/trunk/src/templates/doc/html/table.vm
URL:
http://svn.apache.org/viewcvs/db/torque/templates/trunk/src/templates/doc/html/table.vm?rev=355742&r1=355741&r2=355742&view=diff
==============================================================================
--- db/torque/templates/trunk/src/templates/doc/html/table.vm (original)
+++ db/torque/templates/trunk/src/templates/doc/html/table.vm Sat Dec 10
03:35:29 2005
@@ -15,41 +15,31 @@
<h2>$table.Name</h2>
$!table.Description
<p/>
-<table border="1" cellspacing="0">
- <tr>
- <th class="normalFont" bgcolor="#CCCCCC">Name</th>
- <th class="normalFont" bgcolor="#CCCCCC">Type</th>
- <th class="normalFont" bgcolor="#CCCCCC">Size</th>
- <th class="normalFont" bgcolor="#CCCCCC">Default</th>
- <th class="normalFont" bgcolor="#CCCCCC">JavaName</th>
- <th class="normalFont" bgcolor="#CCCCCC">PK</th>
- <th class="normalFont" bgcolor="#CCCCCC">FK</th>
- <th class="normalFont" bgcolor="#CCCCCC">not null</th>
- <th class="normalFont" bgcolor="#CCCCCC">Description</th>
+<table class="detailtable">
+ <tr class="detailhead">
+ <th class="detailheadbackground detailborder detailheadname">Name</th>
+ <th class="detailheadbackground detailborder detailheadtype">Type</th>
+ <th class="detailheadbackground detailborder detailheadsize">Size</th>
+ <th class="detailheadbackground detailborder
detailheaddefault">Default</th>
+ <th class="detailheadbackground detailborder
detailheadjavaname">JavaName</th>
+ <th class="detailheadbackground detailborder detailheadpk">PK</th>
+ <th class="detailheadbackground detailborder detailheadfk">FK</th>
+ <th class="detailheadbackground detailborder detailheadnotnull">not
null</th>
+ <th class="detailheadbackground detailborder
detailheaddescription">Description</th>
</tr>
#foreach ($col in $table.Columns)
- <tr>
- <td class="normalFont" id="$table.Name$col.Name">#if ($col.isForeignKey()
== true)
-<a href="#$col.RelatedTableName">$col.Name</a>
+ <tr class="detailrow">
+ <td class="detailbackground detailborder detailname#if
($col.isPrimaryKey()==true) primarykey#end#if ($col.isForeignKey()==true)
foreignkey#end#if ($col.isNotNull()==true) notnull#end"
id="$table.Name$col.Name">#if ($col.isForeignKey() == true)
+<a href="#$col.RelatedTableName" title="Foreign key to
${col.RelatedTableName}.${col.RelatedColumnName}" class="link
detailforeignkeylink">$col.Name</a>
#else$col.Name#end</td>
- <td class="normalFont">$col.Type</td>
- <td class="normalFont">#if ($col.printSize() && $col.printSize().length()
> 0) $col.printSize() #else #end</td>
- <td class="normalFont">#if ($col.DefaultValue) $col.DefaultValue#else
#end</td>
- <td class="normalFont">$col.JavaName</td>
- <td class="normalFont"><center> #if ($col.isPrimaryKey()==true)X#else
#end </center></td>
- <td class="normalFont"><center> #if ($col.isForeignKey()==true)X#else
#end </center></td>
- <td class="normalFont"><center> #if ($col.isNotNull()==true)X#else
#end </center></td>
- <td class="normalFont">#if ($col.Description) $col.Description#else
#end</td>
+ <td class="detailbackground detailborder detailtype">$col.Type</td>
+ <td class="detailbackground detailborder detailsize">#if ($col.printSize()
&& $col.printSize().length() > 0) $col.printSize() #else #end</td>
+ <td class="detailbackground detailborder detaildefault">#if
($col.DefaultValue) $col.DefaultValue#else #end</td>
+ <td class="detailbackground detailborder detailjavaname">$col.JavaName</td>
+ <td class="detailbackground detailborder detailpk"><center> #if
($col.isPrimaryKey()==true)X#else #end </center></td>
+ <td class="detailbackground detailborder detailfk"><center> #if
($col.isForeignKey()==true)X#else #end </center></td>
+ <td class="detailbackground detailborder detailnotnull"><center> #if
($col.isNotNull()==true)X#else #end </center></td>
+ <td class="detailbackground detailborder detaildescription">#if
($col.Description) $col.Description#else #end</td>
</tr>
#end
-</table>
-<script>
-#foreach ( $fk in $table.ForeignKeys )
-if( document.getElementById )
-{
-var col = document.getElementById("$table.Name$fk.LocalColumnNames");
-col.style.backgroundColor = "$docHtmlFkColor";
-col.title="Foreignkey from $fk.ForeignTableName.$fk.ForeignColumnNames";
-}
-#end
-</script>
+</table>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]