Fossil SCM

/stats_report byuser now uses %h instead of %s to render the user name.

stephan 2013-05-06 20:44 trunk
Commit 71d37569777b526a2c4567d279484fe5f0971061
1 file changed +6 -3
+6 -3
--- src/timeline.c
+++ src/timeline.c
@@ -1950,11 +1950,14 @@
19501950
if( !includeMonth ){
19511951
output_table_sorting_javascript("statsTable","tnx");
19521952
}
19531953
}
19541954
1955
-void stats_report_by_user(){
1955
+/*
1956
+** Implements the "byuser" view for /stats_report.
1957
+*/
1958
+static void stats_report_by_user(){
19561959
Stmt query = empty_Stmt;
19571960
int const nPixelsPerEvent = 1; /* for sizing the "graph" part */
19581961
int nRowNumber = 0; /* current TR number */
19591962
int nEventTotal = 0; /* Total event count */
19601963
int rowClass = 0; /* counter for alternating
@@ -1978,16 +1981,16 @@
19781981
@ </tr></thead><tbody>
19791982
while( SQLITE_ROW == db_step(&query) ){
19801983
char const * zUser = db_column_text(&query, 0);
19811984
int const nCount = db_column_int(&query, 1);
19821985
int const nSize = 1+((nPixelsPerEvent * nCount) / 10);
1983
- if(!nCount) continue;
1986
+ if(!nCount) continue /* arguable! */;
19841987
rowClass = ++nRowNumber % 2;
19851988
nEventTotal += nCount;
19861989
@<tr class='row%d(rowClass)'>
19871990
@ <td>
1988
- @ <a href="?view=byyear&user=%h(zUser)" target="_new">%s(zUser)</a>
1991
+ @ <a href="?view=byyear&user=%h(zUser)" target="_new">%h(zUser)</a>
19891992
@ </td><td>%d(nCount)</td>
19901993
@ <td>
19911994
@ <div class='statistics-report-graph-line'
19921995
@ style='height:16px;width:%d(nSize)px;'>
19931996
@ </div></td>
19941997
--- src/timeline.c
+++ src/timeline.c
@@ -1950,11 +1950,14 @@
1950 if( !includeMonth ){
1951 output_table_sorting_javascript("statsTable","tnx");
1952 }
1953 }
1954
1955 void stats_report_by_user(){
 
 
 
1956 Stmt query = empty_Stmt;
1957 int const nPixelsPerEvent = 1; /* for sizing the "graph" part */
1958 int nRowNumber = 0; /* current TR number */
1959 int nEventTotal = 0; /* Total event count */
1960 int rowClass = 0; /* counter for alternating
@@ -1978,16 +1981,16 @@
1978 @ </tr></thead><tbody>
1979 while( SQLITE_ROW == db_step(&query) ){
1980 char const * zUser = db_column_text(&query, 0);
1981 int const nCount = db_column_int(&query, 1);
1982 int const nSize = 1+((nPixelsPerEvent * nCount) / 10);
1983 if(!nCount) continue;
1984 rowClass = ++nRowNumber % 2;
1985 nEventTotal += nCount;
1986 @<tr class='row%d(rowClass)'>
1987 @ <td>
1988 @ <a href="?view=byyear&user=%h(zUser)" target="_new">%s(zUser)</a>
1989 @ </td><td>%d(nCount)</td>
1990 @ <td>
1991 @ <div class='statistics-report-graph-line'
1992 @ style='height:16px;width:%d(nSize)px;'>
1993 @ </div></td>
1994
--- src/timeline.c
+++ src/timeline.c
@@ -1950,11 +1950,14 @@
1950 if( !includeMonth ){
1951 output_table_sorting_javascript("statsTable","tnx");
1952 }
1953 }
1954
1955 /*
1956 ** Implements the "byuser" view for /stats_report.
1957 */
1958 static void stats_report_by_user(){
1959 Stmt query = empty_Stmt;
1960 int const nPixelsPerEvent = 1; /* for sizing the "graph" part */
1961 int nRowNumber = 0; /* current TR number */
1962 int nEventTotal = 0; /* Total event count */
1963 int rowClass = 0; /* counter for alternating
@@ -1978,16 +1981,16 @@
1981 @ </tr></thead><tbody>
1982 while( SQLITE_ROW == db_step(&query) ){
1983 char const * zUser = db_column_text(&query, 0);
1984 int const nCount = db_column_int(&query, 1);
1985 int const nSize = 1+((nPixelsPerEvent * nCount) / 10);
1986 if(!nCount) continue /* arguable! */;
1987 rowClass = ++nRowNumber % 2;
1988 nEventTotal += nCount;
1989 @<tr class='row%d(rowClass)'>
1990 @ <td>
1991 @ <a href="?view=byyear&user=%h(zUser)" target="_new">%h(zUser)</a>
1992 @ </td><td>%d(nCount)</td>
1993 @ <td>
1994 @ <div class='statistics-report-graph-line'
1995 @ style='height:16px;width:%d(nSize)px;'>
1996 @ </div></td>
1997

Keyboard Shortcuts

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