]> git.donarmstrong.com Git - bugscan.git/blobdiff - dohtml
makemainpage should call html_header() not header()
[bugscan.git] / dohtml
diff --git a/dohtml b/dohtml
index e1f1c650fe204a4ef405bbf395e3ce2b43e1df80..9f463a2f8172cd9753dcb8112b5087ab3998d11b 100755 (executable)
--- a/dohtml
+++ b/dohtml
@@ -14,15 +14,47 @@ html_header() {
     <title>$title, $date</title>
   </head>
 <body bgcolor="white">
-<h1 align="center">$title</h1>
-
-<h2 align="center">$date</h2>
+<div id="header">
+  <div id="upperheader">
+    <div id="logo">
+      <a href="http://www.debian.org/" title="Debian Home"><img src="http://www.debian.org/Pics/openlogo-50.png" alt="Debian" width="50" height="61"></a>
+    </div>
+    <div id="searchbox">
+      <form name="p" method="get" action="http://search.debian.org/cgi-bin/omega">
+        <p>
+          <input type="hidden" name="DB" value="en">
+          <input name="P" value="" size="27">
+          <input type="submit" value="Search">
+        </p>
+      </form>
+    </div>
+  </div>
+  <div id="navbar">
+    <p class="hidecss"><a href="#content">Skip Quicknav</a></p>
+    <ul>
+       <li><a href="http://www.debian.org/intro/about">About Debian</a></li>
+       <li><a href="http://www.debian.org/distrib/">Getting Debian</a></li>
+       <li><a href="http://www.debian.org/support">Support</a></li>
+       <li><a href="http://www.debian.org/devel/">Developers' Corner</a></li>
+    </ul>
+  </div>
+  <p id="breadcrumbs">
+    <a href="http://www.debian.org/Bugs/">Debian bug tracking system</a>
+    &#x2F;
+    Debian BTS &mdash; rc bugs status
+  </p>
+</div>
+<div id="content">
+  <h1>$title</h1>
+  
+  <h2>$date</h2>
 
 EOF
 }
 
