Fossil SCM

help overview page uses table layout

wolfgang 2010-10-08 12:32 wolfgangHelpCmd
Commit 94741fb68fd0e50fa9681f4357992d7577ae1eee
1 file changed +16 -4
+16 -4
--- src/main.c
+++ src/main.c
@@ -678,18 +678,30 @@
678678
@ <a href="doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
679679
@ cmd_%s(aCommand[idx].zName)</a>, see also the list of
680680
@ <a href="help">available commands</a> in fossil
681681
@ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
682682
}else{
683
- int i;
683
+ int nCol, nRow, i, tests, cnt;
684684
685
+ for( i=0,tests=0; i<count(aCommand); i++){
686
+ if( strncmp(aCommand[i].zName,"test",4)==0 ) tests++;
687
+ }
688
+ nCol = 4;
689
+ nRow = (count(aCommand)-tests+nCol-1)/nCol;
685690
@ <h1>Available commands</h1>
686
- for(i=0; i<count(aCommand); i++){
691
+ @ <table class="browser"><tr><td class="browser"><ul class="browser">
692
+ for( i=cnt=0; i<count(aCommand); i++ ){
693
+ if( cnt==nRow ){
694
+ @ </ul></td><td class="browser"><ul class="browser">
695
+ cnt=0;
696
+ }
687697
if( strncmp(aCommand[i].zName,"test",4)==0 ) continue;
688
- @ <kbd><a href="help?cmd=%s(aCommand[i].zName)">
689
- @ %s(aCommand[i].zName)</a></kbd>
698
+ @ <li><kbd><a href="help?cmd=%s(aCommand[i].zName)">
699
+ @ %s(aCommand[i].zName)</a></kbd></li>
700
+ cnt++;
690701
}
702
+ @ </ul></td></tr></table>
691703
@ <hr/>fossil version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
692704
}
693705
style_footer();
694706
}
695707
696708
--- src/main.c
+++ src/main.c
@@ -678,18 +678,30 @@
678 @ <a href="doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
679 @ cmd_%s(aCommand[idx].zName)</a>, see also the list of
680 @ <a href="help">available commands</a> in fossil
681 @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
682 }else{
683 int i;
684
 
 
 
 
 
685 @ <h1>Available commands</h1>
686 for(i=0; i<count(aCommand); i++){
 
 
 
 
 
687 if( strncmp(aCommand[i].zName,"test",4)==0 ) continue;
688 @ <kbd><a href="help?cmd=%s(aCommand[i].zName)">
689 @ %s(aCommand[i].zName)</a></kbd>
 
690 }
 
691 @ <hr/>fossil version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
692 }
693 style_footer();
694 }
695
696
--- src/main.c
+++ src/main.c
@@ -678,18 +678,30 @@
678 @ <a href="doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
679 @ cmd_%s(aCommand[idx].zName)</a>, see also the list of
680 @ <a href="help">available commands</a> in fossil
681 @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
682 }else{
683 int nCol, nRow, i, tests, cnt;
684
685 for( i=0,tests=0; i<count(aCommand); i++){
686 if( strncmp(aCommand[i].zName,"test",4)==0 ) tests++;
687 }
688 nCol = 4;
689 nRow = (count(aCommand)-tests+nCol-1)/nCol;
690 @ <h1>Available commands</h1>
691 @ <table class="browser"><tr><td class="browser"><ul class="browser">
692 for( i=cnt=0; i<count(aCommand); i++ ){
693 if( cnt==nRow ){
694 @ </ul></td><td class="browser"><ul class="browser">
695 cnt=0;
696 }
697 if( strncmp(aCommand[i].zName,"test",4)==0 ) continue;
698 @ <li><kbd><a href="help?cmd=%s(aCommand[i].zName)">
699 @ %s(aCommand[i].zName)</a></kbd></li>
700 cnt++;
701 }
702 @ </ul></td></tr></table>
703 @ <hr/>fossil version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
704 }
705 style_footer();
706 }
707
708

Keyboard Shortcuts

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