Fossil SCM
On the /timeline and /finfo pages, change the hyperlinks under the timestamp to point to the object referenced. This allows the timeline to be configured for "comment-only" but still provide a link to the object.
Commit
77dfcc91edbc8bcb080814f3e2a884ec3a375697413443aef83ce887566f2a82
Parent
b39985508bf31c4…
2 files changed
+1
-1
+12
-1
+1
-1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -508,11 +508,11 @@ | ||
| 508 | 508 | @ </td><td></td><td></td></tr> |
| 509 | 509 | } |
| 510 | 510 | memcpy(zTime, &zDate[11], 5); |
| 511 | 511 | zTime[5] = 0; |
| 512 | 512 | @ <tr><td class="timelineTime"> |
| 513 | - @ %z(href("%R/timeline?c=%t",zDate))%s(zTime)</a></td> | |
| 513 | + @ %z(href("%R/artifact/%!S",zUuid))%s(zTime)</a></td> | |
| 514 | 514 | @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div> |
| 515 | 515 | @ </td> |
| 516 | 516 | if( zBgClr && zBgClr[0] ){ |
| 517 | 517 | @ <td class="timelineTableCell" style="background-color: %h(zBgClr);"> |
| 518 | 518 | }else{ |
| 519 | 519 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -508,11 +508,11 @@ | |
| 508 | @ </td><td></td><td></td></tr> |
| 509 | } |
| 510 | memcpy(zTime, &zDate[11], 5); |
| 511 | zTime[5] = 0; |
| 512 | @ <tr><td class="timelineTime"> |
| 513 | @ %z(href("%R/timeline?c=%t",zDate))%s(zTime)</a></td> |
| 514 | @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div> |
| 515 | @ </td> |
| 516 | if( zBgClr && zBgClr[0] ){ |
| 517 | @ <td class="timelineTableCell" style="background-color: %h(zBgClr);"> |
| 518 | }else{ |
| 519 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -508,11 +508,11 @@ | |
| 508 | @ </td><td></td><td></td></tr> |
| 509 | } |
| 510 | memcpy(zTime, &zDate[11], 5); |
| 511 | zTime[5] = 0; |
| 512 | @ <tr><td class="timelineTime"> |
| 513 | @ %z(href("%R/artifact/%!S",zUuid))%s(zTime)</a></td> |
| 514 | @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div> |
| 515 | @ </td> |
| 516 | if( zBgClr && zBgClr[0] ){ |
| 517 | @ <td class="timelineTableCell" style="background-color: %h(zBgClr);"> |
| 518 | }else{ |
| 519 |
+12
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -380,11 +380,22 @@ | ||
| 380 | 380 | }else if( rid==vid ){ |
| 381 | 381 | @ <tr class="timelineCurrent"> |
| 382 | 382 | }else { |
| 383 | 383 | @ <tr> |
| 384 | 384 | } |
| 385 | - zDateLink = href("%R/timeline?c=%!S&unhide", zUuid); | |
| 385 | + if( zType[0]=='e' && tagid ){ | |
| 386 | + char *zId; | |
| 387 | + zId = db_text(0, "SELECT substr(tagname, 7) FROM tag WHERE tagid=%d", | |
| 388 | + tagid); | |
| 389 | + zDateLink = href("%R/technote/%s",zId); | |
| 390 | + free(zId); | |
| 391 | + }else if( zUuid ){ | |
| 392 | + zDateLink = xhref("class='timelineHistLink'", "%R/info/%!S", zUuid); | |
| 393 | + }else{ | |
| 394 | + zDateLink = mprintf("<a>"); | |
| 395 | + } | |
| 396 | + /* WAS: zDateLink = href("%R/timeline?c=%!S&unhide", zUuid); */ | |
| 386 | 397 | @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td> |
| 387 | 398 | @ <td class="timelineGraph"> |
| 388 | 399 | if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0; |
| 389 | 400 | if( zType[0]=='c' |
| 390 | 401 | && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0) |
| 391 | 402 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -380,11 +380,22 @@ | |
| 380 | }else if( rid==vid ){ |
| 381 | @ <tr class="timelineCurrent"> |
| 382 | }else { |
| 383 | @ <tr> |
| 384 | } |
| 385 | zDateLink = href("%R/timeline?c=%!S&unhide", zUuid); |
| 386 | @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td> |
| 387 | @ <td class="timelineGraph"> |
| 388 | if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0; |
| 389 | if( zType[0]=='c' |
| 390 | && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0) |
| 391 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -380,11 +380,22 @@ | |
| 380 | }else if( rid==vid ){ |
| 381 | @ <tr class="timelineCurrent"> |
| 382 | }else { |
| 383 | @ <tr> |
| 384 | } |
| 385 | if( zType[0]=='e' && tagid ){ |
| 386 | char *zId; |
| 387 | zId = db_text(0, "SELECT substr(tagname, 7) FROM tag WHERE tagid=%d", |
| 388 | tagid); |
| 389 | zDateLink = href("%R/technote/%s",zId); |
| 390 | free(zId); |
| 391 | }else if( zUuid ){ |
| 392 | zDateLink = xhref("class='timelineHistLink'", "%R/info/%!S", zUuid); |
| 393 | }else{ |
| 394 | zDateLink = mprintf("<a>"); |
| 395 | } |
| 396 | /* WAS: zDateLink = href("%R/timeline?c=%!S&unhide", zUuid); */ |
| 397 | @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td> |
| 398 | @ <td class="timelineGraph"> |
| 399 | if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0; |
| 400 | if( zType[0]=='c' |
| 401 | && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0) |
| 402 |