Fossil SCM
Updates to the /brtimeline and /tagtimeline pages.
Commit
efb903f939df4b9486f919ce38486d7c1e980a62804b4bdc4533f0f0d99120f6
Parent
140ed0f25bbbdc5…
5 files changed
+35
-8
+38
-5
+2
+2
+36
-9
+35
-8
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -604,35 +604,62 @@ | ||
| 604 | 604 | " AND tag.tagname GLOB 'sym-*'", |
| 605 | 605 | rid |
| 606 | 606 | ); |
| 607 | 607 | while( db_step(&q)==SQLITE_ROW ){ |
| 608 | 608 | const char *zTagName = db_column_text(&q, 0); |
| 609 | - @ %z(href("%R/timeline?r=%T&n=200",zTagName))[timeline]</a> | |
| 609 | + @ %z(href("%R/timeline?r=%T&n=200",zTagName))[timeline]</a> | |
| 610 | 610 | } |
| 611 | 611 | db_finalize(&q); |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | 614 | /* |
| 615 | 615 | ** WEBPAGE: brtimeline |
| 616 | 616 | ** |
| 617 | 617 | ** Show a timeline of all branches |
| 618 | +** | |
| 619 | +** Query parameters: | |
| 620 | +** | |
| 621 | +** ng No graph | |
| 622 | +** nohidden Hide check-ins with "hidden" tag | |
| 623 | +** onlyhidden Show only check-ins with "hidden" tag | |
| 624 | +** brbg Background color by branch name | |
| 625 | +** ubg Background color by user name | |
| 618 | 626 | */ |
| 619 | 627 | void brtimeline_page(void){ |
| 628 | + Blob sql = empty_blob; | |
| 620 | 629 | Stmt q; |
| 630 | + int tmFlags; /* Timeline display flags */ | |
| 631 | + int fNoHidden = PB("nohidden")!=0; /* The "nohidden" query parameter */ | |
| 632 | + int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */ | |
| 621 | 633 | |
| 622 | 634 | login_check_credentials(); |
| 623 | 635 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 624 | 636 | |
| 625 | 637 | style_header("Branches"); |
| 626 | 638 | style_submenu_element("List", "brlist"); |
| 627 | 639 | login_anonymous_available(); |
| 640 | + timeline_ss_submenu(); | |
| 641 | + cookie_render(); | |
| 628 | 642 | @ <h2>The initial check-in for each branch:</h2> |
| 629 | - db_prepare(&q, | |
| 630 | - "%s AND blob.rid IN (SELECT rid FROM tagxref" | |
| 631 | - " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" | |
| 632 | - " ORDER BY event.mtime DESC", | |
| 633 | - timeline_query_for_www(), TAG_BRANCH | |
| 634 | - ); | |
| 635 | - www_print_timeline(&q, 0, 0, 0, 0, brtimeline_extra); | |
| 643 | + blob_append(&sql, timeline_query_for_www(), -1); | |
| 644 | + blob_append_sql(&sql, | |
| 645 | + "AND blob.rid IN (SELECT rid FROM tagxref" | |
| 646 | + " WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH); | |
| 647 | + if( fNoHidden || fOnlyHidden ){ | |
| 648 | + const char* zUnaryOp = fNoHidden ? "NOT" : ""; | |
| 649 | + blob_append_sql(&sql, | |
| 650 | + " AND %s EXISTS(SELECT 1 FROM tagxref" | |
| 651 | + " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", | |
| 652 | + zUnaryOp/*safe-for-%s*/, TAG_HIDDEN); | |
| 653 | + } | |
| 654 | + db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); | |
| 655 | + blob_reset(&sql); | |
| 656 | + /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too | |
| 657 | + ** many descenders to (off-screen) parents. */ | |
| 658 | + tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; | |
| 659 | + if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 660 | + if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 661 | + if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 662 | + www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra); | |
| 636 | 663 | db_finalize(&q); |
| 637 | 664 | style_footer(); |
| 638 | 665 | } |
| 639 | 666 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -604,35 +604,62 @@ | |
| 604 | " AND tag.tagname GLOB 'sym-*'", |
| 605 | rid |
| 606 | ); |
| 607 | while( db_step(&q)==SQLITE_ROW ){ |
| 608 | const char *zTagName = db_column_text(&q, 0); |
| 609 | @ %z(href("%R/timeline?r=%T&n=200",zTagName))[timeline]</a> |
| 610 | } |
| 611 | db_finalize(&q); |
| 612 | } |
| 613 | |
| 614 | /* |
| 615 | ** WEBPAGE: brtimeline |
| 616 | ** |
| 617 | ** Show a timeline of all branches |
| 618 | */ |
| 619 | void brtimeline_page(void){ |
| 620 | Stmt q; |
| 621 | |
| 622 | login_check_credentials(); |
| 623 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 624 | |
| 625 | style_header("Branches"); |
| 626 | style_submenu_element("List", "brlist"); |
| 627 | login_anonymous_available(); |
| 628 | @ <h2>The initial check-in for each branch:</h2> |
| 629 | db_prepare(&q, |
| 630 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 631 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 632 | " ORDER BY event.mtime DESC", |
| 633 | timeline_query_for_www(), TAG_BRANCH |
| 634 | ); |
| 635 | www_print_timeline(&q, 0, 0, 0, 0, brtimeline_extra); |
| 636 | db_finalize(&q); |
| 637 | style_footer(); |
| 638 | } |
| 639 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -604,35 +604,62 @@ | |
| 604 | " AND tag.tagname GLOB 'sym-*'", |
| 605 | rid |
| 606 | ); |
| 607 | while( db_step(&q)==SQLITE_ROW ){ |
| 608 | const char *zTagName = db_column_text(&q, 0); |
| 609 | @ %z(href("%R/timeline?r=%T&n=200",zTagName))[timeline]</a> |
| 610 | } |
| 611 | db_finalize(&q); |
| 612 | } |
| 613 | |
| 614 | /* |
| 615 | ** WEBPAGE: brtimeline |
| 616 | ** |
| 617 | ** Show a timeline of all branches |
| 618 | ** |
| 619 | ** Query parameters: |
| 620 | ** |
| 621 | ** ng No graph |
| 622 | ** nohidden Hide check-ins with "hidden" tag |
| 623 | ** onlyhidden Show only check-ins with "hidden" tag |
| 624 | ** brbg Background color by branch name |
| 625 | ** ubg Background color by user name |
| 626 | */ |
| 627 | void brtimeline_page(void){ |
| 628 | Blob sql = empty_blob; |
| 629 | Stmt q; |
| 630 | int tmFlags; /* Timeline display flags */ |
| 631 | int fNoHidden = PB("nohidden")!=0; /* The "nohidden" query parameter */ |
| 632 | int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */ |
| 633 | |
| 634 | login_check_credentials(); |
| 635 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 636 | |
| 637 | style_header("Branches"); |
| 638 | style_submenu_element("List", "brlist"); |
| 639 | login_anonymous_available(); |
| 640 | timeline_ss_submenu(); |
| 641 | cookie_render(); |
| 642 | @ <h2>The initial check-in for each branch:</h2> |
| 643 | blob_append(&sql, timeline_query_for_www(), -1); |
| 644 | blob_append_sql(&sql, |
| 645 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 646 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH); |
| 647 | if( fNoHidden || fOnlyHidden ){ |
| 648 | const char* zUnaryOp = fNoHidden ? "NOT" : ""; |
| 649 | blob_append_sql(&sql, |
| 650 | " AND %s EXISTS(SELECT 1 FROM tagxref" |
| 651 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", |
| 652 | zUnaryOp/*safe-for-%s*/, TAG_HIDDEN); |
| 653 | } |
| 654 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 655 | blob_reset(&sql); |
| 656 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 657 | ** many descenders to (off-screen) parents. */ |
| 658 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 659 | if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 660 | if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 661 | if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 662 | www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra); |
| 663 | db_finalize(&q); |
| 664 | style_footer(); |
| 665 | } |
| 666 |
+38
-5
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -454,31 +454,51 @@ | ||
| 454 | 454 | ** |
| 455 | 455 | ** Query parameters: |
| 456 | 456 | ** |
| 457 | 457 | ** all Show all leaves |
| 458 | 458 | ** closed Show only closed leaves |
| 459 | +** ng No graph | |
| 460 | +** nohidden Hide check-ins with "hidden" tag | |
| 461 | +** onlyhidden Show only check-ins with "hidden" tag | |
| 462 | +** brbg Background color by branch name | |
| 463 | +** ubg Background color by user name | |
| 459 | 464 | */ |
| 460 | 465 | void leaves_page(void){ |
| 461 | 466 | Blob sql; |
| 462 | 467 | Stmt q; |
| 463 | 468 | int showAll = P("all")!=0; |
| 464 | 469 | int showClosed = P("closed")!=0; |
| 470 | + int fNg = PB("ng")!=0; /* Flag for the "ng" query parameter */ | |
| 471 | + int fNoHidden = PB("nohidden")!=0; /* "nohidden" query parameter */ | |
| 472 | + int fOnlyHidden = PB("onlyhidden")!=0; /* "onlyhidden" query parameter */ | |
| 473 | + int fBrBg = PB("brbg")!=0; /* Flag for the "brbg" query parameter */ | |
| 474 | + int fUBg = PB("ubg")!=0; /* Flag for the "ubg" query parameter */ | |
| 475 | + HQuery url; /* URL to /leaves plus query parameters */ | |
| 476 | + int tmFlags; /* Timeline display flags */ | |
| 465 | 477 | |
| 466 | 478 | login_check_credentials(); |
| 467 | 479 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 468 | - | |
| 480 | + url_initialize(&url, "leaves"); | |
| 481 | + if( fNg ) url_add_parameter(&url, "ng", ""); | |
| 482 | + if( fNoHidden ) url_add_parameter(&url, "nohidden", ""); | |
| 483 | + if( fOnlyHidden ) url_add_parameter(&url, "onlyhidden", ""); | |
| 484 | + if( fBrBg ) url_add_parameter(&url, "brbg", ""); | |
| 485 | + if( fUBg ) url_add_parameter(&url, "ubg", ""); | |
| 469 | 486 | if( !showAll ){ |
| 470 | - style_submenu_element("All", "leaves?all"); | |
| 487 | + style_submenu_element("All", "%s", url_render(&url, "all", "", 0, 0)); | |
| 471 | 488 | } |
| 472 | 489 | if( !showClosed ){ |
| 473 | - style_submenu_element("Closed", "leaves?closed"); | |
| 490 | + style_submenu_element("Closed", "%s", url_render(&url, "closed", "", 0, 0)); | |
| 474 | 491 | } |
| 475 | 492 | if( showClosed || showAll ){ |
| 476 | - style_submenu_element("Open", "leaves"); | |
| 493 | + style_submenu_element("Open", "%s", url_render(&url, 0, 0, 0, 0)); | |
| 477 | 494 | } |
| 495 | + url_reset(&url); | |
| 478 | 496 | style_header("Leaves"); |
| 479 | 497 | login_anonymous_available(); |
| 498 | + timeline_ss_submenu(); | |
| 499 | + cookie_render(); | |
| 480 | 500 | #if 0 |
| 481 | 501 | style_sidebox_begin("Nomenclature:", "33%"); |
| 482 | 502 | @ <ol> |
| 483 | 503 | @ <li> A <div class="sideboxDescribed">leaf</div> |
| 484 | 504 | @ is a check-in with no descendants in the same branch.</li> |
| @@ -505,13 +525,26 @@ | ||
| 505 | 525 | if( showClosed ){ |
| 506 | 526 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 507 | 527 | }else if( !showAll ){ |
| 508 | 528 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 509 | 529 | } |
| 530 | + if( fNoHidden || fOnlyHidden ){ | |
| 531 | + const char* zUnaryOp = fNoHidden ? "NOT" : ""; | |
| 532 | + blob_append_sql(&sql, | |
| 533 | + " AND %s EXISTS(SELECT 1 FROM tagxref" | |
| 534 | + " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", | |
| 535 | + zUnaryOp/*safe-for-%s*/, TAG_HIDDEN); | |
| 536 | + } | |
| 510 | 537 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 511 | 538 | blob_reset(&sql); |
| 512 | - www_print_timeline(&q, TIMELINE_LEAFONLY, 0, 0, 0, 0); | |
| 539 | + /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too | |
| 540 | + ** many descenders to (off-screen) parents. */ | |
| 541 | + tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL; | |
| 542 | + if( fNg==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 543 | + if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR; | |
| 544 | + if( fUBg ) tmFlags |= TIMELINE_UCOLOR; | |
| 545 | + www_print_timeline(&q, tmFlags, 0, 0, 0, 0); | |
| 513 | 546 | db_finalize(&q); |
| 514 | 547 | @ <br /> |
| 515 | 548 | style_footer(); |
| 516 | 549 | } |
| 517 | 550 | |
| 518 | 551 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -454,31 +454,51 @@ | |
| 454 | ** |
| 455 | ** Query parameters: |
| 456 | ** |
| 457 | ** all Show all leaves |
| 458 | ** closed Show only closed leaves |
| 459 | */ |
| 460 | void leaves_page(void){ |
| 461 | Blob sql; |
| 462 | Stmt q; |
| 463 | int showAll = P("all")!=0; |
| 464 | int showClosed = P("closed")!=0; |
| 465 | |
| 466 | login_check_credentials(); |
| 467 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 468 | |
| 469 | if( !showAll ){ |
| 470 | style_submenu_element("All", "leaves?all"); |
| 471 | } |
| 472 | if( !showClosed ){ |
| 473 | style_submenu_element("Closed", "leaves?closed"); |
| 474 | } |
| 475 | if( showClosed || showAll ){ |
| 476 | style_submenu_element("Open", "leaves"); |
| 477 | } |
| 478 | style_header("Leaves"); |
| 479 | login_anonymous_available(); |
| 480 | #if 0 |
| 481 | style_sidebox_begin("Nomenclature:", "33%"); |
| 482 | @ <ol> |
| 483 | @ <li> A <div class="sideboxDescribed">leaf</div> |
| 484 | @ is a check-in with no descendants in the same branch.</li> |
| @@ -505,13 +525,26 @@ | |
| 505 | if( showClosed ){ |
| 506 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 507 | }else if( !showAll ){ |
| 508 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 509 | } |
| 510 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 511 | blob_reset(&sql); |
| 512 | www_print_timeline(&q, TIMELINE_LEAFONLY, 0, 0, 0, 0); |
| 513 | db_finalize(&q); |
| 514 | @ <br /> |
| 515 | style_footer(); |
| 516 | } |
| 517 | |
| 518 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -454,31 +454,51 @@ | |
| 454 | ** |
| 455 | ** Query parameters: |
| 456 | ** |
| 457 | ** all Show all leaves |
| 458 | ** closed Show only closed leaves |
| 459 | ** ng No graph |
| 460 | ** nohidden Hide check-ins with "hidden" tag |
| 461 | ** onlyhidden Show only check-ins with "hidden" tag |
| 462 | ** brbg Background color by branch name |
| 463 | ** ubg Background color by user name |
| 464 | */ |
| 465 | void leaves_page(void){ |
| 466 | Blob sql; |
| 467 | Stmt q; |
| 468 | int showAll = P("all")!=0; |
| 469 | int showClosed = P("closed")!=0; |
| 470 | int fNg = PB("ng")!=0; /* Flag for the "ng" query parameter */ |
| 471 | int fNoHidden = PB("nohidden")!=0; /* "nohidden" query parameter */ |
| 472 | int fOnlyHidden = PB("onlyhidden")!=0; /* "onlyhidden" query parameter */ |
| 473 | int fBrBg = PB("brbg")!=0; /* Flag for the "brbg" query parameter */ |
| 474 | int fUBg = PB("ubg")!=0; /* Flag for the "ubg" query parameter */ |
| 475 | HQuery url; /* URL to /leaves plus query parameters */ |
| 476 | int tmFlags; /* Timeline display flags */ |
| 477 | |
| 478 | login_check_credentials(); |
| 479 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 480 | url_initialize(&url, "leaves"); |
| 481 | if( fNg ) url_add_parameter(&url, "ng", ""); |
| 482 | if( fNoHidden ) url_add_parameter(&url, "nohidden", ""); |
| 483 | if( fOnlyHidden ) url_add_parameter(&url, "onlyhidden", ""); |
| 484 | if( fBrBg ) url_add_parameter(&url, "brbg", ""); |
| 485 | if( fUBg ) url_add_parameter(&url, "ubg", ""); |
| 486 | if( !showAll ){ |
| 487 | style_submenu_element("All", "%s", url_render(&url, "all", "", 0, 0)); |
| 488 | } |
| 489 | if( !showClosed ){ |
| 490 | style_submenu_element("Closed", "%s", url_render(&url, "closed", "", 0, 0)); |
| 491 | } |
| 492 | if( showClosed || showAll ){ |
| 493 | style_submenu_element("Open", "%s", url_render(&url, 0, 0, 0, 0)); |
| 494 | } |
| 495 | url_reset(&url); |
| 496 | style_header("Leaves"); |
| 497 | login_anonymous_available(); |
| 498 | timeline_ss_submenu(); |
| 499 | cookie_render(); |
| 500 | #if 0 |
| 501 | style_sidebox_begin("Nomenclature:", "33%"); |
| 502 | @ <ol> |
| 503 | @ <li> A <div class="sideboxDescribed">leaf</div> |
| 504 | @ is a check-in with no descendants in the same branch.</li> |
| @@ -505,13 +525,26 @@ | |
| 525 | if( showClosed ){ |
| 526 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 527 | }else if( !showAll ){ |
| 528 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 529 | } |
| 530 | if( fNoHidden || fOnlyHidden ){ |
| 531 | const char* zUnaryOp = fNoHidden ? "NOT" : ""; |
| 532 | blob_append_sql(&sql, |
| 533 | " AND %s EXISTS(SELECT 1 FROM tagxref" |
| 534 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", |
| 535 | zUnaryOp/*safe-for-%s*/, TAG_HIDDEN); |
| 536 | } |
| 537 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 538 | blob_reset(&sql); |
| 539 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 540 | ** many descenders to (off-screen) parents. */ |
| 541 | tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 542 | if( fNg==0 ) tmFlags |= TIMELINE_GRAPH; |
| 543 | if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR; |
| 544 | if( fUBg ) tmFlags |= TIMELINE_UCOLOR; |
| 545 | www_print_timeline(&q, tmFlags, 0, 0, 0, 0); |
| 546 | db_finalize(&q); |
| 547 | @ <br /> |
| 548 | style_footer(); |
| 549 | } |
| 550 | |
| 551 |
+2
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -330,10 +330,12 @@ | ||
| 330 | 330 | zStyle = "Columnar"; |
| 331 | 331 | }else if( tmFlags & TIMELINE_COMPACT ){ |
| 332 | 332 | zStyle = "Compact"; |
| 333 | 333 | }else if( tmFlags & TIMELINE_VERBOSE ){ |
| 334 | 334 | zStyle = "Verbose"; |
| 335 | + }else if( tmFlags & TIMELINE_CLASSIC ){ | |
| 336 | + zStyle = "Classic"; | |
| 335 | 337 | }else{ |
| 336 | 338 | zStyle = "Modern"; |
| 337 | 339 | } |
| 338 | 340 | url_initialize(&url, "finfo"); |
| 339 | 341 | if( brBg ) url_add_parameter(&url, "brbg", 0); |
| 340 | 342 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -330,10 +330,12 @@ | |
| 330 | zStyle = "Columnar"; |
| 331 | }else if( tmFlags & TIMELINE_COMPACT ){ |
| 332 | zStyle = "Compact"; |
| 333 | }else if( tmFlags & TIMELINE_VERBOSE ){ |
| 334 | zStyle = "Verbose"; |
| 335 | }else{ |
| 336 | zStyle = "Modern"; |
| 337 | } |
| 338 | url_initialize(&url, "finfo"); |
| 339 | if( brBg ) url_add_parameter(&url, "brbg", 0); |
| 340 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -330,10 +330,12 @@ | |
| 330 | zStyle = "Columnar"; |
| 331 | }else if( tmFlags & TIMELINE_COMPACT ){ |
| 332 | zStyle = "Compact"; |
| 333 | }else if( tmFlags & TIMELINE_VERBOSE ){ |
| 334 | zStyle = "Verbose"; |
| 335 | }else if( tmFlags & TIMELINE_CLASSIC ){ |
| 336 | zStyle = "Classic"; |
| 337 | }else{ |
| 338 | zStyle = "Modern"; |
| 339 | } |
| 340 | url_initialize(&url, "finfo"); |
| 341 | if( brBg ) url_add_parameter(&url, "brbg", 0); |
| 342 |
+2
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -330,10 +330,12 @@ | ||
| 330 | 330 | zStyle = "Columnar"; |
| 331 | 331 | }else if( tmFlags & TIMELINE_COMPACT ){ |
| 332 | 332 | zStyle = "Compact"; |
| 333 | 333 | }else if( tmFlags & TIMELINE_VERBOSE ){ |
| 334 | 334 | zStyle = "Verbose"; |
| 335 | + }else if( tmFlags & TIMELINE_CLASSIC ){ | |
| 336 | + zStyle = "Classic"; | |
| 335 | 337 | }else{ |
| 336 | 338 | zStyle = "Modern"; |
| 337 | 339 | } |
| 338 | 340 | url_initialize(&url, "finfo"); |
| 339 | 341 | if( brBg ) url_add_parameter(&url, "brbg", 0); |
| 340 | 342 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -330,10 +330,12 @@ | |
| 330 | zStyle = "Columnar"; |
| 331 | }else if( tmFlags & TIMELINE_COMPACT ){ |
| 332 | zStyle = "Compact"; |
| 333 | }else if( tmFlags & TIMELINE_VERBOSE ){ |
| 334 | zStyle = "Verbose"; |
| 335 | }else{ |
| 336 | zStyle = "Modern"; |
| 337 | } |
| 338 | url_initialize(&url, "finfo"); |
| 339 | if( brBg ) url_add_parameter(&url, "brbg", 0); |
| 340 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -330,10 +330,12 @@ | |
| 330 | zStyle = "Columnar"; |
| 331 | }else if( tmFlags & TIMELINE_COMPACT ){ |
| 332 | zStyle = "Compact"; |
| 333 | }else if( tmFlags & TIMELINE_VERBOSE ){ |
| 334 | zStyle = "Verbose"; |
| 335 | }else if( tmFlags & TIMELINE_CLASSIC ){ |
| 336 | zStyle = "Classic"; |
| 337 | }else{ |
| 338 | zStyle = "Modern"; |
| 339 | } |
| 340 | url_initialize(&url, "finfo"); |
| 341 | if( brBg ) url_add_parameter(&url, "brbg", 0); |
| 342 |
+36
-9
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -685,29 +685,56 @@ | ||
| 685 | 685 | /* |
| 686 | 686 | ** WEBPAGE: /tagtimeline |
| 687 | 687 | ** |
| 688 | 688 | ** Render a timeline with all check-ins that contain non-propagating |
| 689 | 689 | ** symbolic tags. |
| 690 | +** | |
| 691 | +** Query parameters: | |
| 692 | +** | |
| 693 | +** ng No graph | |
| 694 | +** nohidden Hide check-ins with "hidden" tag | |
| 695 | +** onlyhidden Show only check-ins with "hidden" tag | |
| 696 | +** brbg Background color by branch name | |
| 697 | +** ubg Background color by user name | |
| 690 | 698 | */ |
| 691 | 699 | void tagtimeline_page(void){ |
| 700 | + Blob sql = empty_blob; | |
| 692 | 701 | Stmt q; |
| 702 | + int tmFlags; /* Timeline display flags */ | |
| 703 | + int fNoHidden = PB("nohidden")!=0; /* The "nohidden" query parameter */ | |
| 704 | + int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */ | |
| 693 | 705 | |
| 694 | 706 | login_check_credentials(); |
| 695 | 707 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 696 | 708 | |
| 697 | 709 | style_header("Tagged Check-ins"); |
| 698 | 710 | style_submenu_element("List", "taglist"); |
| 699 | 711 | login_anonymous_available(); |
| 712 | + timeline_ss_submenu(); | |
| 713 | + cookie_render(); | |
| 700 | 714 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 701 | - db_prepare(&q, | |
| 702 | - "%s AND blob.rid IN (SELECT rid FROM tagxref" | |
| 703 | - " WHERE tagtype=1 AND srcid>0" | |
| 704 | - " AND tagid IN (SELECT tagid FROM tag " | |
| 705 | - " WHERE tagname GLOB 'sym-*'))" | |
| 706 | - " ORDER BY event.mtime DESC /*sort*/", | |
| 707 | - timeline_query_for_www() | |
| 708 | - ); | |
| 709 | - www_print_timeline(&q, 0, 0, 0, 0, 0); | |
| 715 | + blob_append(&sql, timeline_query_for_www(), -1); | |
| 716 | + blob_append_sql(&sql, | |
| 717 | + "AND blob.rid IN (SELECT rid FROM tagxref" | |
| 718 | + " WHERE tagtype=1 AND srcid>0" | |
| 719 | + " AND tagid IN (SELECT tagid FROM tag " | |
| 720 | + " WHERE tagname GLOB 'sym-*'))"); | |
| 721 | + if( fNoHidden || fOnlyHidden ){ | |
| 722 | + const char* zUnaryOp = fNoHidden ? "NOT" : ""; | |
| 723 | + blob_append_sql(&sql, | |
| 724 | + " AND %s EXISTS(SELECT 1 FROM tagxref" | |
| 725 | + " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", | |
| 726 | + zUnaryOp/*safe-for-%s*/, TAG_HIDDEN); | |
| 727 | + } | |
| 728 | + db_prepare(&q, "%s ORDER BY event.mtime DESC /*sort*/", blob_sql_text(&sql)); | |
| 729 | + blob_reset(&sql); | |
| 730 | + /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too | |
| 731 | + ** many descenders to (off-screen) parents. */ | |
| 732 | + tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; | |
| 733 | + if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 734 | + if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 735 | + if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 736 | + www_print_timeline(&q, tmFlags, 0, 0, 0, 0); | |
| 710 | 737 | db_finalize(&q); |
| 711 | 738 | @ <br /> |
| 712 | 739 | style_footer(); |
| 713 | 740 | } |
| 714 | 741 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -685,29 +685,56 @@ | |
| 685 | /* |
| 686 | ** WEBPAGE: /tagtimeline |
| 687 | ** |
| 688 | ** Render a timeline with all check-ins that contain non-propagating |
| 689 | ** symbolic tags. |
| 690 | */ |
| 691 | void tagtimeline_page(void){ |
| 692 | Stmt q; |
| 693 | |
| 694 | login_check_credentials(); |
| 695 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 696 | |
| 697 | style_header("Tagged Check-ins"); |
| 698 | style_submenu_element("List", "taglist"); |
| 699 | login_anonymous_available(); |
| 700 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 701 | db_prepare(&q, |
| 702 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 703 | " WHERE tagtype=1 AND srcid>0" |
| 704 | " AND tagid IN (SELECT tagid FROM tag " |
| 705 | " WHERE tagname GLOB 'sym-*'))" |
| 706 | " ORDER BY event.mtime DESC /*sort*/", |
| 707 | timeline_query_for_www() |
| 708 | ); |
| 709 | www_print_timeline(&q, 0, 0, 0, 0, 0); |
| 710 | db_finalize(&q); |
| 711 | @ <br /> |
| 712 | style_footer(); |
| 713 | } |
| 714 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -685,29 +685,56 @@ | |
| 685 | /* |
| 686 | ** WEBPAGE: /tagtimeline |
| 687 | ** |
| 688 | ** Render a timeline with all check-ins that contain non-propagating |
| 689 | ** symbolic tags. |
| 690 | ** |
| 691 | ** Query parameters: |
| 692 | ** |
| 693 | ** ng No graph |
| 694 | ** nohidden Hide check-ins with "hidden" tag |
| 695 | ** onlyhidden Show only check-ins with "hidden" tag |
| 696 | ** brbg Background color by branch name |
| 697 | ** ubg Background color by user name |
| 698 | */ |
| 699 | void tagtimeline_page(void){ |
| 700 | Blob sql = empty_blob; |
| 701 | Stmt q; |
| 702 | int tmFlags; /* Timeline display flags */ |
| 703 | int fNoHidden = PB("nohidden")!=0; /* The "nohidden" query parameter */ |
| 704 | int fOnlyHidden = PB("onlyhidden")!=0; /* The "onlyhidden" query parameter */ |
| 705 | |
| 706 | login_check_credentials(); |
| 707 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 708 | |
| 709 | style_header("Tagged Check-ins"); |
| 710 | style_submenu_element("List", "taglist"); |
| 711 | login_anonymous_available(); |
| 712 | timeline_ss_submenu(); |
| 713 | cookie_render(); |
| 714 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 715 | blob_append(&sql, timeline_query_for_www(), -1); |
| 716 | blob_append_sql(&sql, |
| 717 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 718 | " WHERE tagtype=1 AND srcid>0" |
| 719 | " AND tagid IN (SELECT tagid FROM tag " |
| 720 | " WHERE tagname GLOB 'sym-*'))"); |
| 721 | if( fNoHidden || fOnlyHidden ){ |
| 722 | const char* zUnaryOp = fNoHidden ? "NOT" : ""; |
| 723 | blob_append_sql(&sql, |
| 724 | " AND %s EXISTS(SELECT 1 FROM tagxref" |
| 725 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", |
| 726 | zUnaryOp/*safe-for-%s*/, TAG_HIDDEN); |
| 727 | } |
| 728 | db_prepare(&q, "%s ORDER BY event.mtime DESC /*sort*/", blob_sql_text(&sql)); |
| 729 | blob_reset(&sql); |
| 730 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 731 | ** many descenders to (off-screen) parents. */ |
| 732 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 733 | if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 734 | if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 735 | if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 736 | www_print_timeline(&q, tmFlags, 0, 0, 0, 0); |
| 737 | db_finalize(&q); |
| 738 | @ <br /> |
| 739 | style_footer(); |
| 740 | } |
| 741 |