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]).

danield 2022-05-12 15:09 trunk
Commit 29a24941ed9bf442efcdff7d1c33e0bc4956c332aacd671f1f079debaacab722
1 file changed +7
+7
--- src/wiki.c
+++ src/wiki.c
@@ -1917,10 +1917,11 @@
19171917
void wcontent_page(void){
19181918
Stmt q;
19191919
double rNow;
19201920
int showAll = P("all")!=0;
19211921
int showRid = P("showid")!=0;
1922
+ int showCkBr = P("showckbr")!=0;
19221923
19231924
login_check_credentials();
19241925
if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; }
19251926
style_set_current_feature("wiki");
19261927
style_header("Available Wiki Pages");
@@ -1927,10 +1928,11 @@
19271928
if( showAll ){
19281929
style_submenu_element("Active", "%R/wcontent");
19291930
}else{
19301931
style_submenu_element("All", "%R/wcontent?all=1");
19311932
}
1933
+ style_submenu_checkbox("showckbr", "Show associated wikis", 0, 0);
19321934
wiki_standard_submenu(W_ALL_BUT(W_LIST));
19331935
db_prepare(&q, listAllWikiPages/*works-like:""*/);
19341936
@ <div class="brlist">
19351937
@ <table class='sortable' data-column-types='tKN' data-init-sort='1'>
19361938
@ <thead><tr>
@@ -1954,10 +1956,15 @@
19541956
19551957
if( sqlite3_strglob("checkin/*", zWName)==0 ){
19561958
zWDisplayName = mprintf("%.25s...", zWName);
19571959
}else{
19581960
zWDisplayName = mprintf("%s", zWName);
1961
+ }
1962
+ if( !showCkBr &&
1963
+ (sqlite3_strglob("checkin/*", zWName)==0 ||
1964
+ sqlite3_strglob("branch/*", zWName)==0) ){
1965
+ continue;
19591966
}
19601967
if( wrid==0 ){
19611968
if( !showAll ) continue;
19621969
@ <tr><td data-sortkey="%h(zSort)">\
19631970
@ %z(href("%R/whistory?name=%T",zWName))<s>%h(zWDisplayName)</s></a></td>
19641971
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button