Fossil SCM
help overview page uses table layout
Commit
94741fb68fd0e50fa9681f4357992d7577ae1eee
Parent
b3bf08cc843a7de…
1 file changed
+16
-4
+16
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -678,18 +678,30 @@ | ||
| 678 | 678 | @ <a href="doc/tip/www/cmd_%s(aCommand[idx].zName).wiki"> |
| 679 | 679 | @ cmd_%s(aCommand[idx].zName)</a>, see also the list of |
| 680 | 680 | @ <a href="help">available commands</a> in fossil |
| 681 | 681 | @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC |
| 682 | 682 | }else{ |
| 683 | - int i; | |
| 683 | + int nCol, nRow, i, tests, cnt; | |
| 684 | 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; | |
| 685 | 690 | @ <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 | + } | |
| 687 | 697 | 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++; | |
| 690 | 701 | } |
| 702 | + @ </ul></td></tr></table> | |
| 691 | 703 | @ <hr/>fossil version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC |
| 692 | 704 | } |
| 693 | 705 | style_footer(); |
| 694 | 706 | } |
| 695 | 707 | |
| 696 | 708 |
| --- 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 |