Fossil SCM

Add the "basic=1" query parameter to /timeline, to declutter the display.

drh 2017-11-24 22:35 trunk
Commit 5ec5a403ae74ffd5b7cbb84aa13ee746c52d543e9b0f03d169493737b76e2be9
1 file changed +41 -15
+41 -15
--- src/timeline.c
+++ src/timeline.c
@@ -103,10 +103,11 @@
103103
#define TIMELINE_UCOLOR 0x0080 /* Background color by user */
104104
#define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
105105
#define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
106106
#define TIMELINE_SHOWRID 0x0400 /* Show RID values in addition to UUIDs */
107107
#define TIMELINE_BISECT 0x0800 /* Show supplimental bisect information */
108
+#define TIMELINE_BASIC 0x1000 /* Minimize clutter and distraction */
108109
#endif
109110
110111
/*
111112
** Hash a string and use the hash to determine a background color.
112113
*/
@@ -264,11 +265,15 @@
264265
}
265266
zPrevDate[0] = 0;
266267
mxWikiLen = db_get_int("timeline-max-comment", 0);
267268
dateFormat = db_get_int("timeline-date-format", 0);
268269
bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
269
- eCommentFormat = db_get_int("timeline-comment-format", 0);
270
+ if( tmFlags & TIMELINE_BASIC ){
271
+ eCommentFormat = 5; /* Comment only */
272
+ }else{
273
+ eCommentFormat = db_get_int("timeline-comment-format", 0);
274
+ }
270275
bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
271276
bSeparateDetail = (eCommentFormat & 8)!=0; /* Bit 3 turns on the detail column */
272277
switch( (eCommentFormat>>1)&3 ){
273278
case 1: bHashAfterComment = 1; break;
274279
case 2: bHashInDetail = 1; break;
@@ -1584,10 +1589,11 @@
15841589
** u=USER Only show items associated with USER
15851590
** y=TYPE 'ci', 'w', 't', 'e', or (default) 'all'
15861591
** ng No Graph.
15871592
** nd Do not highlight the focus check-in
15881593
** v Show details of files changed
1594
+** basic Minimum clutter and distraction
15891595
** f=CHECKIN Show family (immediate parents and children) of CHECKIN
15901596
** from=CHECKIN Path from...
15911597
** to=CHECKIN ... to this
15921598
** shortest ... show only the shortest path
15931599
** uf=FILE_HASH Show only check-ins that contain the given file version
@@ -1640,10 +1646,11 @@
16401646
const char *zChng = P("chng"); /* List of GLOBs for files that changed */
16411647
int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */
16421648
int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */
16431649
int forkOnly = PB("forks"); /* Show only forks and their children */
16441650
int bisectOnly = PB("bisect"); /* Show the check-ins of the bisect */
1651
+ int bBasic = PB("basic"); /* Minimize clutter and distraction */
16451652
int tmFlags = 0; /* Timeline flags */
16461653
const char *zThisTag = 0; /* Suppress links to this tag */
16471654
const char *zThisUser = 0; /* Suppress links to this user */
16481655
HQuery url; /* URL for various branch links */
16491656
int from_rid = name_to_typed_rid(P("from"),"ci"); /* from= for paths */
@@ -1653,10 +1660,11 @@
16531660
int you_rid = name_to_typed_rid(P("you"),"ci");/* you= for common ancst */
16541661
int pd_rid;
16551662
double rBefore, rAfter, rCirca; /* Boundary times */
16561663
const char *z;
16571664
char *zOlderButton = 0; /* URL for Older button at the bottom */
1665
+ char *zNewerButton = 0; /* URL for Newer button at the top */
16581666
int selectedRid = -9999999; /* Show a highlight on this RID */
16591667
int disableY = 0; /* Disable type selector on submenu */
16601668
16611669
/* Set number of rows to display */
16621670
z = P("n");
@@ -1853,11 +1861,13 @@
18531861
blob_append(&sql, ")", -1);
18541862
path_reset();
18551863
addFileGlobExclusion(zChng, &sql);
18561864
tmFlags |= TIMELINE_DISJOINT;
18571865
db_multi_exec("%s", blob_sql_text(&sql));
1858
- style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1866
+ if( !bBasic ){
1867
+ style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1868
+ }
18591869
blob_appendf(&desc, "%d check-ins going from ",
18601870
db_int(0, "SELECT count(*) FROM timeline"));
18611871
blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h", zFrom), zFrom);
18621872
blob_append(&desc, " to ", -1);
18631873
blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h",zTo), zTo);
@@ -1903,12 +1913,14 @@
19031913
if( p_rid ){
19041914
/* If both p= and d= are set, we don't have the uuid of d yet. */
19051915
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
19061916
}
19071917
}
1908
- style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1909
- style_submenu_entry("n","Max:",4,0);
1918
+ if( !bBasic ){
1919
+ style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1920
+ style_submenu_entry("n","Max:",4,0);
1921
+ }
19101922
timeline_y_submenu(1);
19111923
}else if( f_rid && g.perm.Read ){
19121924
/* If f= is present, ignore all other parameters other than n= */
19131925
char *zUuid;
19141926
db_multi_exec(
@@ -1923,12 +1935,14 @@
19231935
if( useDividers ) selectedRid = f_rid;
19241936
blob_appendf(&desc, "Parents and children of check-in ");
19251937
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
19261938
blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
19271939
tmFlags |= TIMELINE_DISJOINT;
1928
- style_submenu_checkbox("unhide", "Unhide", 0, 0);
1929
- style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1940
+ if( !bBasic ){
1941
+ style_submenu_checkbox("unhide", "Unhide", 0, 0);
1942
+ style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1943
+ }
19301944
}else{
19311945
/* Otherwise, a timeline based on a span of time */
19321946
int n;
19331947
const char *zEType = "timeline item";
19341948
char *zDate;
@@ -2187,11 +2201,11 @@
21872201
if( db_int(0,
21882202
"SELECT EXISTS (SELECT 1 FROM event CROSS JOIN blob"
21892203
" WHERE blob.rid=event.objid AND mtime<=%.17g%s)",
21902204
rDate-ONE_SECOND, blob_sql_text(&cond))
21912205
){
2192
- timeline_submenu(&url, "Older", "b", zDate, "a");
2206
+ /* timeline_submenu(&url, "Older", "b", zDate, "a"); */
21932207
zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0));
21942208
}
21952209
free(zDate);
21962210
}
21972211
zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
@@ -2203,25 +2217,33 @@
22032217
if( db_int(0,
22042218
"SELECT EXISTS (SELECT 1 FROM event CROSS JOIN blob"
22052219
" WHERE blob.rid=event.objid AND mtime>=%.17g%s)",
22062220
rDate+ONE_SECOND, blob_sql_text(&cond))
22072221
){
2208
- timeline_submenu(&url, "Newer", "a", zDate, "b");
2222
+ /* timeline_submenu(&url, "Newer", "a", zDate, "b"); */
2223
+ zNewerButton = fossil_strdup(url_render(&url, "a", zDate, "b", 0));
22092224
}
22102225
free(zDate);
22112226
}
2212
- if( zType[0]=='a' || zType[0]=='c' ){
2213
- style_submenu_checkbox("unhide", "Unhide", 0, 0);
2227
+ if( !bBasic ){
2228
+ if( zType[0]=='a' || zType[0]=='c' ){
2229
+ style_submenu_checkbox("unhide", "Unhide", 0, 0);
2230
+ }
2231
+ style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
2232
+ style_submenu_entry("n","Max:",4,0);
22142233
}
2215
- style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
2216
- style_submenu_entry("n","Max:",4,0);
22172234
timeline_y_submenu(disableY);
2218
- style_submenu_entry("t", "Tag Filter:", -8, 0);
2219
- style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0);
2235
+ if( !bBasic ){
2236
+ style_submenu_entry("t", "Tag Filter:", -8, 0);
2237
+ style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0);
2238
+ }
22202239
}
22212240
blob_zero(&cond);
22222241
}
2242
+ if( bBasic ){
2243
+ timeline_submenu(&url, "Advanced", "basic", "0", 0);
2244
+ }
22232245
if( PB("showsql") ){
22242246
@ <pre>%h(blob_sql_text(&sql))</pre>
22252247
}
22262248
if( search_restrict(SRCH_CKIN)!=0 ){
22272249
style_submenu_element("Search", "%R/search?y=c");
@@ -2238,15 +2260,19 @@
22382260
22392261
/* Report any errors. */
22402262
if( zError ){
22412263
@ <p class="generalError">%h(zError)</p>
22422264
}
2265
+ if( bBasic ) tmFlags |= TIMELINE_BASIC;
22432266
2267
+ if( zNewerButton ){
2268
+ @ %z(xhref("class='button'","%z",zNewerButton))More&nbsp;&uarr;</a>
2269
+ }
22442270
www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0);
22452271
db_finalize(&q);
22462272
if( zOlderButton ){
2247
- @ %z(xhref("class='button'","%z",zOlderButton))Older</a>
2273
+ @ %z(xhref("class='button'","%z",zOlderButton))More&nbsp;&darr;</a>
22482274
}
22492275
style_footer();
22502276
}
22512277
22522278
/*
22532279
--- src/timeline.c
+++ src/timeline.c
@@ -103,10 +103,11 @@
103 #define TIMELINE_UCOLOR 0x0080 /* Background color by user */
104 #define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
105 #define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
106 #define TIMELINE_SHOWRID 0x0400 /* Show RID values in addition to UUIDs */
107 #define TIMELINE_BISECT 0x0800 /* Show supplimental bisect information */
 
