Fossil SCM
Add a "Show/Hide Files" button under the "Context" section of the check-in page.
Commit
4932465eccfe6fae9b6f5b33d9456927bb8515f7
Parent
04e6a82ed763e26…
1 file changed
+43
-10
+43
-10
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -264,10 +264,11 @@ | ||
| 264 | 264 | int tagtype = db_column_int(&q, 5); |
| 265 | 265 | const char *zOrigUuid = db_column_text(&q, 6); |
| 266 | 266 | cnt++; |
| 267 | 267 | if( cnt==1 ){ |
| 268 | 268 | @ <div class="section">Tags And Properties</div> |
| 269 | + @ <div class="sectionbody"> | |
| 269 | 270 | @ <ul> |
| 270 | 271 | } |
| 271 | 272 | @ <li> |
| 272 | 273 | if( tagtype==0 ){ |
| 273 | 274 | @ <span class="infoTagCancelled">%h(zTagname)</span> cancelled |
| @@ -303,21 +304,35 @@ | ||
| 303 | 304 | @ </li> |
| 304 | 305 | } |
| 305 | 306 | db_finalize(&q); |
| 306 | 307 | if( cnt ){ |
| 307 | 308 | @ </ul> |
| 309 | + @ </div> | |
| 308 | 310 | } |
| 309 | 311 | } |
| 310 | 312 | |
| 311 | 313 | /* |
| 312 | 314 | ** Show the context graph (immediate parents and children) for |
| 313 | 315 | ** check-in rid. |
| 314 | 316 | */ |
| 315 | -static void showContext(int rid){ | |
| 317 | +static void showContext(int rid, HQuery *pUrl){ | |
| 316 | 318 | Blob sql; |
| 317 | 319 | Stmt q; |
| 320 | + int tmFlags = TIMELINE_DISJOINT | TIMELINE_GRAPH; | |
| 321 | + char *zLink; | |
| 318 | 322 | @ <div class="section">Context</div> |
| 323 | + @ <div class="sectionmenu"> | |
| 324 | + if( PB("v") ){ | |
| 325 | + tmFlags |= TIMELINE_FCHANGES; | |
| 326 | + zLink = xhref("class='button'", "%s", url_render(pUrl,"v",0,0,0)); | |
| 327 | + @ %z(zLink)Omit Files</a> | |
| 328 | + }else{ | |
| 329 | + zLink = xhref("class='button'", "%s", url_render(pUrl,"v","1",0,0)); | |
| 330 | + @ %z(zLink)Show Files</a> | |
| 331 | + } | |
| 332 | + @ </div> | |
| 333 | + @ <div class="sectionbody"> | |
| 319 | 334 | blob_zero(&sql); |
| 320 | 335 | blob_append(&sql, timeline_query_for_www(), -1); |
| 321 | 336 | db_multi_exec( |
| 322 | 337 | "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);" |
| 323 | 338 | "INSERT INTO ok VALUES(%d);" |
| @@ -325,12 +340,13 @@ | ||
| 325 | 340 | "INSERT OR IGNORE INTO ok SELECT cid FROM plink WHERE pid=%d;", |
| 326 | 341 | rid, rid, rid |
| 327 | 342 | ); |
| 328 | 343 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 329 | 344 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 330 | - www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, rid, 0); | |
| 345 | + www_print_timeline(&q, tmFlags, 0, 0, rid, 0); | |
| 331 | 346 | db_finalize(&q); |
| 347 | + @ </div> | |
| 332 | 348 | } |
| 333 | 349 | |
| 334 | 350 | |
| 335 | 351 | /* |
| 336 | 352 | ** Append the difference between artifacts to the output |
| @@ -525,10 +541,11 @@ | ||
| 525 | 541 | const char *zRe; /* regex parameter */ |
| 526 | 542 | ReCompiled *pRe = 0; /* regex */ |
| 527 | 543 | const char *zW; /* URL param for ignoring whitespace */ |
| 528 | 544 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 529 | 545 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 546 | + HQuery url; | |
| 530 | 547 | |
| 531 | 548 | login_check_credentials(); |
| 532 | 549 | if( !g.perm.Read ){ login_needed(); return; } |
| 533 | 550 | zName = P("name"); |
| 534 | 551 | rid = name_to_rid_www("name"); |
| @@ -576,10 +593,11 @@ | ||
| 576 | 593 | zUser = db_column_text(&q1, 2); |
| 577 | 594 | zComment = db_column_text(&q1, 3); |
| 578 | 595 | zDate = db_column_text(&q1,1); |
| 579 | 596 | zOrigDate = db_column_text(&q1, 4); |
| 580 | 597 | @ <div class="section">Overview</div> |
| 598 | + @ <div class="sectionbody"> | |
| 581 | 599 | @ <table class="label-value"> |
| 582 | 600 | @ <tr><th>SHA1 Hash:</th><td>%s(zUuid) |
| 583 | 601 | if( g.perm.Setup ){ |
| 584 | 602 | @ (Record ID: %d(rid)) |
| 585 | 603 | } |
| @@ -681,26 +699,28 @@ | ||
| 681 | 699 | } |
| 682 | 700 | @ </td> |
| 683 | 701 | @ </tr> |
| 684 | 702 | blob_reset(&projName); |
| 685 | 703 | } |
| 686 | - @ </table> | |
| 704 | + @ </table></div> | |
| 687 | 705 | }else{ |
| 688 | 706 | style_header("Check-in Information"); |
| 689 | 707 | login_anonymous_available(); |
| 690 | 708 | } |
| 691 | 709 | db_finalize(&q1); |
| 692 | - showTags(rid); | |
| 693 | - showContext(rid); | |
| 694 | - @ <div class="section">Changes</div> | |
| 695 | - @ <div class="sectionmenu"> | |
| 696 | 710 | verboseFlag = g.zPath[0]!='c'; |
| 697 | 711 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 698 | 712 | verboseFlag = !verboseFlag; |
| 699 | 713 | zPage = "ci"; |
| 700 | 714 | zPageHide = "vinfo"; |
| 701 | 715 | } |
| 716 | + showTags(rid); | |
| 717 | + url_initialize(&url, zPage); | |
| 718 | + cgi_query_parameters_to_url(&url); | |
| 719 | + showContext(rid, &url); | |
| 720 | + @ <div class="section">Changes</div> | |
| 721 | + @ <div class="sectionmenu"> | |
| 702 | 722 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 703 | 723 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 704 | 724 | if( verboseFlag ){ |
| 705 | 725 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 706 | 726 | @ Hide Diffs</a> |
| @@ -726,11 +746,12 @@ | ||
| 726 | 746 | } |
| 727 | 747 | if( zParent ){ |
| 728 | 748 | @ %z(xhref("class='button'","%R/vpatch?from=%s&to=%s",zParent,zUuid)) |
| 729 | 749 | @ Patch</a> |
| 730 | 750 | } |
| 731 | - @</div> | |
| 751 | + @ </div> | |
| 752 | + @ <div class="sectionbody"> | |
| 732 | 753 | if( pRe ){ |
| 733 | 754 | @ <p><b>Only differences that match regular expression "%h(zRe)" |
| 734 | 755 | @ are shown.</b></p> |
| 735 | 756 | } |
| 736 | 757 | db_prepare(&q3, |
| @@ -753,10 +774,11 @@ | ||
| 753 | 774 | const char *zNew = db_column_text(&q3,3); |
| 754 | 775 | const char *zOldName = db_column_text(&q3, 4); |
| 755 | 776 | append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm); |
| 756 | 777 | } |
| 757 | 778 | db_finalize(&q3); |
| 779 | + @ </div> | |
| 758 | 780 | append_diff_javascript(sideBySide); |
| 759 | 781 | style_footer(); |
| 760 | 782 | } |
| 761 | 783 | |
| 762 | 784 | /* |
| @@ -811,10 +833,11 @@ | ||
| 811 | 833 | pWiki->zWikiTitle); |
| 812 | 834 | style_submenu_element("Page", "Page", "wiki?name=%t", |
| 813 | 835 | pWiki->zWikiTitle); |
| 814 | 836 | login_anonymous_available(); |
| 815 | 837 | @ <div class="section">Overview</div> |
| 838 | + @ <div class="sectionbody"> | |
| 816 | 839 | @ <p><table class="label-value"> |
| 817 | 840 | @ <tr><th>Artifact ID:</th> |
| 818 | 841 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| 819 | 842 | if( g.perm.Setup ){ |
| 820 | 843 | @ (%d(rid)) |
| @@ -837,28 +860,33 @@ | ||
| 837 | 860 | @ %z(href("info/%s",zParent))%s(zParent)</a> |
| 838 | 861 | } |
| 839 | 862 | @ </td></tr> |
| 840 | 863 | } |
| 841 | 864 | @ </table> |
| 865 | + @ </div> | |
| 842 | 866 | |
| 843 | 867 | if( g.perm.ModWiki && modPending ){ |
| 844 | 868 | @ <div class="section">Moderation</div> |
| 869 | + @ <div class="sectionbody"> | |
| 845 | 870 | @ <blockquote> |
| 846 | 871 | @ <form method="POST" action="%R/winfo/%s(zUuid)"> |
| 847 | 872 | @ <label><input type="radio" name="modaction" value="delete"> |
| 848 | 873 | @ Delete this change</label><br /> |
| 849 | 874 | @ <label><input type="radio" name="modaction" value="approve"> |
| 850 | 875 | @ Approve this change</label><br /> |
| 851 | 876 | @ <input type="submit" value="Submit"> |
| 852 | 877 | @ </form> |
| 853 | 878 | @ </blockquote> |
| 879 | + @ </div> | |
| 854 | 880 | } |
| 855 | 881 | |
| 856 | 882 | |
| 857 | 883 | @ <div class="section">Content</div> |
| 884 | + @ <div class="sectionbody"> | |
| 858 | 885 | blob_init(&wiki, pWiki->zWiki, -1); |
| 859 | 886 | wiki_convert(&wiki, 0, 0); |
| 887 | + @ </div> | |
| 860 | 888 | blob_reset(&wiki); |
| 861 | 889 | manifest_destroy(pWiki); |
| 862 | 890 | style_footer(); |
| 863 | 891 | } |
| 864 | 892 | |
| @@ -1957,11 +1985,12 @@ | ||
| 1957 | 1985 | style_submenu_element("Plaintext", "Plaintext", |
| 1958 | 1986 | "%R/info/%s?plaintext", zUuid); |
| 1959 | 1987 | } |
| 1960 | 1988 | |
| 1961 | 1989 | @ <div class="section">Overview</div> |
| 1962 | - @ <p><table class="label-value"> | |
| 1990 | + @ <div class="sectionbody"> | |
| 1991 | + @ <table class="label-value"> | |
| 1963 | 1992 | @ <tr><th>Artifact ID:</th> |
| 1964 | 1993 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| 1965 | 1994 | if( g.perm.Setup ){ |
| 1966 | 1995 | @ (%d(rid)) |
| 1967 | 1996 | } |
| @@ -1978,29 +2007,33 @@ | ||
| 1978 | 2007 | @ <tr><th>Date:</th><td> |
| 1979 | 2008 | hyperlink_to_date(zDate, "</td></tr>"); |
| 1980 | 2009 | @ <tr><th>User:</th><td> |
| 1981 | 2010 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1982 | 2011 | @ </table> |
| 2012 | + @ </div> | |
| 1983 | 2013 | free(zDate); |
| 1984 | 2014 | free(zTktTitle); |
| 1985 | 2015 | |
| 1986 | 2016 | if( g.perm.ModTkt && modPending ){ |
| 1987 | 2017 | @ <div class="section">Moderation</div> |
| 2018 | + @ <div class="sectionbody"> | |
| 1988 | 2019 | @ <blockquote> |
| 1989 | 2020 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1990 | 2021 | @ <label><input type="radio" name="modaction" value="delete"> |
| 1991 | 2022 | @ Delete this change</label><br /> |
| 1992 | 2023 | @ <label><input type="radio" name="modaction" value="approve"> |
| 1993 | 2024 | @ Approve this change</label><br /> |
| 1994 | 2025 | @ <input type="submit" value="Submit"> |
| 1995 | 2026 | @ </form> |
| 1996 | 2027 | @ </blockquote> |
| 2028 | + @ </div> | |
| 1997 | 2029 | } |
| 1998 | 2030 | |
| 1999 | 2031 | @ <div class="section">Changes</div> |
| 2000 | - @ <p> | |
| 2032 | + @ <div class="sectionbody"> | |
| 2001 | 2033 | ticket_output_change_artifact(pTktChng, 0); |
| 2034 | + @ </div> | |
| 2002 | 2035 | manifest_destroy(pTktChng); |
| 2003 | 2036 | style_footer(); |
| 2004 | 2037 | } |
| 2005 | 2038 | |
| 2006 | 2039 | |
| 2007 | 2040 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -264,10 +264,11 @@ | |
| 264 | int tagtype = db_column_int(&q, 5); |
| 265 | const char *zOrigUuid = db_column_text(&q, 6); |
| 266 | cnt++; |
| 267 | if( cnt==1 ){ |
| 268 | @ <div class="section">Tags And Properties</div> |
| 269 | @ <ul> |
| 270 | } |
| 271 | @ <li> |
| 272 | if( tagtype==0 ){ |
| 273 | @ <span class="infoTagCancelled">%h(zTagname)</span> cancelled |
| @@ -303,21 +304,35 @@ | |
| 303 | @ </li> |
| 304 | } |
| 305 | db_finalize(&q); |
| 306 | if( cnt ){ |
| 307 | @ </ul> |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | /* |
| 312 | ** Show the context graph (immediate parents and children) for |
| 313 | ** check-in rid. |
| 314 | */ |
| 315 | static void showContext(int rid){ |
| 316 | Blob sql; |
| 317 | Stmt q; |
| 318 | @ <div class="section">Context</div> |
| 319 | blob_zero(&sql); |
| 320 | blob_append(&sql, timeline_query_for_www(), -1); |
| 321 | db_multi_exec( |
| 322 | "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);" |
| 323 | "INSERT INTO ok VALUES(%d);" |
| @@ -325,12 +340,13 @@ | |
| 325 | "INSERT OR IGNORE INTO ok SELECT cid FROM plink WHERE pid=%d;", |
| 326 | rid, rid, rid |
| 327 | ); |
| 328 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 329 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 330 | www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, rid, 0); |
| 331 | db_finalize(&q); |
| 332 | } |
| 333 | |
| 334 | |
| 335 | /* |
| 336 | ** Append the difference between artifacts to the output |
| @@ -525,10 +541,11 @@ | |
| 525 | const char *zRe; /* regex parameter */ |
| 526 | ReCompiled *pRe = 0; /* regex */ |
| 527 | const char *zW; /* URL param for ignoring whitespace */ |
| 528 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 529 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 530 | |
| 531 | login_check_credentials(); |
| 532 | if( !g.perm.Read ){ login_needed(); return; } |
| 533 | zName = P("name"); |
| 534 | rid = name_to_rid_www("name"); |
| @@ -576,10 +593,11 @@ | |
| 576 | zUser = db_column_text(&q1, 2); |
| 577 | zComment = db_column_text(&q1, 3); |
| 578 | zDate = db_column_text(&q1,1); |
| 579 | zOrigDate = db_column_text(&q1, 4); |
| 580 | @ <div class="section">Overview</div> |
| 581 | @ <table class="label-value"> |
| 582 | @ <tr><th>SHA1 Hash:</th><td>%s(zUuid) |
| 583 | if( g.perm.Setup ){ |
| 584 | @ (Record ID: %d(rid)) |
| 585 | } |
| @@ -681,26 +699,28 @@ | |
| 681 | } |
| 682 | @ </td> |
| 683 | @ </tr> |
| 684 | blob_reset(&projName); |
| 685 | } |
| 686 | @ </table> |
| 687 | }else{ |
| 688 | style_header("Check-in Information"); |
| 689 | login_anonymous_available(); |
| 690 | } |
| 691 | db_finalize(&q1); |
| 692 | showTags(rid); |
| 693 | showContext(rid); |
| 694 | @ <div class="section">Changes</div> |
| 695 | @ <div class="sectionmenu"> |
| 696 | verboseFlag = g.zPath[0]!='c'; |
| 697 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 698 | verboseFlag = !verboseFlag; |
| 699 | zPage = "ci"; |
| 700 | zPageHide = "vinfo"; |
| 701 | } |
| 702 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 703 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 704 | if( verboseFlag ){ |
| 705 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 706 | @ Hide Diffs</a> |
| @@ -726,11 +746,12 @@ | |
| 726 | } |
| 727 | if( zParent ){ |
| 728 | @ %z(xhref("class='button'","%R/vpatch?from=%s&to=%s",zParent,zUuid)) |
| 729 | @ Patch</a> |
| 730 | } |
| 731 | @</div> |
| 732 | if( pRe ){ |
| 733 | @ <p><b>Only differences that match regular expression "%h(zRe)" |
| 734 | @ are shown.</b></p> |
| 735 | } |
| 736 | db_prepare(&q3, |
| @@ -753,10 +774,11 @@ | |
| 753 | const char *zNew = db_column_text(&q3,3); |
| 754 | const char *zOldName = db_column_text(&q3, 4); |
| 755 | append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm); |
| 756 | } |
| 757 | db_finalize(&q3); |
| 758 | append_diff_javascript(sideBySide); |
| 759 | style_footer(); |
| 760 | } |
| 761 | |
| 762 | /* |
| @@ -811,10 +833,11 @@ | |
| 811 | pWiki->zWikiTitle); |
| 812 | style_submenu_element("Page", "Page", "wiki?name=%t", |
| 813 | pWiki->zWikiTitle); |
| 814 | login_anonymous_available(); |
| 815 | @ <div class="section">Overview</div> |
| 816 | @ <p><table class="label-value"> |
| 817 | @ <tr><th>Artifact ID:</th> |
| 818 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| 819 | if( g.perm.Setup ){ |
| 820 | @ (%d(rid)) |
| @@ -837,28 +860,33 @@ | |
| 837 | @ %z(href("info/%s",zParent))%s(zParent)</a> |
| 838 | } |
| 839 | @ </td></tr> |
| 840 | } |
| 841 | @ </table> |
| 842 | |
| 843 | if( g.perm.ModWiki && modPending ){ |
| 844 | @ <div class="section">Moderation</div> |
| 845 | @ <blockquote> |
| 846 | @ <form method="POST" action="%R/winfo/%s(zUuid)"> |
| 847 | @ <label><input type="radio" name="modaction" value="delete"> |
| 848 | @ Delete this change</label><br /> |
| 849 | @ <label><input type="radio" name="modaction" value="approve"> |
| 850 | @ Approve this change</label><br /> |
| 851 | @ <input type="submit" value="Submit"> |
| 852 | @ </form> |
| 853 | @ </blockquote> |
| 854 | } |
| 855 | |
| 856 | |
| 857 | @ <div class="section">Content</div> |
| 858 | blob_init(&wiki, pWiki->zWiki, -1); |
| 859 | wiki_convert(&wiki, 0, 0); |
| 860 | blob_reset(&wiki); |
| 861 | manifest_destroy(pWiki); |
| 862 | style_footer(); |
| 863 | } |
| 864 | |
| @@ -1957,11 +1985,12 @@ | |
| 1957 | style_submenu_element("Plaintext", "Plaintext", |
| 1958 | "%R/info/%s?plaintext", zUuid); |
| 1959 | } |
| 1960 | |
| 1961 | @ <div class="section">Overview</div> |
| 1962 | @ <p><table class="label-value"> |
| 1963 | @ <tr><th>Artifact ID:</th> |
| 1964 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| 1965 | if( g.perm.Setup ){ |
| 1966 | @ (%d(rid)) |
| 1967 | } |
| @@ -1978,29 +2007,33 @@ | |
| 1978 | @ <tr><th>Date:</th><td> |
| 1979 | hyperlink_to_date(zDate, "</td></tr>"); |
| 1980 | @ <tr><th>User:</th><td> |
| 1981 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1982 | @ </table> |
| 1983 | free(zDate); |
| 1984 | free(zTktTitle); |
| 1985 | |
| 1986 | if( g.perm.ModTkt && modPending ){ |
| 1987 | @ <div class="section">Moderation</div> |
| 1988 | @ <blockquote> |
| 1989 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1990 | @ <label><input type="radio" name="modaction" value="delete"> |
| 1991 | @ Delete this change</label><br /> |
| 1992 | @ <label><input type="radio" name="modaction" value="approve"> |
| 1993 | @ Approve this change</label><br /> |
| 1994 | @ <input type="submit" value="Submit"> |
| 1995 | @ </form> |
| 1996 | @ </blockquote> |
| 1997 | } |
| 1998 | |
| 1999 | @ <div class="section">Changes</div> |
| 2000 | @ <p> |
| 2001 | ticket_output_change_artifact(pTktChng, 0); |
| 2002 | manifest_destroy(pTktChng); |
| 2003 | style_footer(); |
| 2004 | } |
| 2005 | |
| 2006 | |
| 2007 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -264,10 +264,11 @@ | |
| 264 | int tagtype = db_column_int(&q, 5); |
| 265 | const char *zOrigUuid = db_column_text(&q, 6); |
| 266 | cnt++; |
| 267 | if( cnt==1 ){ |
| 268 | @ <div class="section">Tags And Properties</div> |
| 269 | @ <div class="sectionbody"> |
| 270 | @ <ul> |
| 271 | } |
| 272 | @ <li> |
| 273 | if( tagtype==0 ){ |
| 274 | @ <span class="infoTagCancelled">%h(zTagname)</span> cancelled |
| @@ -303,21 +304,35 @@ | |
| 304 | @ </li> |
| 305 | } |
| 306 | db_finalize(&q); |
| 307 | if( cnt ){ |
| 308 | @ </ul> |
| 309 | @ </div> |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | /* |
| 314 | ** Show the context graph (immediate parents and children) for |
| 315 | ** check-in rid. |
| 316 | */ |
| 317 | static void showContext(int rid, HQuery *pUrl){ |
| 318 | Blob sql; |
| 319 | Stmt q; |
| 320 | int tmFlags = TIMELINE_DISJOINT | TIMELINE_GRAPH; |
| 321 | char *zLink; |
| 322 | @ <div class="section">Context</div> |
| 323 | @ <div class="sectionmenu"> |
| 324 | if( PB("v") ){ |
| 325 | tmFlags |= TIMELINE_FCHANGES; |
| 326 | zLink = xhref("class='button'", "%s", url_render(pUrl,"v",0,0,0)); |
| 327 | @ %z(zLink)Omit Files</a> |
| 328 | }else{ |
| 329 | zLink = xhref("class='button'", "%s", url_render(pUrl,"v","1",0,0)); |
| 330 | @ %z(zLink)Show Files</a> |
| 331 | } |
| 332 | @ </div> |
| 333 | @ <div class="sectionbody"> |
| 334 | blob_zero(&sql); |
| 335 | blob_append(&sql, timeline_query_for_www(), -1); |
| 336 | db_multi_exec( |
| 337 | "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);" |
| 338 | "INSERT INTO ok VALUES(%d);" |
| @@ -325,12 +340,13 @@ | |
| 340 | "INSERT OR IGNORE INTO ok SELECT cid FROM plink WHERE pid=%d;", |
| 341 | rid, rid, rid |
| 342 | ); |
| 343 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 344 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 345 | www_print_timeline(&q, tmFlags, 0, 0, rid, 0); |
| 346 | db_finalize(&q); |
| 347 | @ </div> |
| 348 | } |
| 349 | |
| 350 | |
| 351 | /* |
| 352 | ** Append the difference between artifacts to the output |
| @@ -525,10 +541,11 @@ | |
| 541 | const char *zRe; /* regex parameter */ |
| 542 | ReCompiled *pRe = 0; /* regex */ |
| 543 | const char *zW; /* URL param for ignoring whitespace */ |
| 544 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 545 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 546 | HQuery url; |
| 547 | |
| 548 | login_check_credentials(); |
| 549 | if( !g.perm.Read ){ login_needed(); return; } |
| 550 | zName = P("name"); |
| 551 | rid = name_to_rid_www("name"); |
| @@ -576,10 +593,11 @@ | |
| 593 | zUser = db_column_text(&q1, 2); |
| 594 | zComment = db_column_text(&q1, 3); |
| 595 | zDate = db_column_text(&q1,1); |
| 596 | zOrigDate = db_column_text(&q1, 4); |
| 597 | @ <div class="section">Overview</div> |
| 598 | @ <div class="sectionbody"> |
| 599 | @ <table class="label-value"> |
| 600 | @ <tr><th>SHA1 Hash:</th><td>%s(zUuid) |
| 601 | if( g.perm.Setup ){ |
| 602 | @ (Record ID: %d(rid)) |
| 603 | } |
| @@ -681,26 +699,28 @@ | |
| 699 | } |
| 700 | @ </td> |
| 701 | @ </tr> |
| 702 | blob_reset(&projName); |
| 703 | } |
| 704 | @ </table></div> |
| 705 | }else{ |
| 706 | style_header("Check-in Information"); |
| 707 | login_anonymous_available(); |
| 708 | } |
| 709 | db_finalize(&q1); |
| 710 | verboseFlag = g.zPath[0]!='c'; |
| 711 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 712 | verboseFlag = !verboseFlag; |
| 713 | zPage = "ci"; |
| 714 | zPageHide = "vinfo"; |
| 715 | } |
| 716 | showTags(rid); |
| 717 | url_initialize(&url, zPage); |
| 718 | cgi_query_parameters_to_url(&url); |
| 719 | showContext(rid, &url); |
| 720 | @ <div class="section">Changes</div> |
| 721 | @ <div class="sectionmenu"> |
| 722 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 723 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 724 | if( verboseFlag ){ |
| 725 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 726 | @ Hide Diffs</a> |
| @@ -726,11 +746,12 @@ | |
| 746 | } |
| 747 | if( zParent ){ |
| 748 | @ %z(xhref("class='button'","%R/vpatch?from=%s&to=%s",zParent,zUuid)) |
| 749 | @ Patch</a> |
| 750 | } |
| 751 | @ </div> |
| 752 | @ <div class="sectionbody"> |
| 753 | if( pRe ){ |
| 754 | @ <p><b>Only differences that match regular expression "%h(zRe)" |
| 755 | @ are shown.</b></p> |
| 756 | } |
| 757 | db_prepare(&q3, |
| @@ -753,10 +774,11 @@ | |
| 774 | const char *zNew = db_column_text(&q3,3); |
| 775 | const char *zOldName = db_column_text(&q3, 4); |
| 776 | append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm); |
| 777 | } |
| 778 | db_finalize(&q3); |
| 779 | @ </div> |
| 780 | append_diff_javascript(sideBySide); |
| 781 | style_footer(); |
| 782 | } |
| 783 | |
| 784 | /* |
| @@ -811,10 +833,11 @@ | |
| 833 | pWiki->zWikiTitle); |
| 834 | style_submenu_element("Page", "Page", "wiki?name=%t", |
| 835 | pWiki->zWikiTitle); |
| 836 | login_anonymous_available(); |
| 837 | @ <div class="section">Overview</div> |
| 838 | @ <div class="sectionbody"> |
| 839 | @ <p><table class="label-value"> |
| 840 | @ <tr><th>Artifact ID:</th> |
| 841 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| 842 | if( g.perm.Setup ){ |
| 843 | @ (%d(rid)) |
| @@ -837,28 +860,33 @@ | |
| 860 | @ %z(href("info/%s",zParent))%s(zParent)</a> |
| 861 | } |
| 862 | @ </td></tr> |
| 863 | } |
| 864 | @ </table> |
| 865 | @ </div> |
| 866 | |
| 867 | if( g.perm.ModWiki && modPending ){ |
| 868 | @ <div class="section">Moderation</div> |
| 869 | @ <div class="sectionbody"> |
| 870 | @ <blockquote> |
| 871 | @ <form method="POST" action="%R/winfo/%s(zUuid)"> |
| 872 | @ <label><input type="radio" name="modaction" value="delete"> |
| 873 | @ Delete this change</label><br /> |
| 874 | @ <label><input type="radio" name="modaction" value="approve"> |
| 875 | @ Approve this change</label><br /> |
| 876 | @ <input type="submit" value="Submit"> |
| 877 | @ </form> |
| 878 | @ </blockquote> |
| 879 | @ </div> |
| 880 | } |
| 881 | |
| 882 | |
| 883 | @ <div class="section">Content</div> |
| 884 | @ <div class="sectionbody"> |
| 885 | blob_init(&wiki, pWiki->zWiki, -1); |
| 886 | wiki_convert(&wiki, 0, 0); |
| 887 | @ </div> |
| 888 | blob_reset(&wiki); |
| 889 | manifest_destroy(pWiki); |
| 890 | style_footer(); |
| 891 | } |
| 892 | |
| @@ -1957,11 +1985,12 @@ | |
| 1985 | style_submenu_element("Plaintext", "Plaintext", |
| 1986 | "%R/info/%s?plaintext", zUuid); |
| 1987 | } |
| 1988 | |
| 1989 | @ <div class="section">Overview</div> |
| 1990 | @ <div class="sectionbody"> |
| 1991 | @ <table class="label-value"> |
| 1992 | @ <tr><th>Artifact ID:</th> |
| 1993 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| 1994 | if( g.perm.Setup ){ |
| 1995 | @ (%d(rid)) |
| 1996 | } |
| @@ -1978,29 +2007,33 @@ | |
| 2007 | @ <tr><th>Date:</th><td> |
| 2008 | hyperlink_to_date(zDate, "</td></tr>"); |
| 2009 | @ <tr><th>User:</th><td> |
| 2010 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 2011 | @ </table> |
| 2012 | @ </div> |
| 2013 | free(zDate); |
| 2014 | free(zTktTitle); |
| 2015 | |
| 2016 | if( g.perm.ModTkt && modPending ){ |
| 2017 | @ <div class="section">Moderation</div> |
| 2018 | @ <div class="sectionbody"> |
| 2019 | @ <blockquote> |
| 2020 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 2021 | @ <label><input type="radio" name="modaction" value="delete"> |
| 2022 | @ Delete this change</label><br /> |
| 2023 | @ <label><input type="radio" name="modaction" value="approve"> |
| 2024 | @ Approve this change</label><br /> |
| 2025 | @ <input type="submit" value="Submit"> |
| 2026 | @ </form> |
| 2027 | @ </blockquote> |
| 2028 | @ </div> |
| 2029 | } |
| 2030 | |
| 2031 | @ <div class="section">Changes</div> |
| 2032 | @ <div class="sectionbody"> |
| 2033 | ticket_output_change_artifact(pTktChng, 0); |
| 2034 | @ </div> |
| 2035 | manifest_destroy(pTktChng); |
| 2036 | style_footer(); |
| 2037 | } |
| 2038 | |
| 2039 | |
| 2040 |