Fossil SCM

/stats_report now shows report list by default. Removed an unused variable.

stephan 2013-05-05 13:26 trunk
Commit 6e42254616a36491a7dbf8f7075af38013426e35
1 file changed +7 -3
+7 -3
--- src/timeline.c
+++ src/timeline.c
@@ -2006,13 +2006,12 @@
20062006
** view=REPORT_NAME Valid values: bymonth, byyear, byuser
20072007
** user=NAME Restricts statistics to the given user
20082008
*/
20092009
void stats_report_page(){
20102010
HQuery url; /* URL for various branch links */
2011
- char const * zView = PD("view","bymonth"); /* Which view/report to show. */
2011
+ char const * zView = P("view"); /* Which view/report to show. */
20122012
char const *zUserName = P("user");
2013
- int whichReport = 0;
20142013
url_initialize(&url, "stats_report");
20152014
/* We have to figure out which report to run before continuing so
20162015
that we can add (or not) the user= param to the buttons in a sane
20172016
manner.
20182017
*/
@@ -2031,10 +2030,15 @@
20312030
}else if(0==fossil_strcmp(zView,"byweek")){
20322031
@ TODO: by-week report.
20332032
}else if(0==fossil_strcmp(zView,"byuser")){
20342033
stats_report_by_user();
20352034
}else{
2036
- @ TODO: show report select list.
2035
+ @ <h1>Select a report to show:</h1>
2036
+ @ <ul>
2037
+ @ <li><a href='?view=byyear'>Events by year</a></li>
2038
+ @ <li><a href='?view=bymonth'>Events by month</a></li>
2039
+ @ <li><a href='?view=byuser'>Events by user</a></li>
2040
+ @ </ul>
20372041
}
20382042
20392043
style_footer();
20402044
}
20412045
--- src/timeline.c
+++ src/timeline.c
@@ -2006,13 +2006,12 @@
2006 ** view=REPORT_NAME Valid values: bymonth, byyear, byuser
2007 ** user=NAME Restricts statistics to the given user
2008 */
2009 void stats_report_page(){
2010 HQuery url; /* URL for various branch links */
2011 char const * zView = PD("view","bymonth"); /* Which view/report to show. */
2012 char const *zUserName = P("user");
2013 int whichReport = 0;
2014 url_initialize(&url, "stats_report");
2015 /* We have to figure out which report to run before continuing so
2016 that we can add (or not) the user= param to the buttons in a sane
2017 manner.
2018 */
@@ -2031,10 +2030,15 @@
2031 }else if(0==fossil_strcmp(zView,"byweek")){
2032 @ TODO: by-week report.
2033 }else if(0==fossil_strcmp(zView,"byuser")){
2034 stats_report_by_user();
2035 }else{
2036 @ TODO: show report select list.
 
 
 
 
 
2037 }
2038
2039 style_footer();
2040 }
2041
--- src/timeline.c
+++ src/timeline.c
@@ -2006,13 +2006,12 @@
2006 ** view=REPORT_NAME Valid values: bymonth, byyear, byuser
2007 ** user=NAME Restricts statistics to the given user
2008 */
2009 void stats_report_page(){
2010 HQuery url; /* URL for various branch links */
2011 char const * zView = P("view"); /* Which view/report to show. */
2012 char const *zUserName = P("user");
 
2013 url_initialize(&url, "stats_report");
2014 /* We have to figure out which report to run before continuing so
2015 that we can add (or not) the user= param to the buttons in a sane
2016 manner.
2017 */
@@ -2031,10 +2030,15 @@
2030 }else if(0==fossil_strcmp(zView,"byweek")){
2031 @ TODO: by-week report.
2032 }else if(0==fossil_strcmp(zView,"byuser")){
2033 stats_report_by_user();
2034 }else{
2035 @ <h1>Select a report to show:</h1>
2036 @ <ul>
2037 @ <li><a href='?view=byyear'>Events by year</a></li>
2038 @ <li><a href='?view=bymonth'>Events by month</a></li>
2039 @ <li><a href='?view=byuser'>Events by user</a></li>
2040 @ </ul>
2041 }
2042
2043 style_footer();
2044 }
2045

Keyboard Shortcuts

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