108 #endif
109
110 /*
111 ** Hash a string and use the hash to determine a background color.
112 */
@@ -264,11 +265,15 @@
264 }
265 zPrevDate[0] = 0;
266 mxWikiLen = db_get_int("timeline-max-comment", 0);
267 dateFormat = db_get_int("timeline-date-format", 0);
268 bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
269 eCommentFormat = db_get_int("timeline-comment-format", 0);
 
 
 
 
270 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
271 bSeparateDetail = (eCommentFormat & 8)!=0; /* Bit 3 turns on the detail column */
272 switch( (eCommentFormat>>1)&3 ){
273 case 1: bHashAfterComment = 1; break;
274 case 2: bHashInDetail = 1; break;
@@ -1584,10 +1589,11 @@
1584 ** u=USER Only show items associated with USER
1585 ** y=TYPE 'ci', 'w', 't', 'e', or (default) 'all'
1586 ** ng No Graph.
1587 ** nd Do not highlight the focus check-in
1588 ** v Show details of files changed
 
1589 ** f=CHECKIN Show family (immediate parents and children) of CHECKIN
1590 ** from=CHECKIN Path from...
1591 ** to=CHECKIN ... to this
1592 ** shortest ... show only the shortest path
1593 ** uf=FILE_HASH Show only check-ins that contain the given file version
@@ -1640,10 +1646,11 @@
1640 const char *zChng = P("chng"); /* List of GLOBs for files that changed */
1641 int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */
1642 int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */
1643 int forkOnly = PB("forks"); /* Show only forks and their children */
1644 int bisectOnly = PB("bisect"); /* Show the check-ins of the bisect */
 
1645 int tmFlags = 0; /* Timeline flags */
1646 const char *zThisTag = 0; /* Suppress links to this tag */
1647 const char *zThisUser = 0; /* Suppress links to this user */
1648 HQuery url; /* URL for various branch links */
1649 int from_rid = name_to_typed_rid(P("from"),"ci"); /* from= for paths */
@@ -1653,10 +1660,11 @@
1653 int you_rid = name_to_typed_rid(P("you"),"ci");/* you= for common ancst */
1654 int pd_rid;
1655 double rBefore, rAfter, rCirca; /* Boundary times */
1656 const char *z;
1657 char *zOlderButton = 0; /* URL for Older button at the bottom */
 
1658 int selectedRid = -9999999; /* Show a highlight on this RID */
1659 int disableY = 0; /* Disable type selector on submenu */
1660
1661 /* Set number of rows to display */
1662 z = P("n");
@@ -1853,11 +1861,13 @@
1853 blob_append(&sql, ")", -1);
1854 path_reset();
1855 addFileGlobExclusion(zChng, &sql);
1856 tmFlags |= TIMELINE_DISJOINT;
1857 db_multi_exec("%s", blob_sql_text(&sql));
1858 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
 
 
1859 blob_appendf(&desc, "%d check-ins going from ",
1860 db_int(0, "SELECT count(*) FROM timeline"));
1861 blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h", zFrom), zFrom);
1862 blob_append(&desc, " to ", -1);
1863 blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h",zTo), zTo);
@@ -1903,12 +1913,14 @@
1903 if( p_rid ){
1904 /* If both p= and d= are set, we don't have the uuid of d yet. */
1905 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
1906 }
1907 }
1908 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1909 style_submenu_entry("n","Max:",4,0);
 
 
1910 timeline_y_submenu(1);
1911 }else if( f_rid && g.perm.Read ){
1912 /* If f= is present, ignore all other parameters other than n= */
1913 char *zUuid;
1914 db_multi_exec(
@@ -1923,12 +1935,14 @@
1923 if( useDividers ) selectedRid = f_rid;
1924 blob_appendf(&desc, "Parents and children of check-in ");
1925 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1926 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
1927 tmFlags |= TIMELINE_DISJOINT;
1928 style_submenu_checkbox("unhide", "Unhide", 0, 0);
1929 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
 
 
1930 }else{
1931 /* Otherwise, a timeline based on a span of time */
1932 int n;
1933 const char *zEType = "timeline item";
1934 char *zDate;
@@ -2187,11 +2201,11 @@
2187 if( db_int(0,
2188 "SELECT EXISTS (SELECT 1 FROM event CROSS JOIN blob"
2189 " WHERE blob.rid=event.objid AND mtime<=%.17g%s)",
2190 rDate-ONE_SECOND, blob_sql_text(&cond))
2191 ){
2192 timeline_submenu(&url, "Older", "b", zDate, "a");
2193 zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0));
2194 }
2195 free(zDate);
2196 }
2197 zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
@@ -2203,25 +2217,33 @@
2203 if( db_int(0,
2204 "SELECT EXISTS (SELECT 1 FROM event CROSS JOIN blob"
2205 " WHERE blob.rid=event.objid AND mtime>=%.17g%s)",
2206 rDate+ONE_SECOND, blob_sql_text(&cond))
2207 ){
2208 timeline_submenu(&url, "Newer", "a", zDate, "b");
 
2209 }
2210 free(zDate);
2211 }
2212 if( zType[0]=='a' || zType[0]=='c' ){
2213 style_submenu_checkbox("unhide", "Unhide", 0, 0);
 
 
 
 
2214 }
2215 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
2216 style_submenu_entry("n","Max:",4,0);
2217 timeline_y_submenu(disableY);
2218 style_submenu_entry("t", "Tag Filter:", -8, 0);
2219 style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0);
 
 
2220 }
2221 blob_zero(&cond);
2222 }
 
 
 
