Check-in [83ac468aae]
Not logged in
Overview

SHA1 Hash:83ac468aae28ad6903ebfa051c10ee68d92da512
Date: 2009-01-24 00:11:44
User: drh
Comment:Add a "nomenclature" sidebox for the Branches page, explaining the difference between an open and a closed branch.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/branch.c from [f230ea602b] to [76b93505eb].

@@ -229,10 +229,23 @@
 
   style_header("Branches");
   style_submenu_element("Timeline", "Timeline", "brtimeline");
   login_anonymous_available();
   compute_leaves(0, 1);
+  style_sidebox_begin("Nomenclature:", "33%");
+  @ <ol>
+  @ <li> An <b>open branch</b> is a branch that has one or
+  @ more <a href="leaves">open leaves.</a>
+  @ The presence of open leaves presumably means
+  @ that the branch is still being extended with new check-ins.</li>
+  @ <li> A <b>closed branch</b> is a branch with only
+  @ <a href="leaves?closed">closed leaves</a>.
+  @ Closed branches are fixed and do not change (unless they are first
+  @ reopened)</li>
+  @ </ol>
+  style_sidebox_end();
+
   db_prepare(&q,
     "SELECT DISTINCT value FROM tagxref"
     " WHERE tagid=%d AND value NOT NULL"
     "   AND rid IN leaves"
     " ORDER BY value",

Modified src/descendants.c from [8b62b08925] to [9007c3f73b].

@@ -297,27 +297,26 @@
     style_submenu_element("Open", "Open", "leaves");
   }
   style_header("Leaves");
   login_anonymous_available();
   compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
-  @ <table width="33%%" align="right" border="1">
-  @ <tr><td>
-  @ <b>Nomenclature:</b>
+  style_sidebox_begin("Nomenclature:", "33%");
   @ <ol>
   @ <li> A <b>leaf</b> is a check-in with no descendants.</li>
   @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
   @ and is thus assumed to still be in use.</li>
   @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
   @ be historical and no longer in active use.</li>
   @ </ol>
-  @ </td></tr></table>
+  style_sidebox_end();
+
   if( showAll ){
-    @ <h1>All leaves, both open and closed</h1>
+    @ <h1>All leaves, both open and closed:</h1>
   }else if( showClosed ){
-    @ <h1>Closed leaves only</h1>
+    @ <h1>Closed leaves:</h1>
   }else{
-    @ <h1>All open leaves</h1>
+    @ <h1>Open leaves:</h1>
   }
   db_prepare(&q,
     "%s"
     "   AND blob.rid IN leaves"
     " ORDER BY event.mtime DESC",

Modified src/style.c from [08207a3a32] to [3c8c1ba929].

@@ -155,10 +155,28 @@
   if( g.thTrace ){
     cgi_append_content("<font color=\"red\"><hr>\n", -1);
     cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog));
     cgi_append_content("</font>\n", -1);
   }
+}
+
+/*
+** Begin a side-box on the right-hand side of a page.  The title and
+** the width of the box are given as arguments.  The width is usually
+** a percentage of total screen width.
+*/
+void style_sidebox_begin(const char *zTitle, const char *zWidth){
+  @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5
+  @  vspace=5 hspace=5>
+  @ <tr><td>
+  @ <b>%h(zTitle)</b>
+}
+
+/* End the side-box
+*/
+void style_sidebox_end(void){
+  @ </td></tr></table>
 }
 
 /* @-comment: // */
 /*
 ** The default page header.