<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#copied {background-color:#ccccff;}
tr.alt #copied {background-color:#bbbbf7;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>as2api/trunk/as2api/lib/output/html</tt></b></td></tr>
<tr><td><tt><a href="#file1">diff.rb</a></tt> </td><td></td><td align="right" id="added">+67</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">347 -> 348</td></tr>
</table>
<pre class="comment">
Basic navigation for apidiff pages
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">as2api/trunk/as2api/lib/output/html</span><br />
<div class="fileheader"><big><b>diff.rb</b></big> <small id="info">347 -> 348</small></div>
<pre class="diff"><small id="info">--- trunk/as2api/lib/output/html/diff.rb        2006-03-30 20:10:57 UTC (rev 347)
+++ trunk/as2api/lib/output/html/diff.rb        2006-03-30 20:45:14 UTC (rev 348)
@@ -18,6 +18,59 @@
</small></pre><pre class="diff" id="context">
require 'output/html/html_framework'
</pre><pre class="diff" id="added">+
+class DiffOverviewNavLinkBuilder < NavLinkBuilder
+ def href_on(page); page.base_path("changes/change-overview.html"); end
+
+ def is_current?(page); page.is_a?(DiffOverviewPage); end
+
+ def title_on(page)
+ _("Overview of API Changes")
+ end
+end
+
+class DiffPackageNavLinkBuilder < NavLinkBuilder
+ def href_on(page)
+ if page.aspackage
+ "package-summary.html"
+ else
+ nil
+ end
+ end
+
+ def is_current?(page); page.is_a?(PackageDiffIndexPage); end
+
+ def title_on(page)
+ if page.aspackage
+ _("Overview of package %s") % page.package_display_name_for(page.aspackage)
+ else
+ nil
+ end
+ end
+end
+
+
+class DiffTypeNavLinkBuilder < NavLinkBuilder
+ def href_on(page)
+ if page.astype
+ page.astype.unqualified_name+".html"
+ else
+ nil
+ end
+ end
+
+ def is_current?(page); page.is_a?(TypeDiffPage); end
+
+ def title_on(page)
+ if page.astype
+ _("Detail of %s API") % page.astype.qualified_name
+ else
+ nil
+ end
+ end
+end
+
+
</pre><pre class="diff" id="context"> class BasicDiffPage < BasicPage
def summary_table(rows, caption)
</pre><pre class="diff"><small id="info">@@ -92,8 +145,9 @@
</small></pre><pre class="diff" id="context"> html_h1(@title)
summary_table(@package_changes.added_types, _("Added Types")) do |as_type|
</pre><pre class="diff" id="removed">- name = as_type.unqualified_name
- pcdata(name)
</pre><pre class="diff" id="added">+ #name = as_type.unqualified_name
+ #pcdata(name)
+ link_type(as_type)
</pre><pre class="diff" id="context"> end
summary_table(@package_changes.modified_types, _("Modified Types")) do |as_type|
</pre><pre class="diff"><small id="info">@@ -108,6 +162,10 @@
</small></pre><pre class="diff" id="context"> end
end
</pre><pre class="diff" id="added">+ def aspackage
+ @package_changes
+ end
+
</pre><pre class="diff" id="context"> def navigation
html_ul("class"=>"main_nav") do
# TODO
</pre><pre class="diff"><small id="info">@@ -129,6 +187,10 @@
</small></pre><pre class="diff" id="context"> @type_changes = type_changes
end
</pre><pre class="diff" id="added">+ def aspackage
+ @type_changes.new_type.package
+ end
+
</pre><pre class="diff" id="context"> def generate_body_content
html_h1(@title)
</pre><pre class="diff"><small id="info">@@ -275,7 +337,9 @@
</small></pre><pre class="diff" id="context">
def build_navigation
elements = []
</pre><pre class="diff" id="removed">- # TODO
</pre><pre class="diff" id="added">+ elements << DiffOverviewNavLinkBuilder.new(nil, N_("Overview"))
+ elements << DiffPackageNavLinkBuilder.new(nil, N_("Package"))
+ elements << DiffTypeNavLinkBuilder.new(nil, N_("Class"))
</pre><pre class="diff" id="context"> elements
end
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.12</small></center>
</body></html>