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.

drh 2017-11-24 21:51 trunk
Commit 77dfcc91edbc8bcb080814f3e2a884ec3a375697413443aef83ce887566f2a82
2 files changed +1 -1 +12 -1
+1 -1
--- src/finfo.c
+++ src/finfo.c
@@ -508,11 +508,11 @@
508508
@ </td><td></td><td></td></tr>
509509
}
510510
memcpy(zTime, &zDate[11], 5);
511511
zTime[5] = 0;
512512
@ <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>
514514
@ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div>
515515
@ </td>
516516
if( zBgClr && zBgClr[0] ){
517517
@ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
518518
}else{
519519
--- 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 @@
380380
}else if( rid==vid ){
381381
@ <tr class="timelineCurrent">
382382
}else {
383383
@ <tr>
384384
}
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); */
386397
@ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td>
387398
@ <td class="timelineGraph">
388399
if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
389400
if( zType[0]=='c'
390401
&& (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
391402
--- 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

Keyboard Shortcuts

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