2223 if( PB("showsql") ){
2224 @ <pre>%h(blob_sql_text(&sql))</pre>
2225 }
2226 if( search_restrict(SRCH_CKIN)!=0 ){
2227 style_submenu_element("Search", "%R/search?y=c");
@@ -2238,15 +2260,19 @@
2238
2239 /* Report any errors. */
2240 if( zError ){
2241 @ <p class="generalError">%h(zError)</p>
2242 }
 
2243
 
 
 
2244 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0);
2245 db_finalize(&q);
2246 if( zOlderButton ){
2247 @ %z(xhref("class='button'","%z",zOlderButton))Older</a>
2248 }
2249 style_footer();
2250 }
2251
2252 /*
2253
--- src/timeline.c
+++ src/timeline.c
@@ -103,10 +103,11 @@
103 #define TIMELINE_UCOLOR 0x0080 /* Background color by user */
104 #define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
105 #define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
106 #define TIMELINE_SHOWRID 0x0400 /* Show RID values in addition to UUIDs */
107 #define TIMELINE_BISECT 0x0800 /* Show supplimental bisect information */
108 #define TIMELINE_BASIC 0x1000 /* Minimize clutter and distraction */
109 #endif
110
111 /*
112 ** Hash a string and use the hash to determine a background color.
113 */
@@ -264,11 +265,15 @@
265 }
266 zPrevDate[0] = 0;
267 mxWikiLen = db_get_int("timeline-max-comment", 0);
268 dateFormat = db_get_int("timeline-date-format", 0);
269 bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
270 if( tmFlags & TIMELINE_BASIC ){
271 eCommentFormat = 5; /* Comment only */
272 }else{
273 eCommentFormat = db_get_int("timeline-comment-format", 0);
274 }
275 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
276 bSeparateDetail = (eCommentFormat & 8)!=0; /* Bit 3 turns on the detail column */
277 switch( (eCommentFormat>>1)&3 ){
278 case 1: bHashAfterComment = 1; break;
279 case 2: bHashInDetail = 1; break;
@@ -1584,10 +1589,11 @@
1589 ** u=USER Only show items associated with USER
1590 ** y=TYPE 'ci', 'w', 't', 'e', or (default) 'all'
1591 ** ng No Graph.
1592 ** nd Do not highlight the focus check-in
1593 ** v Show details of files changed
1594 ** basic Minimum clutter and distraction
1595 ** f=CHECKIN Show family (immediate parents and children) of CHECKIN
1596 ** from=CHECKIN Path from...
1597 ** to=CHECKIN ... to this
1598 ** shortest ... show only the shortest path
1599 ** uf=FILE_HASH Show only check-ins that contain the given file version
@@ -1640,10 +1646,11 @@
1646 const char *zChng = P("chng"); /* List of GLOBs for files that changed */
1647 int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */
1648 int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */
1649 int forkOnly = PB("forks"); /* Show only forks and their children */
1650 int bisectOnly = PB("bisect"); /* Show the check-ins of the bisect */
1651 int bBasic = PB("basic"); /* Minimize clutter and distraction */
1652 int tmFlags = 0; /* Timeline flags */
1653 const char *zThisTag = 0; /* Suppress links to this tag */
1654 const char *zThisUser = 0; /* Suppress links to this user */
1655 HQuery url; /* URL for various branch links */
1656 int from_rid = name_to_typed_rid(P("from"),"ci"); /* from= for paths */
@@ -1653,10 +1660,11 @@
1660 int you_rid = name_to_typed_rid(P("you"),"ci");/* you= for common ancst */
1661 int pd_rid;
1662 double rBefore, rAfter, rCirca; /* Boundary times */
1663 const char *z;
1664 char *zOlderButton = 0; /* URL for Older button at the bottom */
1665 char *zNewerButton = 0; /* URL for Newer button at the top */
1666 int selectedRid = -9999999; /* Show a highlight on this RID */
1667 int disableY = 0; /* Disable type selector on submenu */
1668
1669 /* Set number of rows to display */
1670 z = P("n");
@@ -1853,11 +1861,13 @@
1861 blob_append(&sql, ")", -1);
1862 path_reset();
1863 addFileGlobExclusion(zChng, &sql);
1864 tmFlags |= TIMELINE_DISJOINT;
1865 db_multi_exec("%s", blob_sql_text(&sql));
1866 if( !bBasic ){
1867 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1868 }
1869 blob_appendf(&desc, "%d check-ins going from ",
1870 db_int(0, "SELECT count(*) FROM timeline"));
1871 blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h", zFrom), zFrom);
1872 blob_append(&desc, " to ", -1);
1873 blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h",zTo), zTo);
@@ -1903,12 +1913,14 @@
1913 if( p_rid ){
1914 /* If both p= and d= are set, we don't have the uuid of d yet. */
1915 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
1916 }
1917 }
1918 if( !bBasic ){
1919 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1920 style_submenu_entry("n","Max:",4,0);
1921 }
1922 timeline_y_submenu(1);
1923 }else if( f_rid && g.perm.Read ){
1924 /* If f= is present, ignore all other parameters other than n= */
1925 char *zUuid;
1926 db_multi_exec(
@@ -1923,12 +1935,14 @@
1935 if( useDividers ) selectedRid = f_rid;
1936 blob_appendf(&desc, "Parents and children of check-in ");
1937 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1938 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
1939 tmFlags |= TIMELINE_DISJOINT;
1940 if( !bBasic ){
1941 style_submenu_checkbox("unhide", "Unhide", 0, 0);
1942 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
1943 }
1944 }else{
1945 /* Otherwise, a timeline based on a span of time */
1946 int n;
1947 const char *zEType = "timeline item";
1948 char *zDate;
@@ -2187,11 +2201,11 @@
2201 if( db_int(0,
2202 "SELECT EXISTS (SELECT 1 FROM event CROSS JOIN blob"
2203 " WHERE blob.rid=event.objid AND mtime<=%.17g%s)",
2204 rDate-ONE_SECOND, blob_sql_text(&cond))
2205 ){
2206 /* timeline_submenu(&url, "Older", "b", zDate, "a"); */
2207 zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0));
2208 }
2209 free(zDate);
2210 }
2211 zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
@@ -2203,25 +2217,33 @@
2217 if( db_int(0,
2218 "SELECT EXISTS (SELECT 1 FROM event CROSS JOIN blob"
2219 " WHERE blob.rid=event.objid AND mtime>=%.17g%s)",
2220 rDate+ONE_SECOND, blob_sql_text(&cond))
2221 ){
2222 /* timeline_submenu(&url, "Newer", "a", zDate, "b"); */
2223 zNewerButton = fossil_strdup(url_render(&url, "a", zDate, "b", 0));
2224 }
2225 free(zDate);
2226 }
2227 if( !bBasic ){
2228 if( zType[0]=='a' || zType[0]=='c' ){
2229 style_submenu_checkbox("unhide", "Unhide", 0, 0);
2230 }
2231 style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0);
2232 style_submenu_entry("n","Max:",4,0);
2233 }
 
 
2234 timeline_y_submenu(disableY);
2235 if( !bBasic ){
2236 style_submenu_entry("t", "Tag Filter:", -8, 0);
2237 style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0);
2238 }
2239 }
2240 blob_zero(&cond);
2241 }
2242 if( bBasic ){
2243 timeline_submenu(&url, "Advanced", "basic", "0", 0);
2244 }
2245 if( PB("showsql") ){
2246 @ <pre>%h(blob_sql_text(&sql))</pre>
2247 }
2248 if( search_restrict(SRCH_CKIN)!=0 ){
2249 style_submenu_element("Search", "%R/search?y=c");
@@ -2238,15 +2260,19 @@
2260
2261 /* Report any errors. */
2262 if( zError ){
2263 @ <p class="generalError">%h(zError)</p>
2264 }
2265 if( bBasic ) tmFlags |= TIMELINE_BASIC;
2266
2267 if( zNewerButton ){
2268 @ %z(xhref("class='button'","%z",zNewerButton))More&nbsp;&uarr;</a>
2269 }
2270 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0);
2271 db_finalize(&q);
2272 if( zOlderButton ){
2273 @ %z(xhref("class='button'","%z",zOlderButton))More&nbsp;&darr;</a>
2274 }
2275 style_footer();
2276 }
2277
2278 /*
2279

Keyboard Shortcuts

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