Fossil SCM
Add the 'hide' query parameter to remove check-ins tagged as "hidden" (which are shown by default) for the /leaves, /brtimeline, and /tagtimeline web pages. (Rationale: listings of open leaves not tagged as "hidden" can make handy TODO lists.)
Commit
92fa3664621423e994df7eb13b99c749cb1e2806ce28cba8163d66eeb94678f4
Parent
8f4b7e1f37060f2…
3 files changed
+13
-6
+11
+15
-8
+13
-6
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -617,14 +617,16 @@ | ||
| 617 | 617 | ** Show a timeline of all branches |
| 618 | 618 | ** |
| 619 | 619 | ** Query parameters: |
| 620 | 620 | ** |
| 621 | 621 | ** ng No graph |
| 622 | +** hide Hide check-ins with "hidden" tag | |
| 622 | 623 | ** brbg Background color by branch name |
| 623 | 624 | ** ubg Background color by user name |
| 624 | 625 | */ |
| 625 | 626 | void brtimeline_page(void){ |
| 627 | + Blob sql = empty_blob; | |
| 626 | 628 | Stmt q; |
| 627 | 629 | int tmFlags; /* Timeline display flags */ |
| 628 | 630 | |
| 629 | 631 | login_check_credentials(); |
| 630 | 632 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| @@ -633,16 +635,21 @@ | ||
| 633 | 635 | style_submenu_element("List", "brlist"); |
| 634 | 636 | login_anonymous_available(); |
| 635 | 637 | timeline_ss_submenu(); |
| 636 | 638 | cookie_render(); |
| 637 | 639 | @ <h2>The initial check-in for each branch:</h2> |
| 638 | - db_prepare(&q, | |
| 639 | - "%s AND blob.rid IN (SELECT rid FROM tagxref" | |
| 640 | - " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" | |
| 641 | - " ORDER BY event.mtime DESC", | |
| 642 | - timeline_query_for_www(), TAG_BRANCH | |
| 643 | - ); | |
| 640 | + blob_append(&sql, timeline_query_for_www(), -1); | |
| 641 | + blob_append_sql(&sql, | |
| 642 | + "AND blob.rid IN (SELECT rid FROM tagxref" | |
| 643 | + " WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH); | |
| 644 | + if( P("hide") ){ | |
| 645 | + blob_append_sql(&sql, | |
| 646 | + " AND NOT EXISTS(SELECT 1 FROM tagxref" | |
| 647 | + " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); | |
| 648 | + } | |
| 649 | + db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); | |
| 650 | + blob_reset(&sql); | |
| 644 | 651 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 645 | 652 | ** many descenders to (off-screen) parents. */ |
| 646 | 653 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 647 | 654 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 648 | 655 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 649 | 656 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -617,14 +617,16 @@ | |
| 617 | ** Show a timeline of all branches |
| 618 | ** |
| 619 | ** Query parameters: |
| 620 | ** |
| 621 | ** ng No graph |
| 622 | ** brbg Background color by branch name |
| 623 | ** ubg Background color by user name |
| 624 | */ |
| 625 | void brtimeline_page(void){ |
| 626 | Stmt q; |
| 627 | int tmFlags; /* Timeline display flags */ |
| 628 | |
| 629 | login_check_credentials(); |
| 630 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| @@ -633,16 +635,21 @@ | |
| 633 | style_submenu_element("List", "brlist"); |
| 634 | login_anonymous_available(); |
| 635 | timeline_ss_submenu(); |
| 636 | cookie_render(); |
| 637 | @ <h2>The initial check-in for each branch:</h2> |
| 638 | db_prepare(&q, |
| 639 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 640 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 641 | " ORDER BY event.mtime DESC", |
| 642 | timeline_query_for_www(), TAG_BRANCH |
| 643 | ); |
| 644 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 645 | ** many descenders to (off-screen) parents. */ |
| 646 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 647 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 648 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 649 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -617,14 +617,16 @@ | |
| 617 | ** Show a timeline of all branches |
| 618 | ** |
| 619 | ** Query parameters: |
| 620 | ** |
| 621 | ** ng No graph |
| 622 | ** hide Hide check-ins with "hidden" tag |
| 623 | ** brbg Background color by branch name |
| 624 | ** ubg Background color by user name |
| 625 | */ |
| 626 | void brtimeline_page(void){ |
| 627 | Blob sql = empty_blob; |
| 628 | Stmt q; |
| 629 | int tmFlags; /* Timeline display flags */ |
| 630 | |
| 631 | login_check_credentials(); |
| 632 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| @@ -633,16 +635,21 @@ | |
| 635 | style_submenu_element("List", "brlist"); |
| 636 | login_anonymous_available(); |
| 637 | timeline_ss_submenu(); |
| 638 | cookie_render(); |
| 639 | @ <h2>The initial check-in for each branch:</h2> |
| 640 | blob_append(&sql, timeline_query_for_www(), -1); |
| 641 | blob_append_sql(&sql, |
| 642 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 643 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH); |
| 644 | if( P("hide") ){ |
| 645 | blob_append_sql(&sql, |
| 646 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 647 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 648 | } |
| 649 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 650 | blob_reset(&sql); |
| 651 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 652 | ** many descenders to (off-screen) parents. */ |
| 653 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 654 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 655 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 656 |
+11
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -455,19 +455,21 @@ | ||
| 455 | 455 | ** Query parameters: |
| 456 | 456 | ** |
| 457 | 457 | ** all Show all leaves |
| 458 | 458 | ** closed Show only closed leaves |
| 459 | 459 | ** ng No graph |
| 460 | +** hide Hide check-ins with "hidden" tag | |
| 460 | 461 | ** brbg Background color by branch name |
| 461 | 462 | ** ubg Background color by user name |
| 462 | 463 | */ |
| 463 | 464 | void leaves_page(void){ |
| 464 | 465 | Blob sql; |
| 465 | 466 | Stmt q; |
| 466 | 467 | int showAll = P("all")!=0; |
| 467 | 468 | int showClosed = P("closed")!=0; |
| 468 | 469 | int fNg = P("ng")!=0; /* Flag for the "ng" query parameter */ |
| 470 | + int fHide = P("hide")!=0; /* Flag for the "hide" query parameter */ | |
| 469 | 471 | int fBrBg = P("brbg")!=0; /* Flag for the "brbg" query parameter */ |
| 470 | 472 | int fUBg = P("ubg")!=0; /* Flag for the "ubg" query parameter */ |
| 471 | 473 | Blob QueryParams = empty_blob; /* Concatenated query parameters */ |
| 472 | 474 | char *zParamSep = 0; /* Query parameter separator */ |
| 473 | 475 | int tmFlags; /* Timeline display flags */ |
| @@ -476,10 +478,14 @@ | ||
| 476 | 478 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 477 | 479 | if( fNg ){ |
| 478 | 480 | blob_appendf(&QueryParams, "%s%s", zParamSep, "ng"); |
| 479 | 481 | zParamSep = "&"; |
| 480 | 482 | } |
| 483 | + if( fHide ){ | |
| 484 | + blob_appendf(&QueryParams, "%s%s", zParamSep, "hide"); | |
| 485 | + zParamSep = "&"; | |
| 486 | + } | |
| 481 | 487 | if( fBrBg ){ |
| 482 | 488 | blob_appendf(&QueryParams, "%s%s", zParamSep, "brbg"); |
| 483 | 489 | zParamSep = "&"; |
| 484 | 490 | } |
| 485 | 491 | if( fUBg ){ |
| @@ -532,10 +538,15 @@ | ||
| 532 | 538 | if( showClosed ){ |
| 533 | 539 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 534 | 540 | }else if( !showAll ){ |
| 535 | 541 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 536 | 542 | } |
| 543 | + if( fHide ){ | |
| 544 | + blob_append_sql(&sql, | |
| 545 | + " AND NOT EXISTS(SELECT 1 FROM tagxref" | |
| 546 | + " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); | |
| 547 | + } | |
| 537 | 548 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 538 | 549 | blob_reset(&sql); |
| 539 | 550 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 540 | 551 | ** many descenders to (off-screen) parents. */ |
| 541 | 552 | tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 542 | 553 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -455,19 +455,21 @@ | |
| 455 | ** Query parameters: |
| 456 | ** |
| 457 | ** all Show all leaves |
| 458 | ** closed Show only closed leaves |
| 459 | ** ng No graph |
| 460 | ** brbg Background color by branch name |
| 461 | ** ubg Background color by user name |
| 462 | */ |
| 463 | void leaves_page(void){ |
| 464 | Blob sql; |
| 465 | Stmt q; |
| 466 | int showAll = P("all")!=0; |
| 467 | int showClosed = P("closed")!=0; |
| 468 | int fNg = P("ng")!=0; /* Flag for the "ng" query parameter */ |
| 469 | int fBrBg = P("brbg")!=0; /* Flag for the "brbg" query parameter */ |
| 470 | int fUBg = P("ubg")!=0; /* Flag for the "ubg" query parameter */ |
| 471 | Blob QueryParams = empty_blob; /* Concatenated query parameters */ |
| 472 | char *zParamSep = 0; /* Query parameter separator */ |
| 473 | int tmFlags; /* Timeline display flags */ |
| @@ -476,10 +478,14 @@ | |
| 476 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 477 | if( fNg ){ |
| 478 | blob_appendf(&QueryParams, "%s%s", zParamSep, "ng"); |
| 479 | zParamSep = "&"; |
| 480 | } |
| 481 | if( fBrBg ){ |
| 482 | blob_appendf(&QueryParams, "%s%s", zParamSep, "brbg"); |
| 483 | zParamSep = "&"; |
| 484 | } |
| 485 | if( fUBg ){ |
| @@ -532,10 +538,15 @@ | |
| 532 | if( showClosed ){ |
| 533 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 534 | }else if( !showAll ){ |
| 535 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 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 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -455,19 +455,21 @@ | |
| 455 | ** Query parameters: |
| 456 | ** |
| 457 | ** all Show all leaves |
| 458 | ** closed Show only closed leaves |
| 459 | ** ng No graph |
| 460 | ** hide Hide check-ins with "hidden" tag |
| 461 | ** brbg Background color by branch name |
| 462 | ** ubg Background color by user name |
| 463 | */ |
| 464 | void leaves_page(void){ |
| 465 | Blob sql; |
| 466 | Stmt q; |
| 467 | int showAll = P("all")!=0; |
| 468 | int showClosed = P("closed")!=0; |
| 469 | int fNg = P("ng")!=0; /* Flag for the "ng" query parameter */ |
| 470 | int fHide = P("hide")!=0; /* Flag for the "hide" query parameter */ |
| 471 | int fBrBg = P("brbg")!=0; /* Flag for the "brbg" query parameter */ |
| 472 | int fUBg = P("ubg")!=0; /* Flag for the "ubg" query parameter */ |
| 473 | Blob QueryParams = empty_blob; /* Concatenated query parameters */ |
| 474 | char *zParamSep = 0; /* Query parameter separator */ |
| 475 | int tmFlags; /* Timeline display flags */ |
| @@ -476,10 +478,14 @@ | |
| 478 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 479 | if( fNg ){ |
| 480 | blob_appendf(&QueryParams, "%s%s", zParamSep, "ng"); |
| 481 | zParamSep = "&"; |
| 482 | } |
| 483 | if( fHide ){ |
| 484 | blob_appendf(&QueryParams, "%s%s", zParamSep, "hide"); |
| 485 | zParamSep = "&"; |
| 486 | } |
| 487 | if( fBrBg ){ |
| 488 | blob_appendf(&QueryParams, "%s%s", zParamSep, "brbg"); |
| 489 | zParamSep = "&"; |
| 490 | } |
| 491 | if( fUBg ){ |
| @@ -532,10 +538,15 @@ | |
| 538 | if( showClosed ){ |
| 539 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 540 | }else if( !showAll ){ |
| 541 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 542 | } |
| 543 | if( fHide ){ |
| 544 | blob_append_sql(&sql, |
| 545 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 546 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 547 | } |
| 548 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 549 | blob_reset(&sql); |
| 550 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 551 | ** many descenders to (off-screen) parents. */ |
| 552 | tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 553 |
+15
-8
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -689,14 +689,16 @@ | ||
| 689 | 689 | ** symbolic tags. |
| 690 | 690 | ** |
| 691 | 691 | ** Query parameters: |
| 692 | 692 | ** |
| 693 | 693 | ** ng No graph |
| 694 | +** hide Hide check-ins with "hidden" tag | |
| 694 | 695 | ** brbg Background color by branch name |
| 695 | 696 | ** ubg Background color by user name |
| 696 | 697 | */ |
| 697 | 698 | void tagtimeline_page(void){ |
| 699 | + Blob sql = empty_blob; | |
| 698 | 700 | Stmt q; |
| 699 | 701 | int tmFlags; /* Timeline display flags */ |
| 700 | 702 | |
| 701 | 703 | login_check_credentials(); |
| 702 | 704 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| @@ -705,18 +707,23 @@ | ||
| 705 | 707 | style_submenu_element("List", "taglist"); |
| 706 | 708 | login_anonymous_available(); |
| 707 | 709 | timeline_ss_submenu(); |
| 708 | 710 | cookie_render(); |
| 709 | 711 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 710 | - db_prepare(&q, | |
| 711 | - "%s AND blob.rid IN (SELECT rid FROM tagxref" | |
| 712 | - " WHERE tagtype=1 AND srcid>0" | |
| 713 | - " AND tagid IN (SELECT tagid FROM tag " | |
| 714 | - " WHERE tagname GLOB 'sym-*'))" | |
| 715 | - " ORDER BY event.mtime DESC /*sort*/", | |
| 716 | - timeline_query_for_www() | |
| 717 | - ); | |
| 712 | + blob_append(&sql, timeline_query_for_www(), -1); | |
| 713 | + blob_append_sql(&sql, | |
| 714 | + "AND blob.rid IN (SELECT rid FROM tagxref" | |
| 715 | + " WHERE tagtype=1 AND srcid>0" | |
| 716 | + " AND tagid IN (SELECT tagid FROM tag " | |
| 717 | + " WHERE tagname GLOB 'sym-*'))"); | |
| 718 | + if( P("hide") ){ | |
| 719 | + blob_append_sql(&sql, | |
| 720 | + " AND NOT EXISTS(SELECT 1 FROM tagxref" | |
| 721 | + " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); | |
| 722 | + } | |
| 723 | + db_prepare(&q, "%s ORDER BY event.mtime DESC /*sort*/", blob_sql_text(&sql)); | |
| 724 | + blob_reset(&sql); | |
| 718 | 725 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 719 | 726 | ** many descenders to (off-screen) parents. */ |
| 720 | 727 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 721 | 728 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 722 | 729 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 723 | 730 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -689,14 +689,16 @@ | |
| 689 | ** symbolic tags. |
| 690 | ** |
| 691 | ** Query parameters: |
| 692 | ** |
| 693 | ** ng No graph |
| 694 | ** brbg Background color by branch name |
| 695 | ** ubg Background color by user name |
| 696 | */ |
| 697 | void tagtimeline_page(void){ |
| 698 | Stmt q; |
| 699 | int tmFlags; /* Timeline display flags */ |
| 700 | |
| 701 | login_check_credentials(); |
| 702 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| @@ -705,18 +707,23 @@ | |
| 705 | style_submenu_element("List", "taglist"); |
| 706 | login_anonymous_available(); |
| 707 | timeline_ss_submenu(); |
| 708 | cookie_render(); |
| 709 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 710 | db_prepare(&q, |
| 711 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 712 | " WHERE tagtype=1 AND srcid>0" |
| 713 | " AND tagid IN (SELECT tagid FROM tag " |
| 714 | " WHERE tagname GLOB 'sym-*'))" |
| 715 | " ORDER BY event.mtime DESC /*sort*/", |
| 716 | timeline_query_for_www() |
| 717 | ); |
| 718 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 719 | ** many descenders to (off-screen) parents. */ |
| 720 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 721 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 722 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 723 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -689,14 +689,16 @@ | |
| 689 | ** symbolic tags. |
| 690 | ** |
| 691 | ** Query parameters: |
| 692 | ** |
| 693 | ** ng No graph |
| 694 | ** hide Hide check-ins with "hidden" tag |
| 695 | ** brbg Background color by branch name |
| 696 | ** ubg Background color by user name |
| 697 | */ |
| 698 | void tagtimeline_page(void){ |
| 699 | Blob sql = empty_blob; |
| 700 | Stmt q; |
| 701 | int tmFlags; /* Timeline display flags */ |
| 702 | |
| 703 | login_check_credentials(); |
| 704 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| @@ -705,18 +707,23 @@ | |
| 707 | style_submenu_element("List", "taglist"); |
| 708 | login_anonymous_available(); |
| 709 | timeline_ss_submenu(); |
| 710 | cookie_render(); |
| 711 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 712 | blob_append(&sql, timeline_query_for_www(), -1); |
| 713 | blob_append_sql(&sql, |
| 714 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 715 | " WHERE tagtype=1 AND srcid>0" |
| 716 | " AND tagid IN (SELECT tagid FROM tag " |
| 717 | " WHERE tagname GLOB 'sym-*'))"); |
| 718 | if( P("hide") ){ |
| 719 | blob_append_sql(&sql, |
| 720 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 721 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 722 | } |
| 723 | db_prepare(&q, "%s ORDER BY event.mtime DESC /*sort*/", blob_sql_text(&sql)); |
| 724 | blob_reset(&sql); |
| 725 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 726 | ** many descenders to (off-screen) parents. */ |
| 727 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 728 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 729 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 730 |