Fossil SCM
Flatten the subdirectory ancestor links into a single line.
Commit
7dfc5cda7ae6127dc5212be47677a1cb0fe54b05
Parent
1ec615248e8faad…
2 files changed
+7
-2
+22
-3
+7
-2
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -545,21 +545,26 @@ | ||
| 545 | 545 | |
| 546 | 546 | /* Generate a multi-column table listing the contents of zD[] |
| 547 | 547 | ** directory. |
| 548 | 548 | */ |
| 549 | 549 | @ <ul class="filetree root"> |
| 550 | - @ <li class="dir"> | |
| 551 | 550 | if( nD ){ |
| 552 | 551 | char *zLink = href("%s", url_render(&sURI, "name", 0, 0, 0)); |
| 552 | + @ <li class="dir"> | |
| 553 | 553 | @ %z(zLink)%h(zProjectName)</a> |
| 554 | 554 | }else{ |
| 555 | + @ <li class="dir subdir"> | |
| 555 | 556 | @ <a>%h(zProjectName)</a> |
| 556 | 557 | } |
| 557 | 558 | @ <ul class="filetree"> |
| 558 | 559 | for(p=sTree.pFirst; p; p=p->pNext){ |
| 559 | 560 | if( p->isDir ){ |
| 560 | - @ <li class="dir"> | |
| 561 | + if( nD && strlen(p->zFullName)==nD-1 ){ | |
| 562 | + @ <li class="dir subdir"> | |
| 563 | + }else{ | |
| 564 | + @ <li class="dir"> | |
| 565 | + } | |
| 561 | 566 | if( fossil_strcmp(p->zFullName, zD)==0 ){ |
| 562 | 567 | @ <a>%h(p->zName)</a> |
| 563 | 568 | }else{ |
| 564 | 569 | char *zLink = href("%s", url_render(&sURI, "name", p->zFullName, 0, 0)); |
| 565 | 570 | @ %z(zLink)%h(p->zName)</a> |
| 566 | 571 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -545,21 +545,26 @@ | |
| 545 | |
| 546 | /* Generate a multi-column table listing the contents of zD[] |
| 547 | ** directory. |
| 548 | */ |
| 549 | @ <ul class="filetree root"> |
| 550 | @ <li class="dir"> |
| 551 | if( nD ){ |
| 552 | char *zLink = href("%s", url_render(&sURI, "name", 0, 0, 0)); |
| 553 | @ %z(zLink)%h(zProjectName)</a> |
| 554 | }else{ |
| 555 | @ <a>%h(zProjectName)</a> |
| 556 | } |
| 557 | @ <ul class="filetree"> |
| 558 | for(p=sTree.pFirst; p; p=p->pNext){ |
| 559 | if( p->isDir ){ |
| 560 | @ <li class="dir"> |
| 561 | if( fossil_strcmp(p->zFullName, zD)==0 ){ |
| 562 | @ <a>%h(p->zName)</a> |
| 563 | }else{ |
| 564 | char *zLink = href("%s", url_render(&sURI, "name", p->zFullName, 0, 0)); |
| 565 | @ %z(zLink)%h(p->zName)</a> |
| 566 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -545,21 +545,26 @@ | |
| 545 | |
| 546 | /* Generate a multi-column table listing the contents of zD[] |
| 547 | ** directory. |
| 548 | */ |
| 549 | @ <ul class="filetree root"> |
| 550 | if( nD ){ |
| 551 | char *zLink = href("%s", url_render(&sURI, "name", 0, 0, 0)); |
| 552 | @ <li class="dir"> |
| 553 | @ %z(zLink)%h(zProjectName)</a> |
| 554 | }else{ |
| 555 | @ <li class="dir subdir"> |
| 556 | @ <a>%h(zProjectName)</a> |
| 557 | } |
| 558 | @ <ul class="filetree"> |
| 559 | for(p=sTree.pFirst; p; p=p->pNext){ |
| 560 | if( p->isDir ){ |
| 561 | if( nD && strlen(p->zFullName)==nD-1 ){ |
| 562 | @ <li class="dir subdir"> |
| 563 | }else{ |
| 564 | @ <li class="dir"> |
| 565 | } |
| 566 | if( fossil_strcmp(p->zFullName, zD)==0 ){ |
| 567 | @ <a>%h(p->zName)</a> |
| 568 | }else{ |
| 569 | char *zLink = href("%s", url_render(&sURI, "name", p->zFullName, 0, 0)); |
| 570 | @ %z(zLink)%h(p->zName)</a> |
| 571 |
+22
-3
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -772,20 +772,39 @@ | ||
| 772 | 772 | @ margin-left: 0.5em; |
| 773 | 773 | @ padding-left: 0.5em; |
| 774 | 774 | @ white-space: nowrap; |
| 775 | 775 | }, |
| 776 | 776 | { ".filetree", |
| 777 | - "file tree", | |
| 777 | + "file tree root and branch lists", | |
| 778 | + @ display: inline; | |
| 778 | 779 | @ padding: 0; |
| 780 | + }, | |
| 781 | + { ".filetree.root", | |
| 782 | + "file tree root", | |
| 783 | + @ display: block; | |
| 779 | 784 | @ list-style: none; |
| 780 | 785 | @ line-height: 1.3; |
| 781 | 786 | }, |
| 782 | - { ".filetree ul", | |
| 783 | - "file tree subdirectory lists", | |
| 787 | + { ".filetree li", | |
| 788 | + "file tree list items", | |
| 789 | + @ display: inline; | |
| 790 | + }, | |
| 791 | + { ".filetree .subdir ul", | |
| 792 | + "file tree lists below subdir", | |
| 793 | + @ display: block; | |
| 784 | 794 | @ margin: 0 0 .4em 7px; |
| 785 | 795 | @ padding: .2em 0 0 12px; |
| 786 | 796 | @ border-left: 2px dotted #aaa; |
| 797 | + }, | |
| 798 | + { ".filetree .subdir li", | |
| 799 | + "file tree lists items below subdir", | |
| 800 | + @ display: block; | |
| 801 | + @ padding: 0; | |
| 802 | + }, | |
| 803 | + { ".filetree a", | |
| 804 | + "file tree links", | |
| 805 | + @ margin-right: .5em; | |
| 787 | 806 | }, |
| 788 | 807 | { ".filetree a:before", |
| 789 | 808 | "file tree link icons", |
| 790 | 809 | @ margin-right: 5px; |
| 791 | 810 | @ vertical-align: -3px; |
| 792 | 811 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -772,20 +772,39 @@ | |
| 772 | @ margin-left: 0.5em; |
| 773 | @ padding-left: 0.5em; |
| 774 | @ white-space: nowrap; |
| 775 | }, |
| 776 | { ".filetree", |
| 777 | "file tree", |
| 778 | @ padding: 0; |
| 779 | @ list-style: none; |
| 780 | @ line-height: 1.3; |
| 781 | }, |
| 782 | { ".filetree ul", |
| 783 | "file tree subdirectory lists", |
| 784 | @ margin: 0 0 .4em 7px; |
| 785 | @ padding: .2em 0 0 12px; |
| 786 | @ border-left: 2px dotted #aaa; |
| 787 | }, |
| 788 | { ".filetree a:before", |
| 789 | "file tree link icons", |
| 790 | @ margin-right: 5px; |
| 791 | @ vertical-align: -3px; |
| 792 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -772,20 +772,39 @@ | |
| 772 | @ margin-left: 0.5em; |
| 773 | @ padding-left: 0.5em; |
| 774 | @ white-space: nowrap; |
| 775 | }, |
| 776 | { ".filetree", |
| 777 | "file tree root and branch lists", |
| 778 | @ display: inline; |
| 779 | @ padding: 0; |
| 780 | }, |
| 781 | { ".filetree.root", |
| 782 | "file tree root", |
| 783 | @ display: block; |
| 784 | @ list-style: none; |
| 785 | @ line-height: 1.3; |
| 786 | }, |
| 787 | { ".filetree li", |
| 788 | "file tree list items", |
| 789 | @ display: inline; |
| 790 | }, |
| 791 | { ".filetree .subdir ul", |
| 792 | "file tree lists below subdir", |
| 793 | @ display: block; |
| 794 | @ margin: 0 0 .4em 7px; |
| 795 | @ padding: .2em 0 0 12px; |
| 796 | @ border-left: 2px dotted #aaa; |
| 797 | }, |
| 798 | { ".filetree .subdir li", |
| 799 | "file tree lists items below subdir", |
| 800 | @ display: block; |
| 801 | @ padding: 0; |
| 802 | }, |
| 803 | { ".filetree a", |
| 804 | "file tree links", |
| 805 | @ margin-right: .5em; |
| 806 | }, |
| 807 | { ".filetree a:before", |
| 808 | "file tree link icons", |
| 809 | @ margin-right: 5px; |
| 810 | @ vertical-align: -3px; |
| 811 |