-html_page_creation_notice() {
+html_end_of_content() {
        cat <<EOF
+</div><!-- end of 'div id="content"'-->
 <hr>
 This page is automatically generated.<br>
 Please contact
@@ -40,7 +72,7 @@ EOF
 realmakepage() {
        local   filter="$1"     # Distributions to list
        local   title="$2"      # Title of page
-       local   date="$3"       # Date
+       local   date_time="$3"  # Date
        local   worry="$4"      # Worry about testing only?
        local   descr           # Description of filter
 
@@ -53,13 +85,13 @@ realmakepage() {
 
        filter="$filter $worry"
 
-       html_header "$title" "$date"
+       html_header "$title" "$date_time"
 
        cat <<EOF
 
-<p align="center">for distribution(s): $descr</p>
+<p>for distribution(s): $descr</p>
 
-<p align="center">You might also want to check out <a href="http://udd.debian.org/bugs/">UDD</a> instead of this page.</p>
+<p>You might also want to check out <a href="http://udd.debian.org/bugs/">UDD</a> instead of this page.</p>
 <hr>
 
 <p>
@@ -67,7 +99,7 @@ EOF
        ./bugreport -H -s $filter
        
        cat <<EOF
-<p>
+</p>
 Explanation for <a href="http://www.debian.org/Bugs/Developer#tags">bug
 tags</a>:
 
@@ -83,27 +115,28 @@ tags</a>:
 </ul>
 
 <p>
-The second set of tags indicate what releases a bug applies to:
-O for oldstable (squeeze), S for stable (wheezy), T for testing (jessie),
-U for unstable (sid) or E for experimental.
-
-<p>
+  The second set of tags indicate what releases a bug applies to:
+  O for oldstable (squeeze), S for stable (wheezy), T for testing (jessie),
+  U for unstable (sid) or E for experimental.
+</p>
 
 EOF
        ./bugreport -H -l $filter
 
-       html_page_creation_notice
+       html_end_of_content
 
        html_closing_tags
 }
 
 makemainpage() {
+       local   title="$1"      # Title of page
+       local   date_time="$2"  # Date
 
-       header "$title" "$time"
+       html_header "$title" "$date_time"
 
        cat <<EOF
 
-<p align="center">
+<p>
 EOF
 
        ./bugreport -Hs
@@ -111,7 +144,7 @@ EOF
        cat <<EOF
 </p>
 
-<div align="center"><img src="graph-release.png" alt="Graph of RC bugs"></div>
+<div><img src="graph-release.png" alt="Graph of RC bugs"></div>
 
 <p>Other graphs:
   <ul>
@@ -120,12 +153,14 @@ EOF
   </ul>
 </p>
 
-<p>The red line graphs all bugs with release-critical severities; the green
-line graphs the number of bugs that are actually a concern for the next
-release (excluding ignored bugs, bugs on packages not in testing, and bugs
-whose tags and/or versioning information indicate that they don't apply to
-testing), and the blue line graphs the number of bugs that are a concern
-for the <em>current</em> stable release.</p>
+<p>
+  The red line graphs all bugs with release-critical severities; the green
+  line graphs the number of bugs that are actually a concern for the next
+  release (excluding ignored bugs, bugs on packages not in testing, and bugs
+  whose tags and/or versioning information indicate that they don't apply to
+  testing), and the blue line graphs the number of bugs that are a concern
+  for the <em>current</em> stable release.
+</p>
 
 <h2>Recent changes</h2>
 EOF
@@ -142,18 +177,18 @@ EOF
   <li> <a href="debian/source.html">source</a> 
   <li> <a href="debian/contrib.html">contrib</a>
   <li> <a href="debian/non-free.html">non-free</a>
-  <li><a href="other/pseudo.html">pseudo-packages</a>
+  <li> <a href="other/pseudo.html">pseudo-packages</a>
        <a href="http://www.debian.org/Bugs/pseudo-packages">(?)</a>
-  <li><a href="other/all.html">Everything in one page</a>
+  <li> <a href="other/all.html">Everything in one page</a>
     <br>
      + <a href="other/stable.html">Only bugs relevant to stable</a>
     <br>
      + <a href="other/testing.html">Only bugs relevant to testing</a>
 </ul>
-<p clear=both>
+<p clear=both></p>
 EOF
 
-       html_page_creation_notice
+       html_end_of_content
 
        cat <<EOF
 To receive all mails sent to release-critical bugs, subscribe to the
@@ -161,6 +196,8 @@ To receive all mails sent to release-critical bugs, subscribe to the
 mailing list.
 
 EOF
+
+       html_closing_tags
 }
 
 makepage() {
@@ -169,21 +206,21 @@ makepage() {
        mv -f $3.new $3
 }
 
-time=$(date -u -d '@'$(($(stat -c '%Y' status) / 3600 * 3600)))
-oldtime=$(date -u -d '@'$(($(stat -c '%Y' status-old) / 3600 * 3600)))
+date_time=$(date -u -d '@'$(($(stat -c '%Y' status) / 3600 * 3600)))
+olddate_time=$(date -u -d '@'$(($(stat -c '%Y' status-old) / 3600 * 3600)))
 title="Release-critical bugs status"
 
-makepage "debian" "$title" "$htmldir/debian/all.html" "$time"
-makepage "debian/main" "$title" $htmldir/debian/main.html "$time"
-makepage "debian/contrib" "$title" $htmldir/debian/contrib.html "$time"
-makepage "debian/non-free" "$title" $htmldir/debian/non-free.html "$time"
-makepage "debian/source" "$title" $htmldir/debian/source.html "$time"
+makepage "debian"          "$title" "$htmldir/debian/all.html"      "$date_time"
+makepage "debian/main"     "$title" "$htmldir/debian/main.html"     "$date_time"
+makepage "debian/contrib"  "$title" "$htmldir/debian/contrib.html"  "$date_time"
+makepage "debian/non-free" "$title" "$htmldir/debian/non-free.html" "$date_time"
+makepage "debian/source"   "$title" "$htmldir/debian/source.html"   "$date_time"
 
-makepage "" "$title" $htmldir/other/all.html "$time"
-makepage "" "$title" "$htmldir/other/stable.html" "$time" "-b"
-makepage "" "$title" "$htmldir/other/testing.html" "$time" "-t"
-makepage "" "$title" "$htmldir/other/pseudo.html" "$time" "pseudo"
+makepage ""                "$title" "$htmldir/other/all.html"       "$date_time"
+makepage ""                "$title" "$htmldir/other/stable.html"    "$date_time" "-b"
+makepage ""                "$title" "$htmldir/other/testing.html"   "$date_time" "-t"
+makepage ""                "$title" "$htmldir/other/pseudo.html"    "$date_time" "pseudo"
 
-makemainpage > $htmldir/index.html.new
+makemainpage  "$title"  "$date_time" > $htmldir/index.html.new
 mv -f $htmldir/index.html.new $htmldir/index.html