Fossil SCM

Added a "remove user flag" option to /stats_report for reports which accept (but do not require) the user flag. e.g. switch from by-month-for-user to by-month with 1 click.

stephan 2013-05-06 20:30 trunk
Commit f1a66a6c26a3be87f92dd7220252956123caf935
1 file changed +3 -4
+3 -4
--- src/timeline.c
+++ src/timeline.c
@@ -2014,17 +2014,16 @@
20142014
*/
20152015
void stats_report_page(){
20162016
HQuery url; /* URL for various branch links */
20172017
char const * zView = P("view"); /* Which view/report to show. */
20182018
char const *zUserName = P("user");
2019
+ char const * zRemoveUser = 0;
20192020
url_initialize(&url, "stats_report");
2020
- /* We have to figure out which report to run before continuing so
2021
- that we can add (or not) the user= param to the buttons in a sane
2022
- manner.
2023
- */
2021
+
20242022
if(zUserName && *zUserName){
20252023
url_add_parameter(&url,"user", zUserName);
2024
+ timeline_submenu(&url, "(Remove User Flag)", "view", zView, "user");
20262025
}
20272026
timeline_submenu(&url, "By Year", "view", "byyear", 0);
20282027
timeline_submenu(&url, "By Month", "view", "bymonth", 0);
20292028
timeline_submenu(&url, "By User", "view", "byuser", "user");
20302029
url_reset(&url);
20312030
--- src/timeline.c
+++ src/timeline.c
@@ -2014,17 +2014,16 @@
2014 */
2015 void stats_report_page(){
2016 HQuery url; /* URL for various branch links */
2017 char const * zView = P("view"); /* Which view/report to show. */
2018 char const *zUserName = P("user");
 
2019 url_initialize(&url, "stats_report");
2020 /* We have to figure out which report to run before continuing so
2021 that we can add (or not) the user= param to the buttons in a sane
2022 manner.
2023 */
2024 if(zUserName && *zUserName){
2025 url_add_parameter(&url,"user", zUserName);
 
2026 }
2027 timeline_submenu(&url, "By Year", "view", "byyear", 0);
2028 timeline_submenu(&url, "By Month", "view", "bymonth", 0);
2029 timeline_submenu(&url, "By User", "view", "byuser", "user");
2030 url_reset(&url);
2031
--- src/timeline.c
+++ src/timeline.c
@@ -2014,17 +2014,16 @@
2014 */
2015 void stats_report_page(){
2016 HQuery url; /* URL for various branch links */
2017 char const * zView = P("view"); /* Which view/report to show. */
2018 char const *zUserName = P("user");
2019 char const * zRemoveUser = 0;
2020 url_initialize(&url, "stats_report");
2021
 
 
 
2022 if(zUserName && *zUserName){
2023 url_add_parameter(&url,"user", zUserName);
2024 timeline_submenu(&url, "(Remove User Flag)", "view", zView, "user");
2025 }
2026 timeline_submenu(&url, "By Year", "view", "byyear", 0);
2027 timeline_submenu(&url, "By Month", "view", "bymonth", 0);
2028 timeline_submenu(&url, "By User", "view", "byuser", "user");
2029 url_reset(&url);
2030

Keyboard Shortcuts

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