Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Always supply an href= attribute on hyperlinks within the preview, even if the hyperlink is never used. Make the hyperlinked paths of the finfo page point to the tree-view rather than the flat-view. Provide links between the tree-view and the file-ages page. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
4306ab81437b6736667e07c5b27af2b6 |
| User & Date: | drh 2014-01-07 11:25:05.519 |
Context
|
2014-01-07
| ||
| 12:46 | Add the "nofiles" query parameter to the /tree page, causing that page to show only directories. Add a new "folders" link on the check-in information page that jumps to "/tree?nofiles". check-in: ff9e4e5400 user: drh tags: trunk | |
| 11:25 | Always supply an href= attribute on hyperlinks within the preview, even if the hyperlink is never used. Make the hyperlinked paths of the finfo page point to the tree-view rather than the flat-view. Provide links between the tree-view and the file-ages page. check-in: 4306ab8143 user: drh tags: trunk | |
| 10:46 | Improved header text for the tree-view. Make the tree-view the default for the "Files" menu on all default styles. check-in: 78a5dbea6c user: drh tags: trunk | |
Changes
Changes to src/browse.c.
| ︙ | ︙ | |||
471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
if( zRE ){
blob_appendf(&dirname, "matching \"%s\"", zRE);
}
}
if( zCI ){
style_submenu_element("All", "All", "%s",
url_render(&sURI, "ci", 0, 0, 0));
}
if( linkTrunk ){
style_submenu_element("Trunk", "Trunk", "%s",
url_render(&sURI, "ci", "trunk", 0, 0));
}
if ( linkTip ){
style_submenu_element("Tip", "Tip", "%s",
| > > > > | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
if( zRE ){
blob_appendf(&dirname, "matching \"%s\"", zRE);
}
}
if( zCI ){
style_submenu_element("All", "All", "%s",
url_render(&sURI, "ci", 0, 0, 0));
if( nD==0 ){
style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%S",
zUuid);
}
}
if( linkTrunk ){
style_submenu_element("Trunk", "Trunk", "%s",
url_render(&sURI, "ci", "trunk", 0, 0));
}
if ( linkTip ){
style_submenu_element("Tip", "Tip", "%s",
|
| ︙ | ︙ | |||
559 560 561 562 563 564 565 |
** adds class=subdir.
**
** The <li> element for directories also contains a sublist <ul>
** for the contents of that directory.
*/
@ <div class="filetree"><ul>
if( nD ){
| < < < > < < < > | 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
** adds class=subdir.
**
** The <li> element for directories also contains a sublist <ul>
** for the contents of that directory.
*/
@ <div class="filetree"><ul>
if( nD ){
@ <li class="dir">
}else{
@ <li class="dir subdir">
}
@ %z(href("%s",url_render(&sURI,"name",0,0,0)))%h(zProjectName)</a>
@ <ul>
for(p=sTree.pFirst; p; p=p->pNext){
if( p->isDir ){
if( p->nFullName==nD-1 ){
@ <li class="dir subdir">
}else{
@ <li class="dir">
}
@ %z(href("%s",url_render(&sURI,"name",p->zFullName,0,0)))%h(p->zName)</a>
if( startExpanded || p->nFullName<=nD ){
@ <ul>
}else{
@ <ul style='display:none;'>
}
}else{
char *zLink;
|
| ︙ | ︙ | |||
759 760 761 762 763 764 765 766 767 768 769 770 771 772 |
if( !g.perm.Read ){ login_needed(); return; }
zName = P("name");
if( zName==0 ) zName = "tip";
rid = symbolic_name_to_rid(zName, "ci");
if( rid==0 ){
fossil_fatal("not a valid check-in: %s", zName);
}
style_header("File Ages", zName);
compute_fileage(rid);
baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
@ <h2>File Ages For Check-in
@ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
@
| > | 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 |
if( !g.perm.Read ){ login_needed(); return; }
zName = P("name");
if( zName==0 ) zName = "tip";
rid = symbolic_name_to_rid(zName, "ci");
if( rid==0 ){
fossil_fatal("not a valid check-in: %s", zName);
}
style_submenu_element("Tree-View", "Tree-View", "%R/tree?ci=%T", zName);
style_header("File Ages", zName);
compute_fileage(rid);
baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
@ <h2>File Ages For Check-in
@ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
@
|
| ︙ | ︙ |
Changes to src/finfo.c.
| ︙ | ︙ | |||
374 375 376 377 378 379 380 |
}
blob_reset(&sql);
blob_zero(&title);
if( baseCheckin ){
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
char *zLink = href("%R/info/%S", zUuid);
blob_appendf(&title, "Ancestors of file ");
| | | | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
}
blob_reset(&sql);
blob_zero(&title);
if( baseCheckin ){
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
char *zLink = href("%R/info/%S", zUuid);
blob_appendf(&title, "Ancestors of file ");
hyperlinked_path(zFilename, &title, zUuid, "tree", "");
blob_appendf(&title, " from check-in %z%.10s</a>", zLink, zUuid);
fossil_free(zUuid);
}else{
blob_appendf(&title, "History of files named ");
hyperlinked_path(zFilename, &title, 0, "tree", "");
}
@ <h2>%b(&title)</h2>
blob_reset(&title);
pGraph = graph_init();
@ <div id="canvas" style="position:relative;width:1px;height:1px;"
@ onclick="clickOnGraph(event)"></div>
@ <table id="timelineTable" class="timelineTable">
|
| ︙ | ︙ |