| | @@ -94,10 +94,17 @@ |
| 94 | 94 | pid, TAG_NEWBRANCH |
| 95 | 95 | ); |
| 96 | 96 | return nNonBranch; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | +/* |
| 100 | +** Allowed flags for the tmFlags argument to www_print_timeline |
| 101 | +*/ |
| 102 | +#if INTERFACE |
| 103 | +#define TIMELINE_ARTID 0x0001 /* Show artifact IDs on non-check-in lines */ |
| 104 | +#endif |
| 105 | + |
| 99 | 106 | /* |
| 100 | 107 | ** Output a timeline in the web format given a query. The query |
| 101 | 108 | ** should return these columns: |
| 102 | 109 | ** |
| 103 | 110 | ** 0. rid |
| | @@ -111,11 +118,13 @@ |
| 111 | 118 | ** 8. background color |
| 112 | 119 | ** 9. type ("ci", "w") |
| 113 | 120 | ** 10. list of symbolic tags. |
| 114 | 121 | */ |
| 115 | 122 | void www_print_timeline( |
| 116 | | - Stmt *pQuery /* Query to implement the timeline */ |
| 123 | + Stmt *pQuery, /* Query to implement the timeline */ |
| 124 | + int tmFlags, /* Flags controlling display behavior */ |
| 125 | + void (*xExtra)(int) /* Routine to call on each line of display */ |
| 117 | 126 | ){ |
| 118 | 127 | int wikiFlags; |
| 119 | 128 | int mxWikiLen; |
| 120 | 129 | Blob comment; |
| 121 | 130 | char zPrevDate[20]; |
| | @@ -174,11 +183,11 @@ |
| 174 | 183 | } |
| 175 | 184 | } |
| 176 | 185 | if( isLeaf ){ |
| 177 | 186 | @ <b>Leaf</b> |
| 178 | 187 | } |
| 179 | | - }else{ |
| 188 | + }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 180 | 189 | hyperlink_to_uuid(zUuid); |
| 181 | 190 | } |
| 182 | 191 | db_column_blob(pQuery, 3, &comment); |
| 183 | 192 | if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){ |
| 184 | 193 | Blob truncated; |
| | @@ -463,11 +472,11 @@ |
| 463 | 472 | } |
| 464 | 473 | blob_zero(&sql); |
| 465 | 474 | db_prepare(&q, "SELECT * FROM timeline ORDER BY timestamp DESC"); |
| 466 | 475 | @ <h2>%b(&desc)</h2> |
| 467 | 476 | blob_reset(&desc); |
| 468 | | - www_print_timeline(&q); |
| 477 | + www_print_timeline(&q, 0, 0); |
| 469 | 478 | db_finalize(&q); |
| 470 | 479 | |
| 471 | 480 | @ <script> |
| 472 | 481 | @ var parentof = new Object(); |
| 473 | 482 | @ var childof = new Object(); |
| 474 | 483 | |