Fossil SCM

Add a "nomenclature" sidebox for the Branches page, explaining the difference between an open and a closed branch.

drh 2009-01-24 00:11 trunk
Commit 83ac468aae28ad6903ebfa051c10ee68d92da512
+13
--- src/branch.c
+++ src/branch.c
@@ -229,10 +229,23 @@
229229
230230
style_header("Branches");
231231
style_submenu_element("Timeline", "Timeline", "brtimeline");
232232
login_anonymous_available();
233233
compute_leaves(0, 1);
234
+ style_sidebox_begin("Nomenclature:", "33%");
235
+ @ <ol>
236
+ @ <li> An <b>open branch</b> is a branch that has one or
237
+ @ more <a href="leaves">open leaves.</a>
238
+ @ The presence of open leaves presumably means
239
+ @ that the branch is still being extended with new check-ins.</li>
240
+ @ <li> A <b>closed branch</b> is a branch with only
241
+ @ <a href="leaves?closed">closed leaves</a>.
242
+ @ Closed branches are fixed and do not change (unless they are first
243
+ @ reopened)</li>
244
+ @ </ol>
245
+ style_sidebox_end();
246
+
234247
db_prepare(&q,
235248
"SELECT DISTINCT value FROM tagxref"
236249
" WHERE tagid=%d AND value NOT NULL"
237250
" AND rid IN leaves"
238251
" ORDER BY value",
239252
--- src/branch.c
+++ src/branch.c
@@ -229,10 +229,23 @@
229
230 style_header("Branches");
231 style_submenu_element("Timeline", "Timeline", "brtimeline");
232 login_anonymous_available();
233 compute_leaves(0, 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
234 db_prepare(&q,
235 "SELECT DISTINCT value FROM tagxref"
236 " WHERE tagid=%d AND value NOT NULL"
237 " AND rid IN leaves"
238 " ORDER BY value",
239
--- src/branch.c
+++ src/branch.c
@@ -229,10 +229,23 @@
229
230 style_header("Branches");
231 style_submenu_element("Timeline", "Timeline", "brtimeline");
232 login_anonymous_available();
233 compute_leaves(0, 1);
234 style_sidebox_begin("Nomenclature:", "33%");
235 @ <ol>
236 @ <li> An <b>open branch</b> is a branch that has one or
237 @ more <a href="leaves">open leaves.</a>
238 @ The presence of open leaves presumably means
239 @ that the branch is still being extended with new check-ins.</li>
240 @ <li> A <b>closed branch</b> is a branch with only
241 @ <a href="leaves?closed">closed leaves</a>.
242 @ Closed branches are fixed and do not change (unless they are first
243 @ reopened)</li>
244 @ </ol>
245 style_sidebox_end();
246
247 db_prepare(&q,
248 "SELECT DISTINCT value FROM tagxref"
249 " WHERE tagid=%d AND value NOT NULL"
250 " AND rid IN leaves"
251 " ORDER BY value",
252
--- src/descendants.c
+++ src/descendants.c
@@ -297,27 +297,26 @@
297297
style_submenu_element("Open", "Open", "leaves");
298298
}
299299
style_header("Leaves");
300300
login_anonymous_available();
301301
compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
302
- @ <table width="33%%" align="right" border="1">
303
- @ <tr><td>
304
- @ <b>Nomenclature:</b>
302
+ style_sidebox_begin("Nomenclature:", "33%");
305303
@ <ol>
306304
@ <li> A <b>leaf</b> is a check-in with no descendants.</li>
307305
@ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
308306
@ and is thus assumed to still be in use.</li>
309307
@ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
310308
@ be historical and no longer in active use.</li>
311309
@ </ol>
312
- @ </td></tr></table>
310
+ style_sidebox_end();
311
+
313312
if( showAll ){
314
- @ <h1>All leaves, both open and closed</h1>
313
+ @ <h1>All leaves, both open and closed:</h1>
315314
}else if( showClosed ){
316
- @ <h1>Closed leaves only</h1>
315
+ @ <h1>Closed leaves:</h1>
317316
}else{
318
- @ <h1>All open leaves</h1>
317
+ @ <h1>Open leaves:</h1>
319318
}
320319
db_prepare(&q,
321320
"%s"
322321
" AND blob.rid IN leaves"
323322
" ORDER BY event.mtime DESC",
324323
--- src/descendants.c
+++ src/descendants.c
@@ -297,27 +297,26 @@
297 style_submenu_element("Open", "Open", "leaves");
298 }
299 style_header("Leaves");
300 login_anonymous_available();
301 compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
302 @ <table width="33%%" align="right" border="1">
303 @ <tr><td>
304 @ <b>Nomenclature:</b>
305 @ <ol>
306 @ <li> A <b>leaf</b> is a check-in with no descendants.</li>
307 @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
308 @ and is thus assumed to still be in use.</li>
309 @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
310 @ be historical and no longer in active use.</li>
311 @ </ol>
312 @ </td></tr></table>
 
313 if( showAll ){
314 @ <h1>All leaves, both open and closed</h1>
315 }else if( showClosed ){
316 @ <h1>Closed leaves only</h1>
317 }else{
318 @ <h1>All open leaves</h1>
319 }
320 db_prepare(&q,
321 "%s"
322 " AND blob.rid IN leaves"
323 " ORDER BY event.mtime DESC",
324
--- src/descendants.c
+++ src/descendants.c
@@ -297,27 +297,26 @@
297 style_submenu_element("Open", "Open", "leaves");
298 }
299 style_header("Leaves");
300 login_anonymous_available();
301 compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
302 style_sidebox_begin("Nomenclature:", "33%");
 
 
303 @ <ol>
304 @ <li> A <b>leaf</b> is a check-in with no descendants.</li>
305 @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
306 @ and is thus assumed to still be in use.</li>
307 @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
308 @ be historical and no longer in active use.</li>
309 @ </ol>
310 style_sidebox_end();
311
312 if( showAll ){
313 @ <h1>All leaves, both open and closed:</h1>
314 }else if( showClosed ){
315 @ <h1>Closed leaves:</h1>
316 }else{
317 @ <h1>Open leaves:</h1>
318 }
319 db_prepare(&q,
320 "%s"
321 " AND blob.rid IN leaves"
322 " ORDER BY event.mtime DESC",
323
+18
--- src/style.c
+++ src/style.c
@@ -156,10 +156,28 @@
156156
cgi_append_content("<font color=\"red\"><hr>\n", -1);
157157
cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog));
158158
cgi_append_content("</font>\n", -1);
159159
}
160160
}
161
+
162
+/*
163
+** Begin a side-box on the right-hand side of a page. The title and
164
+** the width of the box are given as arguments. The width is usually
165
+** a percentage of total screen width.
166
+*/
167
+void style_sidebox_begin(const char *zTitle, const char *zWidth){
168
+ @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5
169
+ @ vspace=5 hspace=5>
170
+ @ <tr><td>
171
+ @ <b>%h(zTitle)</b>
172
+}
173
+
174
+/* End the side-box
175
+*/
176
+void style_sidebox_end(void){
177
+ @ </td></tr></table>
178
+}
161179
162180
/* @-comment: // */
163181
/*
164182
** The default page header.
165183
*/
166184
--- src/style.c
+++ src/style.c
@@ -156,10 +156,28 @@
156 cgi_append_content("<font color=\"red\"><hr>\n", -1);
157 cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog));
158 cgi_append_content("</font>\n", -1);
159 }
160 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
162 /* @-comment: // */
163 /*
164 ** The default page header.
165 */
166
--- src/style.c
+++ src/style.c
@@ -156,10 +156,28 @@
156 cgi_append_content("<font color=\"red\"><hr>\n", -1);
157 cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog));
158 cgi_append_content("</font>\n", -1);
159 }
160 }
161
162 /*
163 ** Begin a side-box on the right-hand side of a page. The title and
164 ** the width of the box are given as arguments. The width is usually
165 ** a percentage of total screen width.
166 */
167 void style_sidebox_begin(const char *zTitle, const char *zWidth){
168 @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5
169 @ vspace=5 hspace=5>
170 @ <tr><td>
171 @ <b>%h(zTitle)</b>
172 }
173
174 /* End the side-box
175 */
176 void style_sidebox_end(void){
177 @ </td></tr></table>
178 }
179
180 /* @-comment: // */
181 /*
182 ** The default page header.
183 */
184

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button