Differences From:
File
src/timeline.c
part of check-in
[d820722fe5]
- The timeline correctly shows as a leaf a check-in whose only children
are separate branches.
by
drh on
2009-01-21 01:06:32.
[view]
To:
File
src/timeline.c
part of check-in
[580d6ad8c7]
- Suppress the display of the artificate ID on the timeline which showing
changes to wiki or tickets.
by
drh on
2009-01-21 01:23:40.
[view]
@@ -96,8 +96,15 @@
return nNonBranch;
}
/*
+** Allowed flags for the tmFlags argument to www_print_timeline
+*/
+#if INTERFACE
+#define TIMELINE_ARTID 0x0001 /* Show artifact IDs on non-check-in lines */
+#endif
+
+/*
** Output a timeline in the web format given a query. The query
** should return these columns:
**
** 0. rid
@@ -112,9 +119,11 @@
** 9. type ("ci", "w")
** 10. list of symbolic tags.
*/
void www_print_timeline(
- Stmt *pQuery /* Query to implement the timeline */
+ Stmt *pQuery, /* Query to implement the timeline */
+ int tmFlags, /* Flags controlling display behavior */
+ void (*xExtra)(int) /* Routine to call on each line of display */
){
int wikiFlags;
int mxWikiLen;
Blob comment;
@@ -175,9 +184,9 @@
}
if( isLeaf ){
@ <b>Leaf</b>
}
- }else{
+ }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
hyperlink_to_uuid(zUuid);
}
db_column_blob(pQuery, 3, &comment);
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
@@ -464,9 +473,9 @@
blob_zero(&sql);
db_prepare(&q, "SELECT * FROM timeline ORDER BY timestamp DESC");
@ <h2>%b(&desc)</h2>
blob_reset(&desc);
- www_print_timeline(&q);
+ www_print_timeline(&q, 0, 0);
db_finalize(&q);
@ <script>
@ var parentof = new Object();