Fossil SCM
On the [/wcontent|wiki page] list, omit wiki pages that are associated with check-ins and branches by default, but provide a button to show associated wiki pages if desired (Item 17 on the [/wiki?name=To+Do+List|To Do List]).
Commit
29a24941ed9bf442efcdff7d1c33e0bc4956c332aacd671f1f079debaacab722
Parent
a44e3c7338d205a…
1 file changed
+7
+7
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -1917,10 +1917,11 @@ | ||
| 1917 | 1917 | void wcontent_page(void){ |
| 1918 | 1918 | Stmt q; |
| 1919 | 1919 | double rNow; |
| 1920 | 1920 | int showAll = P("all")!=0; |
| 1921 | 1921 | int showRid = P("showid")!=0; |
| 1922 | + int showCkBr = P("showckbr")!=0; | |
| 1922 | 1923 | |
| 1923 | 1924 | login_check_credentials(); |
| 1924 | 1925 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 1925 | 1926 | style_set_current_feature("wiki"); |
| 1926 | 1927 | style_header("Available Wiki Pages"); |
| @@ -1927,10 +1928,11 @@ | ||
| 1927 | 1928 | if( showAll ){ |
| 1928 | 1929 | style_submenu_element("Active", "%R/wcontent"); |
| 1929 | 1930 | }else{ |
| 1930 | 1931 | style_submenu_element("All", "%R/wcontent?all=1"); |
| 1931 | 1932 | } |
| 1933 | + style_submenu_checkbox("showckbr", "Show associated wikis", 0, 0); | |
| 1932 | 1934 | wiki_standard_submenu(W_ALL_BUT(W_LIST)); |
| 1933 | 1935 | db_prepare(&q, listAllWikiPages/*works-like:""*/); |
| 1934 | 1936 | @ <div class="brlist"> |
| 1935 | 1937 | @ <table class='sortable' data-column-types='tKN' data-init-sort='1'> |
| 1936 | 1938 | @ <thead><tr> |
| @@ -1954,10 +1956,15 @@ | ||
| 1954 | 1956 | |
| 1955 | 1957 | if( sqlite3_strglob("checkin/*", zWName)==0 ){ |
| 1956 | 1958 | zWDisplayName = mprintf("%.25s...", zWName); |
| 1957 | 1959 | }else{ |
| 1958 | 1960 | zWDisplayName = mprintf("%s", zWName); |
| 1961 | + } | |
| 1962 | + if( !showCkBr && | |
| 1963 | + (sqlite3_strglob("checkin/*", zWName)==0 || | |
| 1964 | + sqlite3_strglob("branch/*", zWName)==0) ){ | |
| 1965 | + continue; | |
| 1959 | 1966 | } |
| 1960 | 1967 | if( wrid==0 ){ |
| 1961 | 1968 | if( !showAll ) continue; |
| 1962 | 1969 | @ <tr><td data-sortkey="%h(zSort)">\ |
| 1963 | 1970 | @ %z(href("%R/whistory?name=%T",zWName))<s>%h(zWDisplayName)</s></a></td> |
| 1964 | 1971 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1917,10 +1917,11 @@ | |
| 1917 | void wcontent_page(void){ |
| 1918 | Stmt q; |
| 1919 | double rNow; |
| 1920 | int showAll = P("all")!=0; |
| 1921 | int showRid = P("showid")!=0; |
| 1922 | |
| 1923 | login_check_credentials(); |
| 1924 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 1925 | style_set_current_feature("wiki"); |
| 1926 | style_header("Available Wiki Pages"); |
| @@ -1927,10 +1928,11 @@ | |
| 1927 | if( showAll ){ |
| 1928 | style_submenu_element("Active", "%R/wcontent"); |
| 1929 | }else{ |
| 1930 | style_submenu_element("All", "%R/wcontent?all=1"); |
| 1931 | } |
| 1932 | wiki_standard_submenu(W_ALL_BUT(W_LIST)); |
| 1933 | db_prepare(&q, listAllWikiPages/*works-like:""*/); |
| 1934 | @ <div class="brlist"> |
| 1935 | @ <table class='sortable' data-column-types='tKN' data-init-sort='1'> |
| 1936 | @ <thead><tr> |
| @@ -1954,10 +1956,15 @@ | |
| 1954 | |
| 1955 | if( sqlite3_strglob("checkin/*", zWName)==0 ){ |
| 1956 | zWDisplayName = mprintf("%.25s...", zWName); |
| 1957 | }else{ |
| 1958 | zWDisplayName = mprintf("%s", zWName); |
| 1959 | } |
| 1960 | if( wrid==0 ){ |
| 1961 | if( !showAll ) continue; |
| 1962 | @ <tr><td data-sortkey="%h(zSort)">\ |
| 1963 | @ %z(href("%R/whistory?name=%T",zWName))<s>%h(zWDisplayName)</s></a></td> |
| 1964 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1917,10 +1917,11 @@ | |
| 1917 | void wcontent_page(void){ |
| 1918 | Stmt q; |
| 1919 | double rNow; |
| 1920 | int showAll = P("all")!=0; |
| 1921 | int showRid = P("showid")!=0; |
| 1922 | int showCkBr = P("showckbr")!=0; |
| 1923 | |
| 1924 | login_check_credentials(); |
| 1925 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 1926 | style_set_current_feature("wiki"); |
| 1927 | style_header("Available Wiki Pages"); |
| @@ -1927,10 +1928,11 @@ | |
| 1928 | if( showAll ){ |
| 1929 | style_submenu_element("Active", "%R/wcontent"); |
| 1930 | }else{ |
| 1931 | style_submenu_element("All", "%R/wcontent?all=1"); |
| 1932 | } |
| 1933 | style_submenu_checkbox("showckbr", "Show associated wikis", 0, 0); |
| 1934 | wiki_standard_submenu(W_ALL_BUT(W_LIST)); |
| 1935 | db_prepare(&q, listAllWikiPages/*works-like:""*/); |
| 1936 | @ <div class="brlist"> |
| 1937 | @ <table class='sortable' data-column-types='tKN' data-init-sort='1'> |
| 1938 | @ <thead><tr> |
| @@ -1954,10 +1956,15 @@ | |
| 1956 | |
| 1957 | if( sqlite3_strglob("checkin/*", zWName)==0 ){ |
| 1958 | zWDisplayName = mprintf("%.25s...", zWName); |
| 1959 | }else{ |
| 1960 | zWDisplayName = mprintf("%s", zWName); |
| 1961 | } |
| 1962 | if( !showCkBr && |
| 1963 | (sqlite3_strglob("checkin/*", zWName)==0 || |
| 1964 | sqlite3_strglob("branch/*", zWName)==0) ){ |
| 1965 | continue; |
| 1966 | } |
| 1967 | if( wrid==0 ){ |
| 1968 | if( !showAll ) continue; |
| 1969 | @ <tr><td data-sortkey="%h(zSort)">\ |
| 1970 | @ %z(href("%R/whistory?name=%T",zWName))<s>%h(zWDisplayName)</s></a></td> |
| 1971 |