Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add "Yesterday" and "Tomorrow" submenu links on the /thisdayinhistory page. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d0de24fe8679e3546793a2b72f33474f |
User & Date: | drh 2019-05-13 01:47:55.326 |
Context
2019-05-14
| ||
11:17 | Fix the anti-robot logic so that auto-hyperlink-mouseover actually works and so that the "mouseover" setting sent down to javascript is determined only by the setting on the Access page. ... (check-in: 37f23f37 user: drh tags: trunk) | |
2019-05-13
| ||
21:48 | Merge trunk ... (Closed-Leaf check-in: 91a0d5a5 user: jan.nijtmans tags: openssl-1.1) | |
01:47 | Add "Yesterday" and "Tomorrow" submenu links on the /thisdayinhistory page. ... (check-in: d0de24fe user: drh tags: trunk) | |
2019-05-12
| ||
23:48 | Improved rendering of the graphs on the /thisdayinhistory page. More generally, improved rendering of multiple graphs on the same page that omit the TIMELINE_DISJOINT flag. ... (check-in: 8e2b8b02 user: drh tags: trunk) | |
Changes
Changes to src/timeline.c.
︙ | ︙ | |||
2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 | */ void thisdayinhistory_page(void){ static int aYearsAgo[] = { 1, 2, 3, 4, 5, 10, 15, 20, 30, 40, 50, 75, 100 }; const char *zToday; char *zStartOfProject; int i; Stmt q; login_check_credentials(); if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki && !g.perm.RdForum) ){ login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); return; } style_header("Today In History"); zToday = (char*)P("today"); if( zToday ){ zToday = timeline_expand_datetime(zToday); if( !fossil_isdate(zToday) ) zToday = 0; } if( zToday==0 ){ zToday = db_text(0, "SELECT date('now',toLocal())"); } @ <h1>This Day In History For %h(zToday)</h1> zStartOfProject = db_text(0, "SELECT datetime(min(mtime),toLocal()) FROM event;" ); timeline_temp_table(); db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/"); for(i=0; i<sizeof(aYearsAgo)/sizeof(aYearsAgo[0]); i++){ int iAgo = aYearsAgo[i]; | > > > > > | 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 | */ void thisdayinhistory_page(void){ static int aYearsAgo[] = { 1, 2, 3, 4, 5, 10, 15, 20, 30, 40, 50, 75, 100 }; const char *zToday; char *zStartOfProject; int i; Stmt q; char *z; login_check_credentials(); if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki && !g.perm.RdForum) ){ login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); return; } style_header("Today In History"); zToday = (char*)P("today"); if( zToday ){ zToday = timeline_expand_datetime(zToday); if( !fossil_isdate(zToday) ) zToday = 0; } if( zToday==0 ){ zToday = db_text(0, "SELECT date('now',toLocal())"); } @ <h1>This Day In History For %h(zToday)</h1> z = db_text(0, "SELECT date(%Q,'-1 day')", zToday); style_submenu_element("Yesterday", "%R/thisdayinhistory?today=%t", z); z = db_text(0, "SELECT date(%Q,'+1 day')", zToday); style_submenu_element("Tomorrow", "%R/thisdayinhistory?today=%t", z); zStartOfProject = db_text(0, "SELECT datetime(min(mtime),toLocal()) FROM event;" ); timeline_temp_table(); db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/"); for(i=0; i<sizeof(aYearsAgo)/sizeof(aYearsAgo[0]); i++){ int iAgo = aYearsAgo[i]; |
︙ | ︙ |