Fossil SCM
/stats_report byuser user hyperlinks now link to bymonth (seems more useful) and links from by-user data to the timeline now filter the timeline on that user name. Minor word case changes.
Commit
78bdddfb807f20fb08fc7b3facebd5d02bf29f25
Parent
9fab0f8125c57c7…
1 file changed
+11
-5
+11
-5
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1853,11 +1853,13 @@ | ||
| 1853 | 1853 | int nEventsPerYear = 0; /* Total even count for the |
| 1854 | 1854 | current year */ |
| 1855 | 1855 | char showYearTotal = 0; /* Flag telling us when to show |
| 1856 | 1856 | the per-year event totals */ |
| 1857 | 1857 | Blob header = empty_blob; /* Page header text */ |
| 1858 | - blob_appendf(&header, "Timeline Events by %s", zTimeLabel); | |
| 1858 | + | |
| 1859 | + blob_appendf(&header, "Timeline Events by year%s", | |
| 1860 | + (includeMonth ? "/month" : "")); | |
| 1859 | 1861 | blob_appendf(&sql, |
| 1860 | 1862 | "SELECT substr(date(mtime),1,%d) AS timeframe, " |
| 1861 | 1863 | "count(*) AS eventCount " |
| 1862 | 1864 | "FROM event ", |
| 1863 | 1865 | includeMonth ? 7 : 4); |
| @@ -1910,15 +1912,20 @@ | ||
| 1910 | 1912 | nEventTotal += nCount; |
| 1911 | 1913 | nEventsPerYear += nCount; |
| 1912 | 1914 | @<tr class='row%d(rowClass)'> |
| 1913 | 1915 | @ <td> |
| 1914 | 1916 | if(includeMonth){ |
| 1915 | - @ <a href="%s(g.zTop)/timeline?ym=%s(zTimeframe)&n=%d(nCount)" | |
| 1917 | + cgi_printf("<a href='%s/timeline?" | |
| 1918 | + "ym=%t&n=%d", | |
| 1919 | + g.zTop, zTimeframe, nCount ); | |
| 1916 | 1920 | /* Reminder: n=nCount is not actually correct for bymonth unless |
| 1917 | 1921 | that was the only user who caused events. |
| 1918 | 1922 | */ |
| 1919 | - @ target="_new">%s(zTimeframe)</a> | |
| 1923 | + if( zUserName && *zUserName ){ | |
| 1924 | + cgi_printf("&u=%t", zUserName); | |
| 1925 | + } | |
| 1926 | + cgi_printf("' target='_new'>%s</a>",zTimeframe); | |
| 1920 | 1927 | }else { |
| 1921 | 1928 | @ %s(zTimeframe) |
| 1922 | 1929 | } |
| 1923 | 1930 | @ </td><td>%d(nCount)</td> |
| 1924 | 1931 | @ <td> |
| @@ -1939,11 +1946,10 @@ | ||
| 1939 | 1946 | @ <tr class='row%d(rowClass)'> |
| 1940 | 1947 | @ <td></td> |
| 1941 | 1948 | @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td> |
| 1942 | 1949 | @</tr> |
| 1943 | 1950 | } |
| 1944 | - | |
| 1945 | 1951 | #if 0 |
| 1946 | 1952 | rowClass = ++nRowNumber % 2; |
| 1947 | 1953 | @ <tr class='row%d(rowClass)'> |
| 1948 | 1954 | @ <td colspan='3'>Total events: %d(nEventTotal)</td> |
| 1949 | 1955 | @ </tr> |
| @@ -1989,11 +1995,11 @@ | ||
| 1989 | 1995 | if(!nCount) continue /* arguable! */; |
| 1990 | 1996 | rowClass = ++nRowNumber % 2; |
| 1991 | 1997 | nEventTotal += nCount; |
| 1992 | 1998 | @<tr class='row%d(rowClass)'> |
| 1993 | 1999 | @ <td> |
| 1994 | - @ <a href="?view=byyear&user=%h(zUser)" target="_new">%h(zUser)</a> | |
| 2000 | + @ <a href="?view=bymonth&user=%h(zUser)" target="_new">%h(zUser)</a> | |
| 1995 | 2001 | @ </td><td>%d(nCount)</td> |
| 1996 | 2002 | @ <td> |
| 1997 | 2003 | @ <div class='statistics-report-graph-line' |
| 1998 | 2004 | @ style='height:16px;width:%d(nSize)px;'> |
| 1999 | 2005 | @ </div></td> |
| 2000 | 2006 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1853,11 +1853,13 @@ | |
| 1853 | int nEventsPerYear = 0; /* Total even count for the |
| 1854 | current year */ |
| 1855 | char showYearTotal = 0; /* Flag telling us when to show |
| 1856 | the per-year event totals */ |
| 1857 | Blob header = empty_blob; /* Page header text */ |
| 1858 | blob_appendf(&header, "Timeline Events by %s", zTimeLabel); |
| 1859 | blob_appendf(&sql, |
| 1860 | "SELECT substr(date(mtime),1,%d) AS timeframe, " |
| 1861 | "count(*) AS eventCount " |
| 1862 | "FROM event ", |
| 1863 | includeMonth ? 7 : 4); |
| @@ -1910,15 +1912,20 @@ | |
| 1910 | nEventTotal += nCount; |
| 1911 | nEventsPerYear += nCount; |
| 1912 | @<tr class='row%d(rowClass)'> |
| 1913 | @ <td> |
| 1914 | if(includeMonth){ |
| 1915 | @ <a href="%s(g.zTop)/timeline?ym=%s(zTimeframe)&n=%d(nCount)" |
| 1916 | /* Reminder: n=nCount is not actually correct for bymonth unless |
| 1917 | that was the only user who caused events. |
| 1918 | */ |
| 1919 | @ target="_new">%s(zTimeframe)</a> |
| 1920 | }else { |
| 1921 | @ %s(zTimeframe) |
| 1922 | } |
| 1923 | @ </td><td>%d(nCount)</td> |
| 1924 | @ <td> |
| @@ -1939,11 +1946,10 @@ | |
| 1939 | @ <tr class='row%d(rowClass)'> |
| 1940 | @ <td></td> |
| 1941 | @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td> |
| 1942 | @</tr> |
| 1943 | } |
| 1944 | |
| 1945 | #if 0 |
| 1946 | rowClass = ++nRowNumber % 2; |
| 1947 | @ <tr class='row%d(rowClass)'> |
| 1948 | @ <td colspan='3'>Total events: %d(nEventTotal)</td> |
| 1949 | @ </tr> |
| @@ -1989,11 +1995,11 @@ | |
| 1989 | if(!nCount) continue /* arguable! */; |
| 1990 | rowClass = ++nRowNumber % 2; |
| 1991 | nEventTotal += nCount; |
| 1992 | @<tr class='row%d(rowClass)'> |
| 1993 | @ <td> |
| 1994 | @ <a href="?view=byyear&user=%h(zUser)" target="_new">%h(zUser)</a> |
| 1995 | @ </td><td>%d(nCount)</td> |
| 1996 | @ <td> |
| 1997 | @ <div class='statistics-report-graph-line' |
| 1998 | @ style='height:16px;width:%d(nSize)px;'> |
| 1999 | @ </div></td> |
| 2000 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1853,11 +1853,13 @@ | |
| 1853 | int nEventsPerYear = 0; /* Total even count for the |
| 1854 | current year */ |
| 1855 | char showYearTotal = 0; /* Flag telling us when to show |
| 1856 | the per-year event totals */ |
| 1857 | Blob header = empty_blob; /* Page header text */ |
| 1858 | |
| 1859 | blob_appendf(&header, "Timeline Events by year%s", |
| 1860 | (includeMonth ? "/month" : "")); |
| 1861 | blob_appendf(&sql, |
| 1862 | "SELECT substr(date(mtime),1,%d) AS timeframe, " |
| 1863 | "count(*) AS eventCount " |
| 1864 | "FROM event ", |
| 1865 | includeMonth ? 7 : 4); |
| @@ -1910,15 +1912,20 @@ | |
| 1912 | nEventTotal += nCount; |
| 1913 | nEventsPerYear += nCount; |
| 1914 | @<tr class='row%d(rowClass)'> |
| 1915 | @ <td> |
| 1916 | if(includeMonth){ |
| 1917 | cgi_printf("<a href='%s/timeline?" |
| 1918 | "ym=%t&n=%d", |
| 1919 | g.zTop, zTimeframe, nCount ); |
| 1920 | /* Reminder: n=nCount is not actually correct for bymonth unless |
| 1921 | that was the only user who caused events. |
| 1922 | */ |
| 1923 | if( zUserName && *zUserName ){ |
| 1924 | cgi_printf("&u=%t", zUserName); |
| 1925 | } |
| 1926 | cgi_printf("' target='_new'>%s</a>",zTimeframe); |
| 1927 | }else { |
| 1928 | @ %s(zTimeframe) |
| 1929 | } |
| 1930 | @ </td><td>%d(nCount)</td> |
| 1931 | @ <td> |
| @@ -1939,11 +1946,10 @@ | |
| 1946 | @ <tr class='row%d(rowClass)'> |
| 1947 | @ <td></td> |
| 1948 | @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td> |
| 1949 | @</tr> |
| 1950 | } |
| 1951 | #if 0 |
| 1952 | rowClass = ++nRowNumber % 2; |
| 1953 | @ <tr class='row%d(rowClass)'> |
| 1954 | @ <td colspan='3'>Total events: %d(nEventTotal)</td> |
| 1955 | @ </tr> |
| @@ -1989,11 +1995,11 @@ | |
| 1995 | if(!nCount) continue /* arguable! */; |
| 1996 | rowClass = ++nRowNumber % 2; |
| 1997 | nEventTotal += nCount; |
| 1998 | @<tr class='row%d(rowClass)'> |
| 1999 | @ <td> |
| 2000 | @ <a href="?view=bymonth&user=%h(zUser)" target="_new">%h(zUser)</a> |
| 2001 | @ </td><td>%d(nCount)</td> |
| 2002 | @ <td> |
| 2003 | @ <div class='statistics-report-graph-line' |
| 2004 | @ style='height:16px;width:%d(nSize)px;'> |
| 2005 | @ </div></td> |
| 2006 |